iree icon indicating copy to clipboard operation
iree copied to clipboard

LLVM Integrate compile failure

Open Max191 opened this issue 1 year ago • 2 comments

https://github.com/iree-org/iree/pull/17770 exposed some failures in iree-compile related to unit dim folding caused by https://github.com/llvm/llvm-project/commit/2c06fb899966b49ff0fe4adf55fceb7d1941fbca.

The failure can be seen in this example:

func.func @unit_dim_folding(%arg0: vector<1x1xf32>) -> vector<1x1xf32> {
  %cst = arith.constant dense<0.000000e+00> : vector<1x1xf32>
  %0 = arith.mulf %arg0, %cst : vector<1x1xf32>
  return %0 : vector<1x1xf32>
}

Running iree-opt --pass-pipeline="builtin.module(func.func(iree-llvmcpu-drop-vector-unit-dims))" test.mlir results in:

error: 'arith.mulf' op operand #0 must be floating-point-like, but got 'vector<f32>'
    %0 = arith.mulf %arg0, %cst : vector<1x1xf32>

To reproduce, just cherry-pick the above LLVM commit, and run the above iree-opt command.

Max191 avatar Jul 01 '24 14:07 Max191

cc @banach-space @nujaa the llvm commit is breaking IREE, so we reverted it in our llvm-project fork. We'll need some help to land it to IREE. Can we revert the upstream commit until it's fixed? I can help provide a repro without IREE specifics.

hanhanW avatar Jul 01 '24 17:07 hanhanW

cc @banach-space @nujaa the llvm commit is breaking IREE, so we reverted it in our llvm-project fork. We'll need some help to land it to IREE. Can we revert the upstream commit until it's fixed? I can help provide a repro without IREE specifics.

I'm OK with this being temporarily reverted from MLIR (we don't require it ATM). I also think that I know what the issue is :)

@nujaa, are OK if that is reverted for a few days?

banach-space avatar Jul 01 '24 17:07 banach-space

The upstream commit is reverted in https://github.com/llvm/llvm-project/pull/97652, closing the issue.

hanhanW avatar Jul 03 '24 23:07 hanhanW