Utset: Add check for workgroup tests

Submitted by Pan Xiuli on July 26, 2016, 7:47 a.m.

Details

Message ID 1469519272-5806-1-git-send-email-xiuli.pan@intel.com
State New
Headers show
Series "Utset: Add check for workgroup tests" ( rev: 1 ) in Beignet

Not browsing as part of any series.

Commit Message

Pan Xiuli July 26, 2016, 7:47 a.m.
From: Pan Xiuli <xiuli.pan@intel.com>

Workgroup is also an OpenCL 2.0 feature, add check for these cases.

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

Patch hide | download patch | download mbox

diff --git a/utests/compiler_workgroup_broadcast.cpp b/utests/compiler_workgroup_broadcast.cpp
index fd2228c..8d67efc 100644
--- a/utests/compiler_workgroup_broadcast.cpp
+++ b/utests/compiler_workgroup_broadcast.cpp
@@ -160,6 +160,8 @@  static void workgroup_generic(WG_BROADCAST wg_broadcast,
                        T* input,
                        T* expected)
 {
+  if (!cl_check_ocl20())
+    return;
   uint32_t wg_global_size = 0;
   uint32_t wg_local_size = 0;
 
diff --git a/utests/compiler_workgroup_reduce.cpp b/utests/compiler_workgroup_reduce.cpp
index 21bcfa2..cc05272 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);
 
diff --git a/utests/compiler_workgroup_scan_exclusive.cpp b/utests/compiler_workgroup_scan_exclusive.cpp
index 022e989..6fe9107 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);
 
diff --git a/utests/compiler_workgroup_scan_inclusive.cpp b/utests/compiler_workgroup_scan_inclusive.cpp
index 0f65e21..95e4004 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);