forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Use full slices when tiling by the full loop trip count (to support non-monotonic expressions) #468
Merged
Conversation
This file contains 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
josel-amd
force-pushed
the
jose.fix-tiling-problem
branch
from
February 12, 2025 16:25
57008e4
to
e895262
Compare
…op-nest.mlir: The change to not slice when tiling with domain size caused a tensor.extract_slice on %arg1 to disappear. The previous tensor.extract_slice was actually a noop: %extracted_slice_1 = tensor.extract_slice %arg1[0, 0] [12, 25] [1, 1] : tensor<12x25xf32> to tensor<12x25xf32> while %arg1 is defined as: %arg1: tensor<12x25xf32> Since the second operand of the matmul is no longer an extract slice but a block argument the emitted error message also changed.
josel-amd
force-pushed
the
jose.fix-tiling-problem
branch
from
February 13, 2025 08:13
1bc109b
to
390a8e6
Compare
mgehre-amd
reviewed
Feb 13, 2025
mgehre-amd
reviewed
Feb 13, 2025
mgehre-amd
reviewed
Feb 13, 2025
mlir/test/Dialect/Linalg/transform-op-hoist-pad-build-packing-loop-nest.mlir
Outdated
Show resolved
Hide resolved
mgehre-amd
reviewed
Feb 13, 2025
…cking-loop-nest.mlir:" This reverts commit 390a8e6.
mgehre-amd
changed the title
Fix issues with tiling
Use full slices when tiling by the full loop trip count (to support non-monotonic expressions)
Feb 13, 2025
mgehre-amd
reviewed
Feb 13, 2025
josel-amd
force-pushed
the
jose.fix-tiling-problem
branch
from
February 13, 2025 12:23
b02683d
to
78da33c
Compare
josel-amd
commented
Feb 13, 2025
mgehre-amd
approved these changes
Feb 13, 2025
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.
When tiling a chain of linalg.ops, we can only set the tile sizes of the first one to
0
to say untiled, but producers of it will get a tile size of<loop trip count>
.We must return the full slice in those case because the code that computes the slices sizes in the general case doesn't handle non-monotonic affine expressions.
Otherwise we would generate invalid code for non-monotonic expressions even if all involved dimensions are effectively untiled.