Use target=cuda build model , running a error

Traceback (most recent call last): File “”, line 188, in runmodule(“t2.jpg”) File “”, line 71, in runmodule File “/home/u260260/mntdisk/virtualenv/tvm/lib/python3.7/site-packages/tvm/contrib/”, line 206, in run self._run() File “/home/u260260/mntdisk/virtualenv/tvm/lib/python3.7/site-packages/tvm/_ffi/_ctypes/”, 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/ [0x7f70e6dd93b1] [bt] (3) /home/u260260/mntdisk/Cspace/captureframe/conver-tvm/conver1/ [0x7f70e6e60617] [bt] (2) /home/u260260/mntdisk/Cspace/captureframe/conver-tvm/conver1/ [0x7f70e6e60587] [bt] (1) /home/u260260/mntdisk/Cspace/captureframe/conver-tvm/conver1/ [0x7f70e6dead7a] [bt] (0) /home/u260260/mntdisk/Cspace/captureframe/conver-tvm/conver1/ [0x7f70e606a561] File “/home/u260260/mntdisk/Cspace/captureframe/conver-tvm/tvm/src/runtime/”, 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:

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.