mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Use CL_KERNEL_WORK_GROUP_SIZE more often (#2435)
Drivers _may_ choose to advertise values for `CL_DEVICE_MAX_WORK_GROUP_SIZE` or `CL_DEVICE_MAX_WORK_ITEM_SIZES` that kernels without a `reqd_work_group_size` are not able to be launched with. The CTS should therefore make sure that the local_size passed to `clEnqueueNDRangeKernel` does not exceed `CL_KERNEL_WORK_GROUP_SIZE` This fixes it up in two places I've noticed this not happening.
This commit is contained in:
@@ -108,7 +108,11 @@ REGISTER_TEST_VERSION(sub_group_dispatch, Version(2, 1))
|
||||
nullptr);
|
||||
test_error(error, "clGetDeviceInfo failed");
|
||||
|
||||
max_local = max_work_item_sizes[0];
|
||||
error = clGetKernelWorkGroupInfo(kernel, device, CL_KERNEL_WORK_GROUP_SIZE,
|
||||
sizeof(max_local), &max_local, nullptr);
|
||||
test_error(error, "clGetKernelWorkGroupInfo failed");
|
||||
|
||||
max_local = std::min(max_local, max_work_item_sizes[0]);
|
||||
|
||||
error = clGetDeviceInfo(device, CL_DEVICE_PLATFORM, sizeof(platform),
|
||||
(void *)&platform, NULL);
|
||||
|
||||
Reference in New Issue
Block a user