[water] Allow sparse bounds dictionaries in read/write wave MLIR ops#899
Merged
martin-luecke merged 3 commits intomainfrom Feb 20, 2026
Merged
[water] Allow sparse bounds dictionaries in read/write wave MLIR ops#899martin-luecke merged 3 commits intomainfrom
martin-luecke merged 3 commits intomainfrom
Conversation
Contributor
|
We can also relax the MLIR modeling and allow for missing entries, in particular if it becomes too costly to maintain bounds or avoid producing unmasked loads when bounds are fully covered. |
666dd4d to
0e6e730
Compare
ftynse
approved these changes
Feb 20, 2026
Contributor
ftynse
left a comment
There was a problem hiding this comment.
Please update the PR name and description, unfortunately github doesn't when the branch is force-pushed and it will take the PR description for the squashed commit.
Comment on lines
556
to
559
| Example: | ||
| ``` | ||
| #wave.read_write_bounds<{M = #wave.expr_list<[BLOCK_M] -> BLOCK_M * 2>}> | ||
| #wave.read_write_bounds<{M = #wave.expr_list<[#wave.symbol<"M">] -> (M)>}> | ||
| ``` |
Contributor
There was a problem hiding this comment.
This is why I usually advise against putting examples in ODS: they bitrot faster than you blink. I had seen PRs where examples were already incorrect :) We can point to the test file for syntax example, but the assembly format below (which is normally included in the generated .md) should be descriptive enough
Signed-off-by: Martin Lücke <martin.luecke@amd.com>
Signed-off-by: Martin Lücke <martin.luecke@amd.com>
0e6e730 to
f2089b3
Compare
Signed-off-by: Martin Lücke <martin.luecke@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.
Relax the WaveReadWriteBoundsAttr verifier to accept sparse bounds dictionaries. The Python pipeline only stores bounds for dimensions that actually need out-of-bounds masking with downstream passes relying on this sparsity. Previously, the MLIR verifier required an entry for every tensor dimension, causing verification failures during emission.
buildMaskin lowering to skip dimensions without a bounds entry instead of asserting.generate_bounds_exprs,merge_contiguous_reads, andlocation_check_passfrom the roundtripexpected_failuresset.