summaryrefslogtreecommitdiff
path: root/utests/builtin_sub_group_size.cpp
diff options
context:
space:
mode:
authorPan Xiuli <xiuli.pan@intel.com>2016-06-16 05:55:24 +0800
committerYang Rong <rong.r.yang@intel.com>2016-07-15 18:25:06 +0800
commite606e2da5445e3103f5d106d0582d18a755e45a9 (patch)
treecd0e223bb72493ce16949ba68243476acb583e21 /utests/builtin_sub_group_size.cpp
parent41020e3d184117ba4f81a49d07c7e0c3bbdeddc8 (diff)
downloadbeignet-e606e2da5445e3103f5d106d0582d18a755e45a9.tar.gz
Utest: Add check for cl_intel_subgroups extension tests
These tests can only run with cl_intel_subgroups extension, add check before runing the tests. Also refine the call of the extension API with function pointer. V2: Use clGetExtensionFunctionAddress to get extension API function Signed-off-by: Pan Xiuli <xiuli.pan@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
Diffstat (limited to 'utests/builtin_sub_group_size.cpp')
-rw-r--r--utests/builtin_sub_group_size.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/utests/builtin_sub_group_size.cpp b/utests/builtin_sub_group_size.cpp
index 1dc24edb..7f7c3e46 100644
--- a/utests/builtin_sub_group_size.cpp
+++ b/utests/builtin_sub_group_size.cpp
@@ -13,6 +13,8 @@ Now define local and global size as following:
#include "utest_helper.hpp"
static void builtin_sub_group_size(void)
{
+ if(!cl_check_subgroups())
+ return;
// Setup kernel and buffers
size_t dim, i,local_sz = 1,buf_len = 1;
@@ -40,7 +42,7 @@ static void builtin_sub_group_size(void)
locals[i - 1] = 0;
}
- OCL_CALL(clGetKernelSubGroupInfoKHR,kernel,device,CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE_KHR,sizeof(size_t)*dim,locals,sizeof(size_t),&max_sub_sz,NULL);
+ OCL_CALL(utestclGetKernelSubGroupInfoKHR,kernel,device,CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE_KHR,sizeof(size_t)*dim,locals,sizeof(size_t),&max_sub_sz,NULL);
// Run the kernel
OCL_NDRANGE( dim );
clFinish(queue);