diff options
author | Pan Xiuli <xiuli.pan@intel.com> | 2016-07-27 10:11:15 +0800 |
---|---|---|
committer | Yang Rong <rong.r.yang@intel.com> | 2016-08-03 18:32:38 +0800 |
commit | c17ec12ee8e82759fe13480efd772dbe4ea10029 (patch) | |
tree | ab7b5f79029f8bf1d7a8f8df3077a5b4e17c2674 /utests/compiler_workgroup_scan_exclusive.cpp | |
parent | 6bd460954283ae30b30fff9ce5eb0a47cb001f96 (diff) | |
download | beignet-c17ec12ee8e82759fe13480efd772dbe4ea10029.tar.gz |
Utset: Add check for workgroup tests
Workgroup is also an OpenCL 2.0 feature, add check for these cases.
V2: Move check before kernel build
V3: Remove uselees check
Signed-off-by: Pan Xiuli <xiuli.pan@intel.com>
Reviewed-by: "Guo, Yejun" <yejun.guo@intel.com>
Diffstat (limited to 'utests/compiler_workgroup_scan_exclusive.cpp')
-rw-r--r-- | utests/compiler_workgroup_scan_exclusive.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/utests/compiler_workgroup_scan_exclusive.cpp b/utests/compiler_workgroup_scan_exclusive.cpp index 022e9899..50afdf36 100644 --- a/utests/compiler_workgroup_scan_exclusive.cpp +++ b/utests/compiler_workgroup_scan_exclusive.cpp @@ -200,6 +200,8 @@ static void workgroup_generic(WG_FUNCTION wg_func, */ void compiler_workgroup_scan_exclusive_add_int(void) { + if (!cl_check_ocl20()) + return; cl_int *input = NULL; cl_int *expected = NULL; OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_scan_exclusive", @@ -209,6 +211,8 @@ void compiler_workgroup_scan_exclusive_add_int(void) MAKE_UTEST_FROM_FUNCTION(compiler_workgroup_scan_exclusive_add_int); void compiler_workgroup_scan_exclusive_add_uint(void) { + if (!cl_check_ocl20()) + return; cl_uint *input = NULL; cl_uint *expected = NULL; OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_scan_exclusive", @@ -218,6 +222,8 @@ void compiler_workgroup_scan_exclusive_add_uint(void) MAKE_UTEST_FROM_FUNCTION(compiler_workgroup_scan_exclusive_add_uint); void compiler_workgroup_scan_exclusive_add_long(void) { + if (!cl_check_ocl20()) + return; cl_long *input = NULL; cl_long *expected = NULL; OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_scan_exclusive", @@ -227,6 +233,8 @@ void compiler_workgroup_scan_exclusive_add_long(void) MAKE_UTEST_FROM_FUNCTION_WITH_ISSUE(compiler_workgroup_scan_exclusive_add_long); void compiler_workgroup_scan_exclusive_add_ulong(void) { + if (!cl_check_ocl20()) + return; cl_ulong *input = NULL; cl_ulong *expected = NULL; OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_scan_exclusive", @@ -236,6 +244,8 @@ void compiler_workgroup_scan_exclusive_add_ulong(void) MAKE_UTEST_FROM_FUNCTION_WITH_ISSUE(compiler_workgroup_scan_exclusive_add_ulong); void compiler_workgroup_scan_exclusive_add_float(void) { + if (!cl_check_ocl20()) + return; cl_float *input = NULL; cl_float *expected = NULL; OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_scan_exclusive", @@ -249,6 +259,8 @@ MAKE_UTEST_FROM_FUNCTION(compiler_workgroup_scan_exclusive_add_float); */ void compiler_workgroup_scan_exclusive_max_int(void) { + if (!cl_check_ocl20()) + return; cl_int *input = NULL; cl_int *expected = NULL; OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_scan_exclusive", @@ -258,6 +270,8 @@ void compiler_workgroup_scan_exclusive_max_int(void) MAKE_UTEST_FROM_FUNCTION(compiler_workgroup_scan_exclusive_max_int); void compiler_workgroup_scan_exclusive_max_uint(void) { + if (!cl_check_ocl20()) + return; cl_uint *input = NULL; cl_uint *expected = NULL; OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_scan_exclusive", @@ -267,6 +281,8 @@ void compiler_workgroup_scan_exclusive_max_uint(void) MAKE_UTEST_FROM_FUNCTION(compiler_workgroup_scan_exclusive_max_uint); void compiler_workgroup_scan_exclusive_max_long(void) { + if (!cl_check_ocl20()) + return; cl_long *input = NULL; cl_long *expected = NULL; OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_scan_exclusive", @@ -276,6 +292,8 @@ void compiler_workgroup_scan_exclusive_max_long(void) MAKE_UTEST_FROM_FUNCTION_WITH_ISSUE(compiler_workgroup_scan_exclusive_max_long); void compiler_workgroup_scan_exclusive_max_ulong(void) { + if (!cl_check_ocl20()) + return; cl_ulong *input = NULL; cl_ulong *expected = NULL; OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_scan_exclusive", @@ -285,6 +303,8 @@ void compiler_workgroup_scan_exclusive_max_ulong(void) MAKE_UTEST_FROM_FUNCTION_WITH_ISSUE(compiler_workgroup_scan_exclusive_max_ulong); void compiler_workgroup_scan_exclusive_max_float(void) { + if (!cl_check_ocl20()) + return; cl_float *input = NULL; cl_float *expected = NULL; OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_scan_exclusive", @@ -298,6 +318,8 @@ MAKE_UTEST_FROM_FUNCTION(compiler_workgroup_scan_exclusive_max_float); */ void compiler_workgroup_scan_exclusive_min_int(void) { + if (!cl_check_ocl20()) + return; cl_int *input = NULL; cl_int *expected = NULL; OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_scan_exclusive", @@ -307,6 +329,8 @@ void compiler_workgroup_scan_exclusive_min_int(void) MAKE_UTEST_FROM_FUNCTION(compiler_workgroup_scan_exclusive_min_int); void compiler_workgroup_scan_exclusive_min_uint(void) { + if (!cl_check_ocl20()) + return; cl_uint *input = NULL; cl_uint *expected = NULL; OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_scan_exclusive", @@ -316,6 +340,8 @@ void compiler_workgroup_scan_exclusive_min_uint(void) MAKE_UTEST_FROM_FUNCTION(compiler_workgroup_scan_exclusive_min_uint); void compiler_workgroup_scan_exclusive_min_long(void) { + if (!cl_check_ocl20()) + return; cl_long *input = NULL; cl_long *expected = NULL; OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_scan_exclusive", @@ -325,6 +351,8 @@ void compiler_workgroup_scan_exclusive_min_long(void) MAKE_UTEST_FROM_FUNCTION_WITH_ISSUE(compiler_workgroup_scan_exclusive_min_long); void compiler_workgroup_scan_exclusive_min_ulong(void) { + if (!cl_check_ocl20()) + return; cl_ulong *input = NULL; cl_ulong *expected = NULL; OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_scan_exclusive", @@ -334,6 +362,8 @@ void compiler_workgroup_scan_exclusive_min_ulong(void) MAKE_UTEST_FROM_FUNCTION_WITH_ISSUE(compiler_workgroup_scan_exclusive_min_ulong); void compiler_workgroup_scan_exclusive_min_float(void) { + if (!cl_check_ocl20()) + return; cl_float *input = NULL; cl_float *expected = NULL; OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_scan_exclusive", |