Hi,
I met an error on ‘remote.load_module( )’ function. I am trying to run a model using Snapdragon’s GPU, so I set the target like this,
target = tvm.target.Target(“opencl -device=mali”, host=“llvm -mtriple=arm64-linux-android”)
After build the model,
with tvm.transform.PassContext(opt_level=3):
lib = relay.build_module.build(mod, target=target, params=params)
Then, set the device, upload and load the module
ctx = remote.device(str(target), 0)
remote.upload(lib_fname)
rlib = remote.load_module("net.so")
The error occured at the point like this,
>Traceback (most recent call last):
File "trial4_android_opencl.py", line 254, in <module>
rlib = remote.load_module("net.so")
File "/workspace/python/tvm/rpc/client.py", line 161, in load_module
return _ffi_api.LoadRemoteModule(self._sess, path)
File "/workspace/python/tvm/_ffi/_ctypes/packed_func.py", line 237, in __call__
raise get_last_ffi_error()
tvm._ffi.base.TVMError: Traceback (most recent call last):
5: TVMFuncCall
4: std::_Function_handler<void (tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*), void tvm::runtime::TypedPackedFunc<tvm::runtime::Module (tvm::runtime::Module, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)>::AssignTypedLambda<tvm::runtime::{lambda(tvm::runtime::Module, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)#5}>(tvm::runtime::{lambda(tvm::runtime::Module, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)#5}, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)::{lambda(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*)#1}>::_M_invoke(std::_Any_data const&, tvm::runtime::TVMArgs&&, tvm::runtime::TVMRetValue*&&)
3: _ZNSt17_Function_handlerIFvN3tvm7runtime7TVMArgsEPNS1_1
2: tvm::runtime::RPCWrappedFunc::operator()(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) const
1: tvm::runtime::RPCClientSession::CallFunc(void*, TVMValue const*, int const*, int, std::function<void (tvm::runtime::TVMArgs)> const&)
0: tvm::runtime::RPCEndpoint::CallFunc(void*, TVMValue const*, int const*, int, std::function<void (tvm::runtime::TVMArgs)>)
File "/workspace/src/runtime/rpc/rpc_endpoint.cc", line 797
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: (code == RPCCode::kReturn) is false: code=1
What is the problem on this error?