Similar to the existing pattern for reodering cast(transpose),
this makes transpose following transpose and increases the chance
of embedding the transposition inside contraction op. Actually
cast ops are just special instances of elementwise ops.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp | ||
---|---|---|
1067 | Should this use the ElementwiseMappable OpTrait instead? |
mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp | ||
---|---|---|
1067 | ElementwiseMappable is not a "concrete" OpTrait; it's all of Elementwise, Vectorizable, Tensorizable, and Scalarizable: https://github.com/llvm/llvm-project/blob/09c2b7c35af8c4bad39f03e9f60df8bd07323028/mlir/lib/IR/Operation.cpp#L1118 So I'm not sure we can specialize using it at all? Besides, I don't think we need Scalarizable and Tensorizable here given we only concern vectors here? |
mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp | ||
---|---|---|
1067 | ah right, then what you want is Elementwise here? |
mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp | ||
---|---|---|
1067 | Changed. Though I think both works here, given Vectorizable is Elementwise + systematically vectorizable. For elementwise ops working on vectors, the second part should be true. |
Should this use the ElementwiseMappable OpTrait instead?