[Beignet] [PATCH] revert clCreateCommandQueue* from ocl2.0 back to 1.2 in utests
Guo, Yejun
yejun.guo at intel.com
Mon Nov 28 07:47:50 UTC 2016
since utests is designed to be a general stand-alone application,
it is better to use ocl1.2 version API, otherwise, link error on
some platforms with only ocl1.2.
Signed-off-by: Guo, Yejun <yejun.guo at intel.com>
---
utests/profiling_exec.cpp | 3 +--
utests/utest_helper.cpp | 4 ++--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/utests/profiling_exec.cpp b/utests/profiling_exec.cpp
index 1859134..437a628 100644
--- a/utests/profiling_exec.cpp
+++ b/utests/profiling_exec.cpp
@@ -52,8 +52,7 @@ static void profiling_exec(void)
/* Because the profiling prop, we can not use default queue. */
- const cl_queue_properties properties[] = {CL_QUEUE_PROPERTIES, CL_QUEUE_PROFILING_ENABLE, 0};
- profiling_queue = clCreateCommandQueueWithProperties(ctx, device, properties, &status);
+ profiling_queue = clCreateCommandQueue(ctx, device, CL_QUEUE_PROFILING_ENABLE, &status);
OCL_ASSERT(status == CL_SUCCESS);
OCL_CREATE_KERNEL("compiler_fabs");
diff --git a/utests/utest_helper.cpp b/utests/utest_helper.cpp
index b713b79..f1a4bdd 100644
--- a/utests/utest_helper.cpp
+++ b/utests/utest_helper.cpp
@@ -511,9 +511,9 @@ cl_ocl_init(void)
cl_test_channel_type_string(fmt[i].image_channel_data_type));
/* We are going to push NDRange kernels here */
- queue = clCreateCommandQueueWithProperties(ctx, device, 0, &status);
+ queue = clCreateCommandQueue(ctx, device, 0, &status);
if (status != CL_SUCCESS) {
- fprintf(stderr, "error calling clCreateCommandQueueWithProperties\n");
+ fprintf(stderr, "error calling clCreateCommandQueue\n");
goto error;
}
--
1.9.1
More information about the Beignet
mailing list