Skip to content

Conversation

@ahesham-arm
Copy link
Collaborator

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 code CL_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:

Rounding globalSize[0] = 42967 -> 43243
Rounding globalSize[1] = 13 -> 14
T E S T  P A R A M E T E R S :
    Number of dimensions:    2
    Global work group size:    {43243, 14}
    Local work group size:    {256, 1}

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:

Rounding _globalSize[0] = 42967 -> 43008
Rounding _globalSize[1] = 13 -> 14
T E S T  P A R A M E T E R S :
    Number of dimensions:    2
    Global work group size:    {43008, 14}
    Local work group size:    {256, 1}

Adjusted global size is now a multiple of the local size.

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 code `CL_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`:
```
Rounding globalSize[0] = 42967 -> 43243
Rounding globalSize[1] = 13 -> 14
T E S T  P A R A M E T E R S :
    Number of dimensions:    2
    Global work group size:    {43243, 14}
    Local work group size:    {256, 1}
```
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:
```
Rounding _globalSize[0] = 42967 -> 43008
Rounding _globalSize[1] = 13 -> 14
T E S T  P A R A M E T E R S :
    Number of dimensions:    2
    Global work group size:    {43008, 14}
    Local work group size:    {256, 1}
```
Adjusted global size is now a multiple of the local size.

Signed-off-by: Ahmed Hesham <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant