[Mlir-commits] [mlir] [mlir][vector] Add vector.transpose with unit-dim to vector.shape_cast pattern (PR #72105)

Quinn Dawkins llvmlistbot at llvm.org
Fri Nov 24 07:44:48 PST 2023


qedawkins wrote:

Thanks @joker-eph, I think this discussion has been really helpful. Should have taken Lei's advice earlier; I made a discourse post to continue discussion there: https://discourse.llvm.org/t/improving-handling-of-unit-dimensions-in-the-vector-dialect/75216, apologies for contributing to this thread getting long.

> Nitpicking, you likely meant that "there is no general pattern for folding arbitrary shape_cast into a contraction". Because this particular shape cast (or any shape cast that would fit your requirement) definitely can.

Yes, I meant arbitrary, thank you for clarifying here.
 
 > To some extent, this edge case of a "unit dimension" reminds me of how tensor<f32> is modeling a scalar and we had very annoying similar debate about f32 vs tensor<f32> (because special casing is annoying for everyone).
 
 Agree! Let's see if we can come up with something better than what we have now :)

https://github.com/llvm/llvm-project/pull/72105


More information about the Mlir-commits mailing list