Skip to content

Conversation

@jiabaxie
Copy link
Contributor

@jiabaxie jiabaxie commented Dec 4, 2025

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

Copilot AI review requested due to automatic review settings December 4, 2025 21:55
@jiabaxie jiabaxie requested review from a team as code owners December 4, 2025 21:55
@jiabaxie jiabaxie force-pushed the amd/dev/jiabaxie/SWDEV-567545 branch from 47c3927 to c76cada Compare December 4, 2025 21:59
Copilot finished reviewing on behalf of jiabaxie December 4, 2025 22:00
Copy link
Contributor

Copilot AI left a 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.

@jiabaxie jiabaxie force-pushed the amd/dev/jiabaxie/SWDEV-567545 branch from c798c4a to 265db06 Compare December 4, 2025 22:44
@jiabaxie jiabaxie requested a review from Copilot December 4, 2025 22:46
@jiabaxie jiabaxie force-pushed the amd/dev/jiabaxie/SWDEV-567545 branch from 265db06 to 1bf63e9 Compare December 4, 2025 22:48
Copilot finished reviewing on behalf of jiabaxie December 4, 2025 22:50
Copy link
Contributor

Copilot AI left a 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.

@jiabaxie jiabaxie force-pushed the amd/dev/jiabaxie/SWDEV-567545 branch from 1bf63e9 to 15d7233 Compare December 4, 2025 22:55
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.

2 participants