tvm
tvm copied to clipboard
[Bug] an ONNX model after compiling with TVM is inconsistent with ONNXRuntime
Expected behavior
When feed the same input into the same model, one in TVM, another in ONNXRuntime, we supposed that their results are the same.
Actual behavior
TVM's result is not aligned with ONNXRuntime's (the shape of output tensor is different).
ONNXRuntime:
[array([[ 2.6177902 , 1. , -0.873482 , 1.9409859 , 1.766757 ,
-0.53547204, -0.16376647, 0.4463795 , 1.7661378 , 1.9461765 ,
1.2478232 , 1.899035 ]], dtype=float32)]
TVM:
[[ 2.6177902 1. -0.873482 1.9409859 1.766757 -0.53547204
-0.16376647 0.4463795 1.7661378 1.9461765 -0.436741 0.97049296
0.8833785 -0.26773602 -0.08188324 0.22318976 0.8830689 0.97308826]]
Environment
TVM v0.9
Steps to reproduce
- set up Python 3 environment with TVM(v0.9), numpy, onnx, onnxruntime
- Download bug-no1.zip
-
python check.py