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

Cullen Rhodes llvmlistbot at llvm.org
Mon Nov 20 13:29:15 PST 2023


c-rhodes wrote:

> This PR broke downstream on conversion to SPIR-V. Also looking at this again, I am not sure lowering this to a `vector.shape_cast` is a good idea (sorry I didnt review it as I saw it go by). AFAIK, `shape_casts` are meant to be only for n-D to 1D/ 1D to N-D conversion. So lowering the transpose to a shape-cast here seems to violate that and is causing issues when lowering to SPIR-V specifically. This might need more discussion, but in the meantime can I suggest we revert this (and the follow up that moved it into a canonicalization, which is a bit more problematic in my view cause that is done without any user control).

Sorry to hear it's causing issues. Just looking at the docs for `vector.shape_cast` and although it only mentions rank-reducing / rank-expanding, there's no mention that shape casting between same rank vectors is not allowed?

Please could you provide any more info? There's nothing here that explains what the problem with the lowering is.

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


More information about the Mlir-commits mailing list