cpp_deploy_pack works, but I get the error attached at the bottom for cpp_deploy_normal.
Also, I’m not sure I understand why the program needs both a system-lib, and a .so file. They both get produced from the same lib object in prepoare_test_lib.py, so why are they both needed?
g++ -std=c++11 -O2 -fPIC -I/home/asamara/tvm/include -I/home/asamara/tvm/3rdparty/dmlc-core/include -I/home/asamara/tvm/3rdparty/dlpack/include -o lib/cpp_deploy_normal -ltvm_runtime cpp_deploy.cc lib/test_addone_sys.o -L/home/asamara/tvm/build -lpthread -ldl
/tmp/cc5Tz5aW.o: In functionVerify(tvm::runtime::Module, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)': cpp_deploy.cc:(.text+0x195): undefined reference to
TVMArrayAlloc’ cpp_deploy.cc:(.text+0x1c6): undefined reference toTVMArrayAlloc' cpp_deploy.cc:(.text+0x2ee): undefined reference to
tvm::runtime::ExtTypeVTable::Get(int)’ /tmp/cc5Tz5aW.o: In functiontvm::runtime::TVMRetValue::Clear()': cpp_deploy.cc:(.text._ZN3tvm7runtime11TVMRetValue5ClearEv[_ZN3tvm7runtime11TVMRetValue5ClearEv]+0x73): undefined reference to
tvm::runtime::ExtTypeVTable::Get(int)’ /tmp/cc5Tz5aW.o: In functionmain': cpp_deploy.cc:(.text.startup+0x5a): undefined reference to
tvm::runtime::Module::LoadFromFile(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)’ cpp_deploy.cc:(.text.startup+0x171): undefined reference totvm::runtime::Registry::Get(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' lib/test_addone_sys.o: In function
addonesys’: addonesys:(.text+0x12f): undefined reference toTVMAPISetLastError' lib/test_addone_sys.o: In function
__tvm_module_startup’: addonesys:(.text+0x240): undefined reference toTVMBackendRegisterSystemLibSymbol' addonesys:(.text+0x254): undefined reference to
TVMBackendRegisterSystemLibSymbol’ collect2: error: ld returned 1 exit status Makefile:33: recipe for target ‘lib/cpp_deploy_normal’ failed make: *** [lib/cpp_deploy_normal] Error 1