This commit adds a pattern to merge accumulator and result
vector.transpose ops into vector.contract. This kind of
pattern can be generated for NCHW convolution vectorization,
where we use transposes to convert the 1-D NCW convolution
into NWC during vectorization. Merging the transpose would
mean we can avoid materialize vector extract/insert for
transposes and it makes further vector level transformations
easier.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp | ||
---|---|---|
1107 | I wonder if we want to fail in case the contractOp has multiple users as it would duplicate the contraction op? |
mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp | ||
---|---|---|
1133 | nit: the code could be simplified a bit by checking inversePermutation(accTMap) != resTMap |
mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp | ||
---|---|---|
1107 | Good point. Done. |
I wonder if we want to fail in case the contractOp has multiple users as it would duplicate the contraction op?