tvm
tvm copied to clipboard
[Bug] TVM errors with an ONNX model (probably related to Resize Operation)
trafficstars
When compiling following ONNX model with TVM, the compiler fails with errors. I think it is probably related to the Resize operation.
Traceback (most recent call last):
File "check.py", line 27, in <module>
mod, params = relay.frontend.from_onnx(onnx_model, {})
File "/Users/luyaor/Documents/different_tvm/tvm-0.9/python/tvm/relay/frontend/onnx.py", line 5807, in from_onnx
mod, params = g.from_onnx(graph, opset)
File "/Users/luyaor/Documents/different_tvm/tvm-0.9/python/tvm/relay/frontend/onnx.py", line 5477, in from_onnx
self._construct_nodes(graph)
File "/Users/luyaor/Documents/different_tvm/tvm-0.9/python/tvm/relay/frontend/onnx.py", line 5596, in _construct_nodes
op = fold_constant(op)
File "/Users/luyaor/Documents/different_tvm/tvm-0.9/python/tvm/relay/frontend/common.py", line 511, in fold_constant
return _transform.FoldConstantExpr(node, mod)
File "/Users/luyaor/Documents/different_tvm/tvm-0.9/python/tvm/relay/transform/transform.py", line 280, in FoldConstantExpr
return _ffi_api.FoldConstantExpr(expr, mod, fold_qnn)
File "/Users/luyaor/Documents/different_tvm/tvm-0.9/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] (8) 9 libtvm.dylib 0x0000000116747150 tvm::transform::Pass::operator()(tvm::IRModule, tvm::transform::PassContext const&) const + 688
[bt] (7) 8 libtvm.dylib 0x000000011674911c tvm::transform::SequentialNode::operator()(tvm::IRModule, tvm::transform::PassContext const&) const + 604
[bt] (6) 7 libtvm.dylib 0x0000000116747150 tvm::transform::Pass::operator()(tvm::IRModule, tvm::transform::PassContext const&) const + 688
[bt] (5) 6 libtvm.dylib 0x0000000116747c7c tvm::transform::ModulePassNode::operator()(tvm::IRModule, tvm::transform::PassContext const&) const + 828
[bt] (4) 5 libtvm.dylib 0x0000000117ad0af1 tvm::runtime::PackedFuncObj::Extractor<tvm::runtime::PackedFuncSubObj<void tvm::runtime::TypedPackedFunc<tvm::IRModule (tvm::IRModule, tvm::transform::PassContext)>::AssignTypedLambda<tvm::relay::transform::InferType()::$_2>(tvm::relay::transform::InferType()::$_2)::'lambda'(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*)> >::Call(tvm::runtime::PackedFuncObj const*, tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) + 1729
[bt] (3) 4 libtvm.dylib 0x0000000117abeb55 tvm::relay::TypeInferencer::Infer(tvm::GlobalVar, tvm::relay::Function) + 133
[bt] (2) 3 libtvm.dylib 0x000000011787996a tvm::relay::TypeSolver::Solve() + 1658
[bt] (1) 2 libtvm.dylib 0x00000001163d81b9 tvm::runtime::detail::LogFatal::Entry::Finalize() + 89
[bt] (0) 1 libtvm.dylib 0x0000000117e5ff48 tvm::runtime::Backtrace() + 24
[bt] (8) 9 libtvm.dylib 0x0000000117ad0af1 tvm::runtime::PackedFuncObj::Extractor<tvm::runtime::PackedFuncSubObj<void tvm::runtime::TypedPackedFunc<tvm::IRModule (tvm::IRModule, tvm::transform::PassContext)>::AssignTypedLambda<tvm::relay::transform::InferType()::$_2>(tvm::relay::transform::InferType()::$_2)::'lambda'(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*)> >::Call(tvm::runtime::PackedFuncObj const*, tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) + 1729
[bt] (7) 8 libtvm.dylib 0x0000000117abeb55 tvm::relay::TypeInferencer::Infer(tvm::GlobalVar, tvm::relay::Function) + 133
[bt] (6) 7 libtvm.dylib 0x000000011787979c tvm::relay::TypeSolver::Solve() + 1196
[bt] (5) 6 libtvm.dylib 0x0000000117879d13 tvm::TypedEnvFunc<bool (tvm::runtime::Array<tvm::Type, void> const&, int, tvm::Attrs const&, tvm::TypeReporter const&)>::operator()(tvm::runtime::Array<tvm::Type, void> const&, int, tvm::Attrs const&, tvm::TypeReporter const&) const + 403
[bt] (4) 5 libtvm.dylib 0x00000001168ffa74 tvm::runtime::PackedFuncObj::Extractor<tvm::runtime::PackedFuncSubObj<void tvm::runtime::TypedPackedFunc<bool (tvm::runtime::Array<tvm::Type, void> const&, int, tvm::Attrs const&, tvm::TypeReporter const&)>::AssignTypedLambda<bool (*)(tvm::runtime::Array<tvm::Type, void> const&, int, tvm::Attrs const&, tvm::TypeReporter const&)>(bool (*)(tvm::runtime::Array<tvm::Type, void> const&, int, tvm::Attrs const&, tvm::TypeReporter const&))::'lambda'(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*)> >::Call(tvm::runtime::PackedFuncObj const*, tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) + 20
[bt] (3) 4 libtvm.dylib 0x00000001168ffea5 void tvm::runtime::TypedPackedFunc<bool (tvm::runtime::Array<tvm::Type, void> const&, int, tvm::Attrs const&, tvm::TypeReporter const&)>::AssignTypedLambda<bool (*)(tvm::runtime::Array<tvm::Type, void> const&, int, tvm::Attrs const&, tvm::TypeReporter const&)>(bool (*)(tvm::runtime::Array<tvm::Type, void> const&, int, tvm::Attrs const&, tvm::TypeReporter const&))::'lambda'(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*)::operator()(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*) const + 1061
[bt] (2) 3 libtvm.dylib 0x0000000117476530 tvm::relay::Resize1DRel(tvm::runtime::Array<tvm::Type, void> const&, int, tvm::Attrs const&, tvm::TypeReporter const&) + 1008
[bt] (1) 2 libtvm.dylib 0x00000001163d81b9 tvm::runtime::detail::LogFatal::Entry::Finalize() + 89
[bt] (0) 1 libtvm.dylib 0x0000000117e5ff48 tvm::runtime::Backtrace() + 24
File "/Users/luyaor/Documents/different_tvm/tvm-0.9/src/relay/analysis/type_solver.cc", line 624
TVMError:
---------------------------------------------------------------
An error occurred during the execution of TVM.
For more information, please see: https://tvm.apache.org/docs/errors.html
---------------------------------------------------------------
Check failed: (false) is false: [18:26:50] /Users/luyaor/Documents/different_tvm/tvm-0.9/src/relay/op/image/resize.cc:72:
---------------------------------------------------------------
An error occurred during the execution of TVM.
For more information, please see: https://tvm.apache.org/docs/errors.html
---------------------------------------------------------------
Check failed: (param->roi.size() == 2) is false:
Environment
TVM v0.9
Steps to reproduce
- set up Python 3 environment with TVM(v0.9), numpy, onnx, onnxruntime
- Download bug-no2.zip
- python check.py