[Relay][Frontend][ONNX] /runtime/graph/graph_runtime.cc: TVMError

Hi tvm experts,

I am working on implementing the ConstantOfShape operator for frontend/onnx, but, the work is stuck with the error message as below, I would appreciate if you could guide me to get rid of it.

many thanks,

Source code: [WIP][Relay][Frontend][ONNX] operator support: ConstantOfShape

Error message:

Traceback (most recent call last):

File “/Users/root/tvm/tests/python/frontend/onnx/test_forward.py”, line 1382, in
test_constantofshape()

File “/Users/root/tvm/tests/python/frontend/onnx/test_forward.py”, line 1332, in test_constantofshape
verify_constantofshape(x, y, out_value=value)

File “/Users/root/tvm/tests/python/frontend/onnx/test_forward.py”, line 1322, in verify_constantofshape
tvm_out = get_tvm_output(model, indata, target, ctx, outdata.shape)

File “/Users/root/tvm/tests/python/frontend/onnx/test_forward.py”, line 63, in get_tvm_output
m.set_input(input_names, tvm.nd.array(input_data.astype(input_data.dtype)))

File “/Users/root/tvm/python/tvm/contrib/graph_runtime.py”, line 149, in set_input
self._get_input(key).copyfrom(value)

File “/Users/root/tvm/python/tvm/_ffi/_ctypes/function.py”, line 210, in call
raise get_last_ffi_error()

tvm._ffi.base.TVMError: Traceback (most recent call last):
[bt] (4) 5 ??? 0x00007fff58836e30 0x0 + 140734678396464
[bt] (3) 4 _ctypes.cpython-37m-darwin.so 0x0000000107ca235f ffi_call_unix64 + 79
[bt] (2) 3 libtvm.dylib 0x000000011fe999f8 TVMFuncCall + 72
[bt] (1) 2 libtvm.dylib 0x000000011fede8c2 std::__1::__function::__func<tvm::runtime::GraphRuntime::GetFunction(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::shared_ptrtvm::runtime::ModuleNode const&)::$_7, std::__1::allocator<tvm::runtime::GraphRuntime::GetFunction(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::shared_ptrtvm::runtime::ModuleNode const&)::$_7>, void (tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*)>::operator()(tvm::runtime::TVMArgs&&, tvm::runtime::TVMRetValue*&&) + 450
[bt] (0) 1 libtvm.dylib 0x000000011f4bc7f9 dmlc::LogMessageFatal::~LogMessageFatal() + 57
File “/Users/root/tvm/src/runtime/graph/graph_runtime.cc”, line 450
TVMError: Check failed: in_idx >= 0 (-1 vs. 0) :

1 Like