diff options
author | Pekka Jääskeläinen <pekka.jaaskelainen@tuni.fi> | 2024-01-30 19:13:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-30 09:13:22 -0800 |
commit | 8bb89b165c9857a21c4a818b5c81b2f51c448867 (patch) | |
tree | 26118d8d2eb0155e0433442eb3c34f3ec03db7ec | |
parent | b5f030faa1a14782b8e5dbf99aaaa70dd2be662d (diff) | |
download | OpenCL-CTS-8bb89b165c9857a21c4a818b5c81b2f51c448867.tar.gz |
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.
-rw-r--r-- | test_conformance/api/test_sub_group_dispatch.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test_conformance/api/test_sub_group_dispatch.cpp b/test_conformance/api/test_sub_group_dispatch.cpp index 9a3bf959..3375990b 100644 --- a/test_conformance/api/test_sub_group_dispatch.cpp +++ b/test_conformance/api/test_sub_group_dispatch.cpp @@ -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) |