Use target=cuda build model , running a error

Traceback (most recent call last): File “script.py”, line 188, in runmodule(“t2.jpg”) File “script.py”, line 71, in runmodule module.run(data=arrary) File “/home/u260260/mntdisk/virtualenv/tvm/lib/python3.7/site-packages/tvm/contrib/graph_runtime.py”, line 206, in run self._run() File “/home/u260260/mntdisk/virtualenv/tvm/lib/python3.7/site-packages/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] (4) /home/u260260/mntdisk/Cspace/captureframe/conver-tvm/conver1/libtvm.so(TVMFuncCall+0x61) [0x7f70e6dd93b1] [bt] (3) /home/u260260/mntdisk/Cspace/captureframe/conver-tvm/conver1/libtvm.so(tvm::runtime::GraphRuntime::Run()+0x47) [0x7f70e6e60617] [bt] (2) /home/u260260/mntdisk/Cspace/captureframe/conver-tvm/conver1/libtvm.so(+0x1943587) [0x7f70e6e60587] [bt] (1) /home/u260260/mntdisk/Cspace/captureframe/conver-tvm/conver1/libtvm.so(+0x18cdd7a) [0x7f70e6dead7a] [bt] (0) /home/u260260/mntdisk/Cspace/captureframe/conver-tvm/conver1/libtvm.so(dmlc::LogMessageFatal::~LogMessageFatal()+0x61) [0x7f70e606a561] File “/home/u260260/mntdisk/Cspace/captureframe/conver-tvm/tvm/src/runtime/library_module.cc”, line 78 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: ret == 0 (-1 vs. 0) : Assert fail: (2 == tir.tvm_struct_get(arg0, 0, 10)), Argument arg0.device_type has an unsatisfied constraint: (2 == tir.tvm_struct_get(arg0, 0, 10))

What context did you use? tvm.cpu(0) or `tvm.gpu(0)?

I used to have the same error. At that time, the error came from I set wrong context.