Use highest OpenCL C version (#1081)

* Set the highest supported OpenCL C version.

* Remove gDeviceLt20 variable - not used anymore.

* Fix formatting issues
This commit is contained in:
Grzegorz Wawiorko
2021-01-11 14:54:19 +01:00
committed by GitHub
parent f02cbad2e3
commit 2597027737
53 changed files with 247 additions and 165 deletions

View File

@@ -89,9 +89,9 @@ int test_enqueue_profiling(cl_device_id device, cl_context context,
cl_event kernel_event;
err_ret = create_single_kernel_helper_with_build_options(
context, &program, &kernel, 1, &enqueue_multi_level,
"enqueue_multi_level", "-cl-std=CL2.0");
err_ret = create_single_kernel_helper(context, &program, &kernel, 1,
&enqueue_multi_level,
"enqueue_multi_level");
if (check_error(err_ret, "Create single kernel failed")) return -1;
res_mem = clCreateBuffer(context, CL_MEM_READ_WRITE | CL_MEM_COPY_HOST_PTR,

View File

@@ -1,6 +1,6 @@
//
// Copyright (c) 2017 The Khronos Group Inc.
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
@@ -184,7 +184,11 @@ int test_host_multi_queue(cl_device_id device, cl_context context, cl_command_qu
global = 16;
}
err_ret |= create_single_kernel_helper_with_build_options(context, &program[i], &kernel[i], sources_multi_queue_block[i].num_lines, sources_multi_queue_block[i].lines, sources_multi_queue_block[i].kernel_name, "-cl-std=CL2.0");
err_ret |= create_single_kernel_helper(
context, &program[i], &kernel[i],
sources_multi_queue_block[i].num_lines,
sources_multi_queue_block[i].lines,
sources_multi_queue_block[i].kernel_name);
if(check_error(err_ret, "Create single kernel failed")) { res = -1; break; }
mem[i] = clCreateBuffer(context, CL_MEM_READ_WRITE | CL_MEM_COPY_HOST_PTR, sizeof(kernel_results), kernel_results, &err_ret);

View File

@@ -1,6 +1,6 @@
//
// Copyright (c) 2017 The Khronos Group Inc.
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
@@ -133,10 +133,14 @@ int test_host_queue_order(cl_device_id device, cl_context context, cl_command_qu
cl_event kernel_event;
err_ret = create_single_kernel_helper_with_build_options(context, &program1, &kernel1, arr_size(enqueue_block_first_kernel), enqueue_block_first_kernel, "enqueue_block_first_kernel", "-cl-std=CL2.0");
err_ret = create_single_kernel_helper(
context, &program1, &kernel1, arr_size(enqueue_block_first_kernel),
enqueue_block_first_kernel, "enqueue_block_first_kernel");
if(check_error(err_ret, "Create single kernel failed")) return -1;
err_ret = create_single_kernel_helper_with_build_options(context, &program2, &kernel2, arr_size(enqueue_block_second_kernel), enqueue_block_second_kernel, "enqueue_block_second_kernel", "-cl-std=CL2.0");
err_ret = create_single_kernel_helper(
context, &program2, &kernel2, arr_size(enqueue_block_second_kernel),
enqueue_block_second_kernel, "enqueue_block_second_kernel");
if(check_error(err_ret, "Create single kernel failed")) return -1;
res_mem = clCreateBuffer(context, CL_MEM_READ_WRITE|CL_MEM_COPY_HOST_PTR, sizeof(kernel_results), kernel_results, &err_ret);

View File

@@ -1,6 +1,6 @@
//
// Copyright (c) 2017 The Khronos Group Inc.
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
@@ -40,7 +40,8 @@ int run_n_kernel_args(cl_context context, cl_command_queue queue, const char** s
cl_uint i;
size_t ret_len;
err_ret = create_single_kernel_helper_with_build_options(context, &program, &kernel, num_lines, source, kernel_name, "-cl-std=CL2.0");
err_ret = create_single_kernel_helper(context, &program, &kernel, num_lines,
source, kernel_name);
if(check_error(err_ret, "Create single kernel failed")) return -1;
mem = clCreateBuffer(context, CL_MEM_READ_WRITE | CL_MEM_USE_HOST_PTR, res_size, results, &err_ret);