Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show iterations grouped by GPU thread and block #26165

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

vasslitvinov
Copy link
Member

Exends the test of @gpu.itersPerThread with a utility function that groups loop iterations by thread and block that execute them. For example:

numIndices 32  itersPerThread 5  blockSize 3  gridSize 3  block
bl th | iters
 0  0 |  1  2  3  4  5 .
 0  1 |  6  7  8  9 10 .
 0  2 | 11 12 13 14 15 .
 1  0 | 16 17 18 19 20 .
 1  1 | 21 22 23 24 25 .
 1  2 | 26 27 28 29 30 .
 2  0 | 31 32 .
 2  1 | .
 2  2 | .

numIndices 32  itersPerThread 5  blockSize 3  gridSize 3  cyclic
bl th | iters
 0  0 |  1  8 15 22 29 .
 0  1 |  2  9 16 23 30 .
 0  2 |  3 10 17 24 31 .
 1  0 |  4 11 18 25 32 .
 1  1 |  5 12 19 26 .
 1  2 |  6 13 20 27 .
 2  0 |  7 14 21 28 .
 2  1 | .
 2  2 | .

Also extends sanity checks.

Test enhancement. Not reviewed.

@vasslitvinov vasslitvinov merged commit 83fd096 into chapel-lang:main Oct 29, 2024
7 checks passed
@vasslitvinov vasslitvinov deleted the gpu-iter-thread-view branch October 29, 2024 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant