InternalError: Check failed: type_code_ == kDLDevice (8 vs. 6) : expected DLDevice but got Object

I am trying to load a compiled model I have saved as follows:

target = tvm.target.cuda()
lib = tvm.runtime.load_module("compiled.tar")

I then try to make a graph executor as follows:

module = GraphModule(lib["default"](target))

However, I get the above error. How do I troubleshoot this?

Try

module = GraphModule(lib["default"](tvm.cuda()))
1 Like

Yes, this works. Thank you