onnx-mlir
onnx-mlir copied to clipboard
Failed to compile ONNX to .so file: "Assertion `map.getNumInputs() == mapOperands.size() && "inconsistent index info"' failed."
How to reproduce error
-
Download onnx file here: https://drive.google.com/file/d/1b1Zq2EJ0KWyCUu3L1XCSDtRdjwYIBq77/view?usp=sharing
-
Install ONNX-MLIR:
# Pull the latest docker image:
$ docker pull onnxmlirczar/onnx-mlir
# Test that it's working
$ git clone https://github.com/onnx/onnx-mlir.git
$ cd onnx-mlir/docker
$ python onnx-mlir.py --help
- Compile ONNX file with ONNX-MLIR:
$ python onnx-mlir.py --O3 --EmitLib resnet_50v1.onnx
Observed behavior
onnx-mlir: /llvm-project/mlir/lib/Dialect/Affine/IR/AffineOps.cpp:2530: static void mlir::AffineLoadOp::build(mlir::OpBuilder&, mlir::OperationState&, mlir::Value, mlir::AffineMap, mlir::ValueRange): Assertion `map.getNumInputs() == mapOperands.size() && "inconsistent index info"' failed.
Unknown error 139
Expected behavior
Generate .so
compiled file from .onnx
file.
System info
- Ubuntu 18.04
- ONNX-MLIR:
$ python onnx-mlir.py --version
onnx-mlir version 0.3.0, onnx version 1.11.0 (https://github.com/onnx/onnx-mlir.git 9c6b1ea393685eda3f78ea064fcb358b5091d778)
LLVM version 15.0.0git (https://github.com/llvm/llvm-project.git f2b94bd7eaa83d853dc7568fac87b1f8bf4ddec6)
Optimized build with assertions.
Default target: x86_64-unknown-linux-gnu
Host CPU: cascadelake
@AlexandreEichenberger after issue https://github.com/onnx/onnx-mlir/issues/1549 was fixed, this issue happened.