Fix test_non_uniform_work_group on devices that do no support it #2598
+42
−44
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On devices that do not support non-uniform workgroups, the test was using incorrect round-up values for the global work group sizes. The global work group sizes were round up such that they are multiples of the local sizes, but those local sizes were later adjusted, in the call to
prepareDevice, causing the test to (correctly) fail with the error codeCL_INVALID_WORK_GROUP_SIZE, because the global work group sizes are no longer multiples of the local ones.Example log before the fix, running
non_uniform_2d_basic:Note how the adjusted global size (43243) is not a multiple of the adjusted local size (256).
Example log after the fix, running the same test:
Adjusted global size is now a multiple of the local size.