[Beignet] [PATCH] Utset: Add check for workgroup tests
Xiuli Pan
xiuli.pan at intel.com
Tue Jul 26 07:47:52 UTC 2016
From: Pan Xiuli <xiuli.pan at intel.com>
Workgroup is also an OpenCL 2.0 feature, add check for these cases.
Signed-off-by: Pan Xiuli <xiuli.pan at 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(+)
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);
--
2.5.0
More information about the Beignet
mailing list