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

Add workgroup chipletgroup strategy to workgroup reordering pass #17811

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

bangtianliu
Copy link
Contributor

A new option, "chipletgroup," has been added to the existing options {none, swizzle, transpose}, making it {none, swizzle, transpose, chipletgroup}.

The new attribute #iree_gpu.reorder_workgroups has been introduced. You can refer to the IR test file (e.g., config_user_vector_distribute.mlir) to learn how to enable workgroup reordering in the configuration entries.

Signed-off-by: Bangtian Liu <liubangtian@gmail.com>
Signed-off-by: Bangtian Liu <liubangtian@gmail.com>
Signed-off-by: Bangtian Liu <liubangtian@gmail.com>
Signed-off-by: Bangtian Liu <liubangtian@gmail.com>
Signed-off-by: Bangtian Liu <liubangtian@gmail.com>
@bangtianliu
Copy link
Contributor Author

Added a new attribute about number of XCDs on GPUs, but still need to check this pass's correctness futher

Signed-off-by: Bangtian Liu <liubangtian@gmail.com>
makeChipletGroupedIds(Location loc, OpBuilder b, Value workgroupIdX,
Value workgroupIdY, Value workgroupCountX,
Value workgroupCountY, unsigned chipletGroupTile) {
// Create one dimension ID for workgroup
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not addressed

Signed-off-by: Bangtian Liu <liubangtian@gmail.com>
Copy link
Member

@kuhar kuhar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some remaining issues with comments. Looks good otherwise.

Signed-off-by: Bangtian Liu <liubangtian@gmail.com>
// Step 1: Reorder the workgroup grid to move slowly between
// chiplet groups (Function: chipletAwareWorkgroupReordering).
// Step 2: Implement 'super-grouping' of workgroups before switching to the next
// column.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not addressed.

compiler/src/iree/compiler/Codegen/LLVMGPU/Passes.cpp Outdated Show resolved Hide resolved
compiler/src/iree/compiler/Codegen/LLVMGPU/Passes.cpp Outdated Show resolved Hide resolved
Signed-off-by: Bangtian Liu <liubangtian@gmail.com>
Signed-off-by: Bangtian Liu <liubangtian@gmail.com>
Signed-off-by: Bangtian Liu <liubangtian@gmail.com>
Copy link
Contributor

@qedawkins qedawkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a few comment/naming nits

Signed-off-by: Bangtian Liu <liubangtian@gmail.com>
Signed-off-by: Bangtian Liu <liubangtian@gmail.com>
Copy link
Contributor

@qedawkins qedawkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@kuhar kuhar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for all the fixes

Signed-off-by: Bangtian Liu <liubangtian@gmail.com>
Signed-off-by: Bangtian Liu <liubangtian@gmail.com>
Signed-off-by: Bangtian Liu <liubangtian@gmail.com>
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.

None yet

3 participants