mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Use max work item size instead (#2294)
The test is using CL_DEVICE_MAX_WORK_GROUP_SIZE as first dimension of local work size. But it can be bigger than the first dimension of CL_DEVICE_MAX_WORK_ITEM_SIZEs which results in failure. This patch corrects it to query and use the first dimension of CL_DEVICE_MAX_WORK_ITEM_SIZES instead. Signed-off-by: Xing Huang <xing.huang@arm.com>
This commit is contained in:
@@ -102,10 +102,13 @@ REGISTER_TEST_VERSION(sub_group_dispatch, Version(2, 1))
|
|||||||
out = clCreateBuffer(context, CL_MEM_READ_WRITE | CL_MEM_ALLOC_HOST_PTR, sizeof(size_t), NULL, &error);
|
out = clCreateBuffer(context, CL_MEM_READ_WRITE | CL_MEM_ALLOC_HOST_PTR, sizeof(size_t), NULL, &error);
|
||||||
test_error(error, "clCreateBuffer failed");
|
test_error(error, "clCreateBuffer failed");
|
||||||
|
|
||||||
error = clGetDeviceInfo(device, CL_DEVICE_MAX_WORK_GROUP_SIZE,
|
size_t max_work_item_sizes[3] = {};
|
||||||
sizeof(size_t), &max_local, NULL);
|
error = clGetDeviceInfo(device, CL_DEVICE_MAX_WORK_ITEM_SIZES,
|
||||||
|
sizeof(max_work_item_sizes), &max_work_item_sizes,
|
||||||
|
nullptr);
|
||||||
test_error(error, "clGetDeviceInfo failed");
|
test_error(error, "clGetDeviceInfo failed");
|
||||||
|
|
||||||
|
max_local = max_work_item_sizes[0];
|
||||||
|
|
||||||
error = clGetDeviceInfo(device, CL_DEVICE_PLATFORM, sizeof(platform),
|
error = clGetDeviceInfo(device, CL_DEVICE_PLATFORM, sizeof(platform),
|
||||||
(void *)&platform, NULL);
|
(void *)&platform, NULL);
|
||||||
|
|||||||
Reference in New Issue
Block a user