luyaor opened a new issue #8890: URL: https://github.com/apache/tvm/issues/8890
## Description When compiling following model with TVM, it will error on parsing. I think the reason is similar to https://github.com/apache/tvm/issues/8889 . Because Squeeze operation in ONNX specification make some changes from previous version to current version (move split from attributes to inputs). <img width="744" alt="image" src="https://user-images.githubusercontent.com/7541296/131554297-e22bff9f-9c3d-44da-9abd-edc3e0fe844f.png"> The model(with ONNX as frontend) with error is as follows, check bug.onnx in [bug10.zip](https://github.com/apache/tvm/files/7085956/bug10.zip) ## Error Log ``` Traceback (most recent call last): File "doublecheck.py", line 40, in <module> mod, params = relay.frontend.from_onnx(onnx_model, shape_dict) File "/Users/luyaor/Documents/tvm/python/tvm/relay/frontend/onnx.py", line 2806, in from_onnx mod, params = g.from_onnx(graph, opset, freeze_params) File "/Users/luyaor/Documents/tvm/python/tvm/relay/frontend/onnx.py", line 2613, in from_onnx op = self._convert_operator(op_name, inputs, attr, opset) File "/Users/luyaor/Documents/tvm/python/tvm/relay/frontend/onnx.py", line 2721, in _convert_operator sym = convert_map[op_name](inputs, attrs, self._params) File "/Users/luyaor/Documents/tvm/python/tvm/relay/frontend/common.py", line 430, in __call__ return get_relay_op(op_name)(*inputs, **new_attrs) File "/Users/luyaor/Documents/tvm/python/tvm/relay/op/transform.py", line 153, in squeeze return _make.squeeze(data, axis) File "/Users/luyaor/Documents/tvm/python/tvm/_ffi/_ctypes/packed_func.py", line 237, in __call__ raise get_last_ffi_error() tvm._ffi.base.TVMError: Traceback (most recent call last): [bt] (6) 7 ??? 0x00007ffee09b9e70 0x0 + 140732666715760 [bt] (5) 6 libffi.7.dylib 0x000000010fd58ead ffi_call_unix64 + 85 [bt] (4) 5 libtvm.dylib 0x00000001373950b6 TVMFuncCall + 70 [bt] (3) 4 libtvm.dylib 0x0000000136f716d7 void tvm::runtime::TypedPackedFunc<tvm::RelayExpr (tvm::RelayExpr, tvm::runtime::Array<tvm::Integer, void>)>::AssignTypedLambda<tvm::RelayExpr (*)(tvm::RelayExpr, tvm::runtime::Array<tvm::Integer, void>)>(tvm::RelayExpr (*)(tvm::RelayExpr, tvm::runtime::Array<tvm::Integer, void>))::'lambda'(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*)::operator()(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*) const + 487 [bt] (2) 3 libtvm.dylib 0x00000001366ad36e tvm::runtime::TVMMovableArgValue_::operator tvm::runtime::Array<tvm::Integer, void><tvm::runtime::Array<tvm::Integer, void>, void>() const + 158 [bt] (1) 2 libtvm.dylib 0x00000001366ad8c6 tvm::runtime::Array<tvm::Integer, void> tvm::runtime::TVMPODValue_::AsObjectRef<tvm::runtime::Array<tvm::Integer, void> >() const + 1222 [bt] (0) 1 libtvm.dylib 0x0000000136525c6f dmlc::LogMessageFatal::~LogMessageFatal() + 111 File "/Users/luyaor/Documents/tvm/include/tvm/runtime/packed_func.h", line 1405 TVMError: --------------------------------------------------------------- An internal invariant was violated during the execution of TVM. Please read TVM's error reporting guidelines. More details can be found here: https://discuss.tvm.ai/t/error-reporting/7793. --------------------------------------------------------------- Check failed: ObjectTypeChecker<TObjectRef>::Check(ptr) == false: Expect Array[IntImm] but get relay.Var ``` ## How to reproduce ``` python check.py ``` ### Environment Python3, with tvm, onnx tvm version: [`c31e338`](https://github.com/apache/tvm/commit/c31e338d5f98a8e8c97286c5b93b20caee8be602) Wed Dec 9 14:52:58 2020 +0900 1. Download [bug10.zip](https://github.com/apache/tvm/files/7085956/bug10.zip) 2. Run `python check.py`. Hi [@jwfromm](https://github.com/jwfromm) , please check it out! Thanks! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
