diff --git a/tests/optional_kernel_features/kernel_features_reqd_work_group_size.cpp b/tests/optional_kernel_features/kernel_features_reqd_work_group_size.cpp index 7411553ad..e812412a8 100644 --- a/tests/optional_kernel_features/kernel_features_reqd_work_group_size.cpp +++ b/tests/optional_kernel_features/kernel_features_reqd_work_group_size.cpp @@ -104,9 +104,19 @@ void test_size() { is_exception_expected, expected_errc, queue); } { - RUN_SUBMISSION_CALL_ND_RANGE( - N, Dimensions, is_exception_expected, expected_errc, queue, - [[sycl::reqd_work_group_size(N)]], kname, NO_KERNEL_BODY); + if constexpr (Dimensions == 1) { + RUN_SUBMISSION_CALL_ND_RANGE( + N, Dimensions, is_exception_expected, expected_errc, queue, + [[sycl::reqd_work_group_size(N)]], kname, NO_KERNEL_BODY); + } else if constexpr (Dimensions == 2) { + RUN_SUBMISSION_CALL_ND_RANGE( + N, Dimensions, is_exception_expected, expected_errc, queue, + [[sycl::reqd_work_group_size(N, N)]], kname, NO_KERNEL_BODY); + } else { + RUN_SUBMISSION_CALL_ND_RANGE( + N, Dimensions, is_exception_expected, expected_errc, queue, + [[sycl::reqd_work_group_size(N, N, N)]], kname, NO_KERNEL_BODY); + } } } #endif // !SYCL_CTS_COMPILING_WITH_HIPSYCL