From: Pan Xiuli <xiuli....@intel.com>

Workgroup is also an OpenCL 2.0 feature, add check for these cases.
V2: Move check before kernel build

Signed-off-by: Pan Xiuli <xiuli....@intel.com>
---
 utests/compiler_workgroup_broadcast.cpp      | 12 ++++++++++
 utests/compiler_workgroup_reduce.cpp         | 36 ++++++++++++++++++++++++++++
 utests/compiler_workgroup_scan_exclusive.cpp | 32 +++++++++++++++++++++++++
 utests/compiler_workgroup_scan_inclusive.cpp | 32 +++++++++++++++++++++++++
 4 files changed, 112 insertions(+)

diff --git a/utests/compiler_workgroup_broadcast.cpp 
b/utests/compiler_workgroup_broadcast.cpp
index fd2228c..a323fb6 100644
--- a/utests/compiler_workgroup_broadcast.cpp
+++ b/utests/compiler_workgroup_broadcast.cpp
@@ -242,6 +242,8 @@ static void workgroup_generic(WG_BROADCAST wg_broadcast,
  */
 void compiler_workgroup_broadcast_1D_int(void)
 {
+  if (!cl_check_ocl20())
+    return;
   cl_int *input = NULL;
   cl_int *expected = NULL;
   OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_broadcast",
@@ -252,6 +254,8 @@ 
MAKE_UTEST_FROM_FUNCTION(compiler_workgroup_broadcast_1D_int);
 
 void compiler_workgroup_broadcast_1D_long(void)
 {
+  if (!cl_check_ocl20())
+    return;
   cl_long *input = NULL;
   cl_long *expected = NULL;
   OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_broadcast",
@@ -265,6 +269,8 @@ 
MAKE_UTEST_FROM_FUNCTION_WITH_ISSUE(compiler_workgroup_broadcast_1D_long);
  */
 void compiler_workgroup_broadcast_2D_int(void)
 {
+  if (!cl_check_ocl20())
+    return;
   cl_int *input = NULL;
   cl_int *expected = NULL;
   OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_broadcast",
@@ -275,6 +281,8 @@ 
MAKE_UTEST_FROM_FUNCTION(compiler_workgroup_broadcast_2D_int);
 
 void compiler_workgroup_broadcast_2D_long(void)
 {
+  if (!cl_check_ocl20())
+    return;
   cl_long *input = NULL;
   cl_long *expected = NULL;
   OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_broadcast",
@@ -289,6 +297,8 @@ 
MAKE_UTEST_FROM_FUNCTION_WITH_ISSUE(compiler_workgroup_broadcast_2D_long);
  */
 void compiler_workgroup_broadcast_3D_int(void)
 {
+  if (!cl_check_ocl20())
+    return;
   cl_int *input = NULL;
   cl_int *expected = NULL;
   OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_broadcast",
@@ -299,6 +309,8 @@ 
MAKE_UTEST_FROM_FUNCTION(compiler_workgroup_broadcast_3D_int);
 
 void compiler_workgroup_broadcast_3D_long(void)
 {
+  if (!cl_check_ocl20())
+    return;
   cl_long *input = NULL;
   cl_long *expected = NULL;
   OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_broadcast",
diff --git a/utests/compiler_workgroup_reduce.cpp 
b/utests/compiler_workgroup_reduce.cpp
index 21bcfa2..02233a9 100644
--- a/utests/compiler_workgroup_reduce.cpp
+++ b/utests/compiler_workgroup_reduce.cpp
@@ -151,6 +151,8 @@ static void workgroup_generic(WG_FUNCTION wg_func,
                        T* input,
                        T* expected)
 {
+  if (!cl_check_ocl20())
+    return;
   /* input and expected data */
   generate_data(wg_func, input, expected);
 
@@ -219,6 +221,8 @@ static void workgroup_generic(WG_FUNCTION wg_func,
  */
 void compiler_workgroup_any(void)
 {
+  if (!cl_check_ocl20())
+    return;
   cl_int *input = NULL;
   cl_int *expected = NULL;
   OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_reduce",
@@ -228,6 +232,8 @@ void compiler_workgroup_any(void)
 MAKE_UTEST_FROM_FUNCTION(compiler_workgroup_any);
 void compiler_workgroup_all(void)
 {
+  if (!cl_check_ocl20())
+    return;
   cl_int *input = NULL;
   cl_int *expected = NULL;
   OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_reduce",
@@ -240,6 +246,8 @@ MAKE_UTEST_FROM_FUNCTION(compiler_workgroup_all);
  */
 void compiler_workgroup_reduce_add_int(void)
 {
+  if (!cl_check_ocl20())
+    return;
   cl_int *input = NULL;
   cl_int *expected = NULL;
   OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_reduce",
@@ -249,6 +257,8 @@ void compiler_workgroup_reduce_add_int(void)
 MAKE_UTEST_FROM_FUNCTION(compiler_workgroup_reduce_add_int);
 void compiler_workgroup_reduce_add_uint(void)
 {
+  if (!cl_check_ocl20())
+    return;
   cl_uint *input = NULL;
   cl_uint *expected = NULL;
   OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_reduce",
@@ -258,6 +268,8 @@ void compiler_workgroup_reduce_add_uint(void)
 MAKE_UTEST_FROM_FUNCTION(compiler_workgroup_reduce_add_uint);
 void compiler_workgroup_reduce_add_long(void)
 {
+  if (!cl_check_ocl20())
+    return;
   cl_long *input = NULL;
   cl_long *expected = NULL;
   OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_reduce",
@@ -267,6 +279,8 @@ void compiler_workgroup_reduce_add_long(void)
 MAKE_UTEST_FROM_FUNCTION_WITH_ISSUE(compiler_workgroup_reduce_add_long);
 void compiler_workgroup_reduce_add_ulong(void)
 {
+  if (!cl_check_ocl20())
+    return;
   cl_ulong *input = NULL;
   cl_ulong *expected = NULL;
   OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_reduce",
@@ -276,6 +290,8 @@ void compiler_workgroup_reduce_add_ulong(void)
 MAKE_UTEST_FROM_FUNCTION_WITH_ISSUE(compiler_workgroup_reduce_add_ulong);
 void compiler_workgroup_reduce_add_float(void)
 {
+  if (!cl_check_ocl20())
+    return;
   cl_float *input = NULL;
   cl_float *expected = NULL;
   OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_reduce",
@@ -289,6 +305,8 @@ 
MAKE_UTEST_FROM_FUNCTION(compiler_workgroup_reduce_add_float);
  */
 void compiler_workgroup_reduce_max_int(void)
 {
+  if (!cl_check_ocl20())
+    return;
   cl_int *input = NULL;
   cl_int *expected = NULL;
   OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_reduce",
@@ -298,6 +316,8 @@ void compiler_workgroup_reduce_max_int(void)
 MAKE_UTEST_FROM_FUNCTION(compiler_workgroup_reduce_max_int);
 void compiler_workgroup_reduce_max_uint(void)
 {
+  if (!cl_check_ocl20())
+    return;
   cl_uint *input = NULL;
   cl_uint *expected = NULL;
   OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_reduce",
@@ -307,6 +327,8 @@ void compiler_workgroup_reduce_max_uint(void)
 MAKE_UTEST_FROM_FUNCTION(compiler_workgroup_reduce_max_uint);
 void compiler_workgroup_reduce_max_long(void)
 {
+  if (!cl_check_ocl20())
+    return;
   cl_long *input = NULL;
   cl_long *expected = NULL;
   OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_reduce",
@@ -316,6 +338,8 @@ void compiler_workgroup_reduce_max_long(void)
 MAKE_UTEST_FROM_FUNCTION_WITH_ISSUE(compiler_workgroup_reduce_max_long);
 void compiler_workgroup_reduce_max_ulong(void)
 {
+  if (!cl_check_ocl20())
+    return;
   cl_ulong *input = NULL;
   cl_ulong *expected = NULL;
   OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_reduce",
@@ -325,6 +349,8 @@ void compiler_workgroup_reduce_max_ulong(void)
 MAKE_UTEST_FROM_FUNCTION_WITH_ISSUE(compiler_workgroup_reduce_max_ulong);
 void compiler_workgroup_reduce_max_float(void)
 {
+  if (!cl_check_ocl20())
+    return;
   cl_float *input = NULL;
   cl_float *expected = NULL;
   OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_reduce",
@@ -338,6 +364,8 @@ 
MAKE_UTEST_FROM_FUNCTION(compiler_workgroup_reduce_max_float);
  */
 void compiler_workgroup_reduce_min_int(void)
 {
+  if (!cl_check_ocl20())
+    return;
   cl_int *input = NULL;
   cl_int *expected = NULL;
   OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_reduce",
@@ -347,6 +375,8 @@ void compiler_workgroup_reduce_min_int(void)
 MAKE_UTEST_FROM_FUNCTION(compiler_workgroup_reduce_min_int);
 void compiler_workgroup_reduce_min_uint(void)
 {
+  if (!cl_check_ocl20())
+    return;
   cl_uint *input = NULL;
   cl_uint *expected = NULL;
   OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_reduce",
@@ -356,6 +386,8 @@ void compiler_workgroup_reduce_min_uint(void)
 MAKE_UTEST_FROM_FUNCTION(compiler_workgroup_reduce_min_uint);
 void compiler_workgroup_reduce_min_long(void)
 {
+  if (!cl_check_ocl20())
+    return;
   cl_long *input = NULL;
   cl_long *expected = NULL;
   OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_reduce",
@@ -365,6 +397,8 @@ void compiler_workgroup_reduce_min_long(void)
 MAKE_UTEST_FROM_FUNCTION_WITH_ISSUE(compiler_workgroup_reduce_min_long);
 void compiler_workgroup_reduce_min_ulong(void)
 {
+  if (!cl_check_ocl20())
+    return;
   cl_ulong *input = NULL;
   cl_ulong *expected = NULL;
   OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_reduce",
@@ -374,6 +408,8 @@ void compiler_workgroup_reduce_min_ulong(void)
 MAKE_UTEST_FROM_FUNCTION_WITH_ISSUE(compiler_workgroup_reduce_min_ulong);
 void compiler_workgroup_reduce_min_float(void)
 {
+  if (!cl_check_ocl20())
+    return;
   cl_float *input = NULL;
   cl_float *expected = NULL;
   OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_reduce",
diff --git a/utests/compiler_workgroup_scan_exclusive.cpp 
b/utests/compiler_workgroup_scan_exclusive.cpp
index 022e989..853896e 100644
--- a/utests/compiler_workgroup_scan_exclusive.cpp
+++ b/utests/compiler_workgroup_scan_exclusive.cpp
@@ -132,6 +132,8 @@ static void workgroup_generic(WG_FUNCTION wg_func,
                        T* input,
                        T* expected)
 {
+  if (!cl_check_ocl20())
+    return;
   /* input and expected data */
   generate_data(wg_func, input, expected);
 
@@ -200,6 +202,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 +213,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 +224,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 +235,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 +246,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 +261,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 +272,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 +283,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 +294,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 +305,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 +320,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 +331,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 +342,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 +353,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 +364,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",
diff --git a/utests/compiler_workgroup_scan_inclusive.cpp 
b/utests/compiler_workgroup_scan_inclusive.cpp
index 0f65e21..befbd84 100644
--- a/utests/compiler_workgroup_scan_inclusive.cpp
+++ b/utests/compiler_workgroup_scan_inclusive.cpp
@@ -122,6 +122,8 @@ static void workgroup_generic(WG_FUNCTION wg_func,
                        T* input,
                        T* expected)
 {
+  if (!cl_check_ocl20())
+    return;
   /* input and expected data */
   generate_data(wg_func, input, expected);
 
@@ -190,6 +192,8 @@ static void workgroup_generic(WG_FUNCTION wg_func,
  */
 void compiler_workgroup_scan_inclusive_add_int(void)
 {
+  if (!cl_check_ocl20())
+    return;
   cl_int *input = NULL;
   cl_int *expected = NULL;
   OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_scan_inclusive",
@@ -199,6 +203,8 @@ void compiler_workgroup_scan_inclusive_add_int(void)
 MAKE_UTEST_FROM_FUNCTION(compiler_workgroup_scan_inclusive_add_int);
 void compiler_workgroup_scan_inclusive_add_uint(void)
 {
+  if (!cl_check_ocl20())
+    return;
   cl_uint *input = NULL;
   cl_uint *expected = NULL;
   OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_scan_inclusive",
@@ -208,6 +214,8 @@ void compiler_workgroup_scan_inclusive_add_uint(void)
 MAKE_UTEST_FROM_FUNCTION(compiler_workgroup_scan_inclusive_add_uint);
 void compiler_workgroup_scan_inclusive_add_long(void)
 {
+  if (!cl_check_ocl20())
+    return;
   cl_long *input = NULL;
   cl_long *expected = NULL;
   OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_scan_inclusive",
@@ -217,6 +225,8 @@ void compiler_workgroup_scan_inclusive_add_long(void)
 
MAKE_UTEST_FROM_FUNCTION_WITH_ISSUE(compiler_workgroup_scan_inclusive_add_long);
 void compiler_workgroup_scan_inclusive_add_ulong(void)
 {
+  if (!cl_check_ocl20())
+    return;
   cl_ulong *input = NULL;
   cl_ulong *expected = NULL;
   OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_scan_inclusive",
@@ -226,6 +236,8 @@ void compiler_workgroup_scan_inclusive_add_ulong(void)
 
MAKE_UTEST_FROM_FUNCTION_WITH_ISSUE(compiler_workgroup_scan_inclusive_add_ulong);
 void compiler_workgroup_scan_inclusive_add_float(void)
 {
+  if (!cl_check_ocl20())
+    return;
   cl_float *input = NULL;
   cl_float *expected = NULL;
   OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_scan_inclusive",
@@ -239,6 +251,8 @@ 
MAKE_UTEST_FROM_FUNCTION(compiler_workgroup_scan_inclusive_add_float);
  */
 void compiler_workgroup_scan_inclusive_max_int(void)
 {
+  if (!cl_check_ocl20())
+    return;
   cl_int *input = NULL;
   cl_int *expected = NULL;
   OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_scan_inclusive",
@@ -248,6 +262,8 @@ void compiler_workgroup_scan_inclusive_max_int(void)
 MAKE_UTEST_FROM_FUNCTION(compiler_workgroup_scan_inclusive_max_int);
 void compiler_workgroup_scan_inclusive_max_uint(void)
 {
+  if (!cl_check_ocl20())
+    return;
   cl_uint *input = NULL;
   cl_uint *expected = NULL;
   OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_scan_inclusive",
@@ -257,6 +273,8 @@ void compiler_workgroup_scan_inclusive_max_uint(void)
 MAKE_UTEST_FROM_FUNCTION(compiler_workgroup_scan_inclusive_max_uint);
 void compiler_workgroup_scan_inclusive_max_long(void)
 {
+  if (!cl_check_ocl20())
+    return;
   cl_long *input = NULL;
   cl_long *expected = NULL;
   OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_scan_inclusive",
@@ -266,6 +284,8 @@ void compiler_workgroup_scan_inclusive_max_long(void)
 
MAKE_UTEST_FROM_FUNCTION_WITH_ISSUE(compiler_workgroup_scan_inclusive_max_long);
 void compiler_workgroup_scan_inclusive_max_ulong(void)
 {
+  if (!cl_check_ocl20())
+    return;
   cl_ulong *input = NULL;
   cl_ulong *expected = NULL;
   OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_scan_inclusive",
@@ -275,6 +295,8 @@ void compiler_workgroup_scan_inclusive_max_ulong(void)
 
MAKE_UTEST_FROM_FUNCTION_WITH_ISSUE(compiler_workgroup_scan_inclusive_max_ulong);
 void compiler_workgroup_scan_inclusive_max_float(void)
 {
+  if (!cl_check_ocl20())
+    return;
   cl_float *input = NULL;
   cl_float *expected = NULL;
   OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_scan_inclusive",
@@ -288,6 +310,8 @@ 
MAKE_UTEST_FROM_FUNCTION(compiler_workgroup_scan_inclusive_max_float);
  */
 void compiler_workgroup_scan_inclusive_min_int(void)
 {
+  if (!cl_check_ocl20())
+    return;
   cl_int *input = NULL;
   cl_int *expected = NULL;
   OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_scan_inclusive",
@@ -297,6 +321,8 @@ void compiler_workgroup_scan_inclusive_min_int(void)
 MAKE_UTEST_FROM_FUNCTION(compiler_workgroup_scan_inclusive_min_int);
 void compiler_workgroup_scan_inclusive_min_uint(void)
 {
+  if (!cl_check_ocl20())
+    return;
   cl_uint *input = NULL;
   cl_uint *expected = NULL;
   OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_scan_inclusive",
@@ -306,6 +332,8 @@ void compiler_workgroup_scan_inclusive_min_uint(void)
 MAKE_UTEST_FROM_FUNCTION(compiler_workgroup_scan_inclusive_min_uint);
 void compiler_workgroup_scan_inclusive_min_long(void)
 {
+  if (!cl_check_ocl20())
+    return;
   cl_long *input = NULL;
   cl_long *expected = NULL;
   OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_scan_inclusive",
@@ -315,6 +343,8 @@ void compiler_workgroup_scan_inclusive_min_long(void)
 
MAKE_UTEST_FROM_FUNCTION_WITH_ISSUE(compiler_workgroup_scan_inclusive_min_long);
 void compiler_workgroup_scan_inclusive_min_ulong(void)
 {
+  if (!cl_check_ocl20())
+    return;
   cl_ulong *input = NULL;
   cl_ulong *expected = NULL;
   OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_scan_inclusive",
@@ -324,6 +354,8 @@ void compiler_workgroup_scan_inclusive_min_ulong(void)
 
MAKE_UTEST_FROM_FUNCTION_WITH_ISSUE(compiler_workgroup_scan_inclusive_min_ulong);
 void compiler_workgroup_scan_inclusive_min_float(void)
 {
+  if (!cl_check_ocl20())
+    return;
   cl_float *input = NULL;
   cl_float *expected = NULL;
   OCL_CREATE_KERNEL_FROM_FILE("compiler_workgroup_scan_inclusive",
-- 
2.5.0

_______________________________________________
Beignet mailing list
Beignet@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/beignet

Reply via email to