Open bjacob opened 3 months ago
Thanks for the report! Unfortunately as-is it isn’t immediately actionable upstream: any chance you can extract the IR before the conversion pass and attach it here to make it reproducible?
Here is the IR I started debugging with: https://gist.github.com/ScottTodd/667be2ac5e23bb0efbebb319bc3cb5b9
I suspect this is an issue with our downstream usage, but I'm not sure. Quoting from my comment downtream:
Removing
LLVM::FMAOp
from thetarget.addIllegalOp<...>
block inmlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
fixes compilation. I suggest debugging around https://github.com/iree-org/iree/blob/1ee68bdd0d8d3c8f3f51d13845b4c8eb3fc24990/compiler/src/iree/compiler/Codegen/LLVMGPU/ConvertToNVVM.cpp#L133-L151
Still not a self-contained mlir-opt
repro as this still relies on iree-opt
, but at least it's down to a pass application, no longer a full iree-compile
:
https://gist.github.com/bjacob/ff3c0425d063c3938a750ff09cadd448
Minimized testcase (still iree-opt
) showing that the issue is specific to math.fma
ops on vector
types that have rank >= 2. The issue is that in that case, there is a missing type conversion between !llvm.array<4 x vector<1xf32>>
and vector<4x1xf32>
.
Note: it doesn't matter that the additional dimension is a unit dim. The result is the same with 4x2xf32
.
https://gist.github.com/bjacob/5b2fe816ac992119f4bd17d4d5f4d08a
https://github.com/iree-org/iree is a downstream with a
third_party/llvm-project
submodule tracking upstream with daily syncs.The last sync, https://github.com/iree-org/iree/pull/18019, had to locally revert #99890 to temporarily fix compilation failures.
Details in https://github.com/iree-org/iree/pull/18010#issuecomment-2253215720 and more details in this Discord chat.
@ScottTodd @runseny @joker-eph