[Mlir-commits] [mlir] [mlir][math] Fix intrinsic conversions to LLVM for 0D-vector types (PR #141020)

Artem Gindinson llvmlistbot at llvm.org
Fri May 23 02:27:20 PDT 2025


AGindinson wrote:

Thanks Andrzej for your detailed feedback!

Firstly, I absolutely should expand my proposal to other lowering patterns – this one in particular was the one showing up in my experiments with the IREE pipeline, but I'll see if I can trigger similar conversion errors through other E2E cases (or just in a LIT mode).

There's clearly a lot of broader context around these scalar pseudo-vectors that I need to wrap my head around. My intuition has been that with mainstream dialect conversion, it should be possible to convert valid IR into valid IR – so until a hypothetical 0D-vec ban is imposed onto the Math specification, we should have at least some way to follow through with compilations.

Within an isolated pipeline, it would make perfect sense to me if Vector's in-house lowering of 0D to scalars took place as early as feasible, before MathToLLVM et al. Is there a way to guarantee that for all user pipelines, though? (Otherwise, the point about conformant IR -> conformant IR lowering requirements comes up again.) For example, would it be an acceptable practice to populate the MathToLLVM pass with Vector dialect-specific patterns?

I'm very keen to resolve the conversion issues in the cleanest possible way, so I'd really appreciate further guidance here. As an MLIR newcomer I haven't grown strong opinions on philosophical Discourses just yet :) So ready to implement anything that improves conformance across dialects rapidly enough.

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


More information about the Mlir-commits mailing list