[Codegen][GPU] Move hoisting to interface and add it for barrier ops#23519
Merged
Groverkss merged 3 commits intoiree-org:mainfrom Feb 24, 2026
Merged
[Codegen][GPU] Move hoisting to interface and add it for barrier ops#23519Groverkss merged 3 commits intoiree-org:mainfrom
Groverkss merged 3 commits intoiree-org:mainfrom
Conversation
Contributor
Author
|
Depends on #23518 , please only review the top commit |
nirvedhmeshram
approved these changes
Feb 19, 2026
7b08191 to
e40ef2a
Compare
krzysz00
reviewed
Feb 23, 2026
Contributor
krzysz00
left a comment
There was a problem hiding this comment.
Interface lgtm, curious about where those extra unit dimensions came from and if they'll break any pattern matches later down the line
compiler/src/iree/compiler/Codegen/LLVMGPU/test/ROCDL/pipeline_igemm_tile_and_fuse.mlir
Show resolved
Hide resolved
hanhanW
approved these changes
Feb 24, 2026
Contributor
hanhanW
left a comment
There was a problem hiding this comment.
Partially Approve. The move of interface looks reasonable to me, thanks for the ping on reviews!
e40ef2a to
3b87539
Compare
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.
iree_gpu.barrier_region ops prevent hoisting and only resolve after bufferization. This means that before bufferization, we effectively cannot do any hoisting from loops because they are usually in a barrier region. After bufferization, it's extremely hard to figure out if we can do hoisting because of side effects.
This leads to better codegen in general in TileAndFuse pipeline, generating better barriers in general, because the barrier region is much more restricted. This was manually verified.
The test changes in igemm pipeline are mainly the test being wrong earlier, it was matching some private memory load, instead of the shared memory loads. There was bad barrier placement before this patch because the barrier regions were capturing everything, leading to an extra barrier which got matched.
The patch also moves the hoisting implementation to an interface. This is required, otherwise all codegen patterns start depending on iree gpu dialect, which shouldn't be the case for non gpu code.