I am working on adding a unit test for resize operator in relay to onnx conversion.
import tvm
from tvm import relay
from tvm.contrib.target.onnx import to_onnx
x = relay.var("x", shape=(1, 3, 480, 640), dtype="float32")
y = relay.image.resize(x, size=(240, 1280))
f = relay.Function([x], y)
mod = tvm.IRModule()
mod["main"] = f
onnx_model = to_onnx(mod, {}, "test_resize", path=None)
When I run the above code, I get the following error. I can send the full error log if its useful.
.
.
File "/home/tvm/python/tvm/_ffi/_ctypes/packed_func.py", line 237, in __call__
raise get_last_ffi_error()
TypeError: Traceback (most recent call last):
[bt] (4) /home/tvm/build/libtvm.so(TVMFuncCall+0x65) [0x7fd2320f1695]
[bt] (3) /home/tvm/build/libtvm.so(std::_Function_handler<void (tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*), void (*)(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*)>::_M_invoke(std::_Any_data const&, tvm::runtime::TVMArgs&&, tvm::runtime::TVMRetValue*&&)+0x14) [0x7fd2314d50e4]
[bt] (2) /home/tvm/build/libtvm.so(tvm::NodeGetAttr(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*)+0x31e) [0x7fd2314d302e]
[bt] (1) /home/tvm/build/libtvm.so(tvm::ReflectionVTable::GetAttr(tvm::runtime::Object*, tvm::runtime::String const&) const+0x3e0) [0x7fd2314d2840]
[bt] (0) /home/tvm/build/libtvm.so(+0xcc5552) [0x7fd2314d1552]
File "/home/tvm/include/tvm/node/reflection.h", line 390
TypeError: Array is not registered via TVM_REGISTER_NODE_TYPE
How do I register array? And which array - x?