-
Notifications
You must be signed in to change notification settings - Fork 641
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
[LinalgExt] Update scatter to allow dropping unit dims #19704
base: main
Are you sure you want to change the base?
Conversation
92776de
to
dc05f7a
Compare
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.
No obvious issues with the verifier changes to me. Haven't looked at the rest of the changes but can take a look once ready for a full review.
compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/test/convert_to_loops.mlir
Show resolved
Hide resolved
compiler/src/iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.cpp
Outdated
Show resolved
Hide resolved
compiler/src/iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.cpp
Outdated
Show resolved
Hide resolved
compiler/src/iree/compiler/Dialect/LinalgExt/IR/LinalgExtOps.cpp
Outdated
Show resolved
Hide resolved
const auto originalSliceRank = originalType.getRank() - indexDepth; | ||
if (originalSliceRank < 0) { | ||
return op->emitOpError( | ||
"expected original rank to be greater or equal to index depth"); |
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.
Maybe this error should be more explicit in terms of slize rank being >= 0.
compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/ReshapeFusion.cpp
Outdated
Show resolved
Hide resolved
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.
Looks ok overall. Is there a sequencing thing that you dropped the implementation of the DropScatter*Unit*
? Your message says so above, so assuming its just a sequencing thing. If you do want to drop it, just drop it from the pattern list completely and add it back later instead of making the implementation dummy.
Signed-off-by: Ian Wood <[email protected]>
also change expected result for e2e correctness (maybe delete?) Signed-off-by: Ian Wood <[email protected]>
Signed-off-by: Ian Wood <[email protected]>
Signed-off-by: Ian Wood <[email protected]>
Signed-off-by: Ian Wood <[email protected]>
Yeah sorry that was confusing. The pattern I added and the one I deleted are 2 separate ones (the pre-existing one is a noop because there can no longer be unit dims between |
Signed-off-by: Ian Wood <[email protected]>
Running onnx tests https://github.com/nod-ai/SHARK-TestSuite/actions/runs/12816694583 |
Signed-off-by: Ian Wood <[email protected]>
Changes
scatter
to enforce thatupdates
is only batch dims + contiguous slice. This allows us to drop fold the unit dimension fromindices
when index_depth is 1.