mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
subgroups: fix for testing too large WG sizes (#1620)
It seemed to be a typo; the comment says that it tries to fetch local size for a subgroup count with above max WG size, but it just used the previous subgroup count. The test on purpose sets a SG count to be a larger number than the max work-items in the work group. Given the minimum SG size is 1 WI, it means that there can be a maximum of maximum work-group size of SGs (of 1 WI of size). Thus, if we request a number of SGs that exceeds the local size, the query should fail as expected.
This commit is contained in:
committed by
GitHub
parent
b5f030faa1
commit
8bb89b165c
@@ -188,8 +188,9 @@ int test_sub_group_dispatch(cl_device_id deviceID, cl_context context, cl_comman
|
||||
}
|
||||
}
|
||||
|
||||
// test when input subgroup count exceeds max wg size
|
||||
size_t large_sg_size = kernel_subgroup_count + 1;
|
||||
// test when input subgroup count exceeds max wg size:
|
||||
// there can be at most the local size of (1 WI) subgroups
|
||||
size_t large_sg_size = max_local + 1;
|
||||
error = clGetKernelSubGroupInfo(kernel, deviceID, CL_KERNEL_LOCAL_SIZE_FOR_SUB_GROUP_COUNT, sizeof(size_t), &large_sg_size, sizeof(ret_ndrange1d), &ret_ndrange1d, &realSize);
|
||||
test_error(error, "clGetKernelSubGroupInfo failed for CL_KERNEL_LOCAL_SIZE_FOR_SUB_GROUP_COUNT");
|
||||
if (ret_ndrange1d != 0)
|
||||
|
||||
Reference in New Issue
Block a user