[Mlir-commits] [mlir] [MLIR] VectorToLLVM: Fix vector.insert conversion for 0-D vectors, and add a test (PR #128810)
Benoit Jacob
llvmlistbot at llvm.org
Tue Feb 25 19:54:34 PST 2025
bjacob wrote:
@MaheshRavishankar , @kuhar , @jsjodin , @krzysz00 , this seems to actually fix the issue that I was trying earlier to fix in https://github.com/llvm/llvm-project/pull/128203.
What I am trying to do is enable usage of ROCm device lib functions for all math functions by disabling polynomial approximations and instead preserving math ops as-is until MathToROCDL. What I was missing earlier is that some math functions are purposely not handled by MathToROCDL because they don't have a target ROCm device library function, because the intended lowering is to a LLVM intrinsics, in MathToLLVM. That is the case of math.log and math.exp for element type f32. Earlier, I was misinterpreting the failure to match in MathToROCDL as the problem. Instead, it was working-as-intended that it was failing, and it always was MathToLLVM that was handling it, correctly rewriting as an intrinsic.
The conversion that was leading to the unrealized_conversion_cast that I was seeing was not a conversion of a math op, but for the next op in the source IR which was a vector.insert.
https://github.com/llvm/llvm-project/pull/128810
More information about the Mlir-commits
mailing list