Canonicalizations for subtensor operations defaulted to use the
rank-reduced version of the operation, but the cast inserted to get
back the original type would be illegal if the rank was actually
reduced. Instead make the canonicalization not reduce the rank of the
operation.
Instead add patterns to convert the subtensor and subtensor_insert
operation to their rank-reduced version to DropUnitDims pass.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Dialect/Linalg/Transforms/DropUnitDims.cpp | ||
---|---|---|
550–565 ↗ | (On Diff #340361) | Do we need Optional here? I think we using the size of the vector to check is good enough, and you never return llvm::None in the function. |
mlir/lib/Dialect/Linalg/Transforms/DropUnitDims.cpp | ||
---|---|---|
550–565 ↗ | (On Diff #340361) | I'd keep the Optional. Its a more robust way to return that the required reassociation could not be computed. |
Comment Actions
Dropping the patterns that introduced rank-reduced versions of
subtensor and subtensor_insert. They need to be supported on the
SPIR-V backend.
s/subtensor/subview