Hi there,
I tried to deploy the TVM with C/C++ API based on Deploy TVM Module using C++ API. I have followed the guide to build up TVM and run the ./run_example.sh
to create the lib file with *.so
in it. But when I tried to run cpp_deploy_normal
and cpp_deploy_pack
with the linked libtvm_runtime.so, I came across an error:
[12:37:10] cpp_deploy.cc:79: Verify dynamic loading from test_addone_dll.so
[12:37:10] cpp_deploy.cc:71: Finish verification...
[12:37:10] cpp_deploy.cc:83: Verify load function from system lib
terminate called after throwing an instance of 'tvm::runtime::InternalError'
what(): [12:37:10] cpp_deploy.cc:36:
---------------------------------------------------------------
An error occurred during the execution of TVM.
For more information, please see: https://tvm.apache.org/docs/errors.html
---------------------------------------------------------------
Check failed: (f != nullptr) is false:
Stack trace:
0: Verify(tvm::runtime::Module, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)
1: DeploySingleOp()
2: main
3: __libc_start_main
at ../csu/libc-start.c:308
4: _start
5: 0xffffffffffffffff
It seems like there is something wrong with the DeploySingleOp()
with the wrong Verify(mod_syslib, "add_one_sys")
. I then checked if “add_one_sys” existed after I make lib/cpp_deploy_normal
, which showed that it did exist with lib/test_addone_sys.o
. So I think it might probably something wrong with tvm::runtime::Registry::Get("runtime.SystemLib")
or so. Does anyone have an idea how to solve it?
Many thanks!