-
Notifications
You must be signed in to change notification settings - Fork 556
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
base: main
Are you sure you want to change the base?
Add workgroup chipletgroup strategy to workgroup reordering pass #17811
Conversation
Signed-off-by: Bangtian Liu <liubangtian@gmail.com>
Signed-off-by: Bangtian Liu <liubangtian@gmail.com>
compiler/src/iree/compiler/Codegen/Common/GPU/WorkgroupReordering.cpp
Outdated
Show resolved
Hide resolved
compiler/src/iree/compiler/Codegen/Common/GPU/WorkgroupReordering.cpp
Outdated
Show resolved
Hide resolved
compiler/src/iree/compiler/Codegen/Common/GPU/WorkgroupReordering.cpp
Outdated
Show resolved
Hide resolved
compiler/src/iree/compiler/Codegen/Common/GPU/WorkgroupReordering.cpp
Outdated
Show resolved
Hide resolved
compiler/src/iree/compiler/Codegen/Common/GPU/WorkgroupReordering.cpp
Outdated
Show resolved
Hide resolved
compiler/src/iree/compiler/Codegen/Dialect/GPU/IR/IREEGPUAttrs.td
Outdated
Show resolved
Hide resolved
compiler/src/iree/compiler/Codegen/LLVMGPU/LLVMGPULowerExecutableTarget.cpp
Outdated
Show resolved
Hide resolved
compiler/src/iree/compiler/Codegen/LLVMGPU/LLVMGPULowerExecutableTarget.cpp
Show resolved
Hide resolved
compiler/src/iree/compiler/Codegen/LLVMGPU/test/ROCDL/config_user_vector_distribute.mlir
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>
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 |
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.
not addressed
compiler/src/iree/compiler/Codegen/Common/GPU/WorkgroupReordering.cpp
Outdated
Show resolved
Hide resolved
Signed-off-by: Bangtian Liu <liubangtian@gmail.com>
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.
Just some remaining issues with comments. Looks good otherwise.
compiler/src/iree/compiler/Codegen/Common/GPU/WorkgroupReordering.cpp
Outdated
Show resolved
Hide resolved
compiler/src/iree/compiler/Codegen/Common/GPU/WorkgroupReordering.cpp
Outdated
Show resolved
Hide resolved
compiler/src/iree/compiler/Codegen/Common/GPU/WorkgroupReordering.cpp
Outdated
Show resolved
Hide resolved
compiler/src/iree/compiler/Codegen/Common/GPU/WorkgroupReordering.cpp
Outdated
Show resolved
Hide resolved
compiler/src/iree/compiler/Codegen/Common/GPU/WorkgroupReordering.cpp
Outdated
Show resolved
Hide resolved
compiler/src/iree/compiler/Codegen/Common/GPU/WorkgroupReordering.cpp
Outdated
Show resolved
Hide resolved
compiler/src/iree/compiler/Codegen/Dialect/GPU/IR/IREEGPUAttrs.td
Outdated
Show resolved
Hide resolved
Signed-off-by: Bangtian Liu <liubangtian@gmail.com>
compiler/src/iree/compiler/Codegen/Common/GPU/WorkgroupReordering.cpp
Outdated
Show resolved
Hide resolved
compiler/src/iree/compiler/Codegen/Common/GPU/WorkgroupReordering.cpp
Outdated
Show resolved
Hide resolved
// 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. |
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.
Not addressed.
Signed-off-by: Bangtian Liu <liubangtian@gmail.com>
compiler/src/iree/compiler/Codegen/Common/GPU/WorkgroupReordering.cpp
Outdated
Show resolved
Hide resolved
Signed-off-by: Bangtian Liu <liubangtian@gmail.com>
Signed-off-by: Bangtian Liu <liubangtian@gmail.com>
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.
LGTM with a few comment/naming nits
compiler/src/iree/compiler/Codegen/Common/GPU/WorkgroupReordering.cpp
Outdated
Show resolved
Hide resolved
compiler/src/iree/compiler/Codegen/Common/GPU/WorkgroupReordering.cpp
Outdated
Show resolved
Hide resolved
compiler/src/iree/compiler/Codegen/Common/GPU/WorkgroupReordering.cpp
Outdated
Show resolved
Hide resolved
compiler/src/iree/compiler/Codegen/Common/GPU/WorkgroupReordering.cpp
Outdated
Show resolved
Hide resolved
compiler/src/iree/compiler/Codegen/Common/GPU/WorkgroupReordering.cpp
Outdated
Show resolved
Hide resolved
compiler/src/iree/compiler/Codegen/Dialect/GPU/IR/IREEGPUAttrs.td
Outdated
Show resolved
Hide resolved
Signed-off-by: Bangtian Liu <liubangtian@gmail.com>
Signed-off-by: Bangtian Liu <liubangtian@gmail.com>
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.
LGTM
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.
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>
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.