[Mlir-commits] [mlir] [mlir][vector] Make `TransposeOpLowering` configurable (PR #73915)
Diego Caballero
llvmlistbot at llvm.org
Thu Nov 30 02:56:30 PST 2023
dcaballe wrote:
> No, there's no way to represent this with vector.extract/insert, due to scalability it'd need a loop.
Ouch! Not sure why I expected `vector.extract_strided_slide` to be able to do the `[4]x1 -> [4]` trick but that's not legal.
> For the issue we're trying to solve though it looks like we could add a fold `transpose(shape_cast)` to `shape_cast`. As we're seeing:
I think the source of the problem is that SPIRV-V can't currently handle `shape_cast` in general, regardless of where it's coming from. Nicolas pointed at the shape cast [lowering patterns](https://github.com/llvm/llvm-project/blob/437a48b2d9bfc6e38a0ca43f1cee48ceaf0fe249/mlir/lib/Dialect/Vector/Transforms/LowerVectorShapeCast.cpp#L354-L359) that we use for LLVM and mentioned that they should also work for SPIR-V. Maybe we could give that a try?
https://github.com/llvm/llvm-project/pull/73915
More information about the Mlir-commits
mailing list