[Beignet] [PATCH] revert clCreateCommandQueue* from ocl2.0 back to 1.2 in utests
Yang, Rong R
rong.r.yang at intel.com
Wed Nov 30 08:54:24 UTC 2016
LGTM, pushed, thanks.
> -----Original Message-----
> From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of
> Guo, Yejun
> Sent: Monday, November 28, 2016 15:48
> To: beignet at lists.freedesktop.org
> Cc: Guo, Yejun <yejun.guo at intel.com>
> Subject: [Beignet] [PATCH] revert clCreateCommandQueue* from ocl2.0
> back to 1.2 in utests
>
> 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
>
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/beignet
More information about the Beignet
mailing list