-
Notifications
You must be signed in to change notification settings - Fork 83
SWDEV-567545 - Implement block_rank in co-op grid groups #2182
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
base: develop
Are you sure you want to change the base?
Conversation
47c3927 to
c76cada
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements the block_rank() method for cooperative group types (grid_group, multi_grid_group, and thread_block), which returns the rank/index of the block containing the calling thread. The implementation adds both the helper functions and the public API methods, along with a test for grid_group.
Key changes:
- Added
block_rank()implementations in the cooperative groups helper namespace (grid and workgroup) - Exposed
block_rank()API for grid_group, multi_grid_group, and thread_block classes - Added test coverage for grid_group.block_rank()
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| projects/clr/hipamd/include/hip/amd_detail/hip_cooperative_groups_helper.h | Added block_rank() helper functions for grid and workgroup namespaces to compute block linearization |
| projects/clr/hipamd/include/hip/amd_detail/amd_hip_cooperative_groups.h | Exposed block_rank() method in grid_group, multi_grid_group, and thread_block classes |
| projects/hip-tests/catch/unit/cooperativeGrps/grid_group.cc | Added test kernel and validation for grid_group.block_rank() |
| projects/hip-tests/catch/unit/CMakeLists.txt | All subdirectory entries removed except cooperativeGrps (appears to be accidental) |
| projects/hip-tests/catch/include/utils.hh | Test assertion statements commented out (breaks test validation) |
| projects/clr/CHANGELOG.md | Added documentation for the new block_rank() support |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
projects/clr/hipamd/include/hip/amd_detail/amd_hip_cooperative_groups.h
Outdated
Show resolved
Hide resolved
projects/clr/hipamd/include/hip/amd_detail/amd_hip_cooperative_groups.h
Outdated
Show resolved
Hide resolved
projects/clr/hipamd/include/hip/amd_detail/amd_hip_cooperative_groups.h
Outdated
Show resolved
Hide resolved
c798c4a to
265db06
Compare
265db06 to
1bf63e9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1bf63e9 to
15d7233
Compare
Motivation
To implement block_rank feature
Technical Details
block_rank() is callable from grid group
JIRA ID
SWDEV-567545
Test Plan
Test written in this PR
Test Result
Test pass
Submission Checklist