[Codegen][MXFP4] Adding SwizzleHintOp alloc flattening pass#23083
Merged
Muzammiluddin-Syed-ECE merged 7 commits intoiree-org:mainfrom Jan 16, 2026
Merged
Conversation
Signed-off-by: Muzammiluddin Syed <muzasyed@amd.com>
Signed-off-by: Muzammiluddin Syed <muzasyed@amd.com>
Signed-off-by: Muzammiluddin Syed <muzasyed@amd.com>
Signed-off-by: Muzammiluddin Syed <muzasyed@amd.com>
kuhar
reviewed
Jan 14, 2026
compiler/src/iree/compiler/Codegen/Common/FlattenSwizzleHintAllocs.cpp
Outdated
Show resolved
Hide resolved
compiler/src/iree/compiler/Codegen/Common/FlattenSwizzleHintAllocs.cpp
Outdated
Show resolved
Hide resolved
compiler/src/iree/compiler/Codegen/Common/FlattenSwizzleHintAllocs.cpp
Outdated
Show resolved
Hide resolved
compiler/src/iree/compiler/Codegen/Common/FlattenSwizzleHintAllocs.cpp
Outdated
Show resolved
Hide resolved
compiler/src/iree/compiler/Codegen/Common/GPU/test/flatten_swizzle_hint_allocs.mlir
Outdated
Show resolved
Hide resolved
compiler/src/iree/compiler/Codegen/Common/GPU/test/flatten_swizzle_hint_allocs.mlir
Outdated
Show resolved
Hide resolved
compiler/src/iree/compiler/Codegen/Common/GPU/test/flatten_swizzle_hint_allocs.mlir
Outdated
Show resolved
Hide resolved
compiler/src/iree/compiler/Codegen/Common/ResolveSwizzleHints.cpp
Outdated
Show resolved
Hide resolved
Signed-off-by: Muzammiluddin Syed <muzasyed@amd.com>
kuhar
reviewed
Jan 14, 2026
compiler/src/iree/compiler/Codegen/Common/test/resolve_swizzle_hints.mlir
Outdated
Show resolved
Hide resolved
compiler/src/iree/compiler/Codegen/Common/FlattenSwizzleHintAllocs.cpp
Outdated
Show resolved
Hide resolved
compiler/src/iree/compiler/Codegen/Common/FlattenSwizzleHintAllocs.cpp
Outdated
Show resolved
Hide resolved
compiler/src/iree/compiler/Codegen/Common/ResolveSwizzleHints.cpp
Outdated
Show resolved
Hide resolved
Signed-off-by: Muzammiluddin Syed <muzasyed@amd.com>
645ea3b to
e98cfef
Compare
Signed-off-by: Muzammiluddin Syed <muzasyed@amd.com>
e98cfef to
00c1c39
Compare
kuhar
reviewed
Jan 15, 2026
krzysz00
approved these changes
Jan 15, 2026
Contributor
krzysz00
left a comment
There was a problem hiding this comment.
lgtm mod the one outstanding comment of Jakub's
kuhar
approved these changes
Jan 15, 2026
keshavvinayak01
pushed a commit
that referenced
this pull request
Jan 27, 2026
This is the first of a series of PRs that together implement support in IREE for XOR swizzling through the SwizzleHintOp. There are four PRs that need to be merged: 1) Allow rank > 1 swizzle hint op operands and add a pass to flatten swizzle hint allocs. 2) Add patterns which can fold reshapes and `extract_slice` ops into empty ops through swizzle hint ops. 3) Add swizzle hint attribute to be set in `lowering_config` and consumed in `GPUPromoteMatmulOperandsPass`. 4) Update `LLVMGPUSelectLoweringStrategy` Pass to set xor swizzles for MXFP4 GEMMs. This is PR 1, which does three things: - Loosens the restriction on SwizzleHintOp inputs needing to be a Shaped type of rank 1. We do this because things are a lot simpler during tiling when you can fold arbitrary shapes into the swizzle hint op and then flatten later. - Introduces a pass to flatten allocs associated to `SwizzleHintOps`. - Moves the verification of flatness of swizzle hint ops to the `ResolveSwizzleHintOps` pass, prior to removal. --------- Signed-off-by: Muzammiluddin Syed <muzasyed@amd.com> Signed-off-by: Keshav Vinayak Jha <keshavvinayakjha@gmail.com>
MaheshRavishankar
pushed a commit
to MaheshRavishankar/iree
that referenced
this pull request
Feb 24, 2026
…#23083) This is the first of a series of PRs that together implement support in IREE for XOR swizzling through the SwizzleHintOp. There are four PRs that need to be merged: 1) Allow rank > 1 swizzle hint op operands and add a pass to flatten swizzle hint allocs. 2) Add patterns which can fold reshapes and `extract_slice` ops into empty ops through swizzle hint ops. 3) Add swizzle hint attribute to be set in `lowering_config` and consumed in `GPUPromoteMatmulOperandsPass`. 4) Update `LLVMGPUSelectLoweringStrategy` Pass to set xor swizzles for MXFP4 GEMMs. This is PR 1, which does three things: - Loosens the restriction on SwizzleHintOp inputs needing to be a Shaped type of rank 1. We do this because things are a lot simpler during tiling when you can fold arbitrary shapes into the swizzle hint op and then flatten later. - Introduces a pass to flatten allocs associated to `SwizzleHintOps`. - Moves the verification of flatness of swizzle hint ops to the `ResolveSwizzleHintOps` pass, prior to removal. --------- Signed-off-by: Muzammiluddin Syed <muzasyed@amd.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the first of a series of PRs that together implement support in IREE for XOR swizzling through the SwizzleHintOp.
There are four PRs that need to be merged:
extract_sliceops into empty ops through swizzle hint ops.lowering_configand consumed inGPUPromoteMatmulOperandsPass.LLVMGPUSelectLoweringStrategyPass to set xor swizzles for MXFP4 GEMMs.This is PR 1, which does three things:
SwizzleHintOps.ResolveSwizzleHintOpspass, prior to removal.