[Mlir-commits] [mlir] [mlir][vector] Add verification for incorrect vector.extract (PR #115824)
Andrzej Warzyński
llvmlistbot at llvm.org
Tue Nov 26 06:50:38 PST 2024
banach-space wrote:
> Reducing the number of representations for 1-element vectors won't help -- all the SPIR-V conversions check for is whether something became a scalar or not.
Understood. This suggests that such changes would be neutral from the SPIR-V perspective?
> We could make the conversion happen somewhere higher up the stack (e.g., when going to arith/vector), but we'd most likely run into the same issues higher up the stack.
Agreed - we can’t completely avoid the issue. However, the current approach allows for a lot of ambiguity and places the burden on the `Vector` (dialect) to handle it. It might be worth exploring whether restricting the `Vector` (dialect) itself could reduce complexity. Of course, if this ends up creating too much pressure on other parts of the stack (like `Arith`), we’d know this path isn't viable. But until someone experiments with it, we won’t have a clear answer.
In my view, the original restriction proposed here feels like a step in that direction. That said, I agree that it would be better to separate this into a dedicated PR to better evaluate its impact across the pipeline.
https://github.com/llvm/llvm-project/pull/115824
More information about the Mlir-commits
mailing list