[Mlir-commits] [mlir] [mlir][vector] Fix a crash in `VectorExtractOpConversion` (PR #115717)

Diego Caballero llvmlistbot at llvm.org
Mon Nov 11 19:30:10 PST 2024


dcaballe wrote:

Sorry, I think we've discussed this before and I may not be providing consistent feedback but the more I think about this the more I think this is not correct and a footgun in terms of introducing ambiguity in the IR. The fact that these ops implement the infer type interface doesn't mean that all the inferred possibilities are valid for all the cases. We should add a hand-written verification rule to make sure that if we want to extract a scalar from a 2-D vector, two indices are provided.

A `0-D` and a `vector<1xf32` are equivalent types but a `f32` is not. They all essentially represent the same thing but vectors and scalars belong to different domains.



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


More information about the Mlir-commits mailing list