[Mlir-commits] [mlir] [mlir][vector] Add vector.transpose with unit-dim to vector.shape_cast pattern (PR #72105)
Mehdi Amini
llvmlistbot at llvm.org
Wed Nov 22 00:21:51 PST 2023
joker-eph wrote:
I also look at it the other way, "what is the more canonical form that performs the exact same operation?":
1) `%1 = vector.transpose %0 [1, 0] : vector<1x4xf32> to vector<4x1xf32>`
2) `%1 = vector.shape_cast : vector<1x4xf32> to vector<4x1xf32>`
Do you believe that 1 is more canonical than 2?
Considering that `vector.shape_cast` is an operation that is more restrictive than `vector.transpose` and provide better guarantees (no data movement), I would wage that 2) is a winner here.
https://github.com/llvm/llvm-project/pull/72105
More information about the Mlir-commits
mailing list