mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Dynamically Select -cl-std Option (#879)
* Dynamically select the `-cl-std` option on the basic `sizeof` and `wg_barrier` tests to be one of `CL1.X`, `CL2.0` or `CL3.0`. Use the most recent CL C standard supported on the device.
This commit is contained in:
@@ -49,13 +49,8 @@ cl_int get_type_size( cl_context context, cl_command_queue queue, const char *ty
|
||||
{
|
||||
sizeof_kernel_code[0] = "#pragma OPENCL EXTENSION cl_khr_fp16 : enable\n";
|
||||
}
|
||||
bool deviceLt20 = false;
|
||||
Version version = get_device_cl_version(device);
|
||||
if (version < Version(2,0)) {
|
||||
deviceLt20 = true;
|
||||
}
|
||||
|
||||
cl_int err = create_single_kernel_helper_with_build_options(context, &p, &k, 4, sizeof_kernel_code, "test_sizeof", deviceLt20 ? "" : "-cl-std=CL2.0");
|
||||
cl_int err = create_single_kernel_helper_with_build_options(
|
||||
context, &p, &k, 4, sizeof_kernel_code, "test_sizeof", nullptr);
|
||||
if( err )
|
||||
return err;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user