I’m trying to run gluon resnet18 model on Android/Linux armv7 using relayvm runtime.
After the compilation I got two files - model.ro and model.so
Model runner inits the model with the following code: (the last statement fails)
std::string model_lib_path = "./model.so";
std::string model_ro_path = "./model.ro";
std::string code_data = LoadFileToString(model_ro_path, std::ios::in | std::ios::binary);
tvm::runtime::Module model_lib = tvm::runtime::Module::LoadFromFile(model_lib_path);
tvm::runtime::Module vm_executable_ = tvm::runtime::vm::Executable::Load(code_data, model_lib);
auto vm = tvm::runtime::make_object<tvm::runtime::vm::VirtualMachine>();
vm->LoadExecutable(static_cast<tvm::runtime::vm::Executable*>(
const_cast<tvm::runtime::Object*>(vm_executable_.get())));
Error:
terminating with uncaught exception of type dmlc::Error: [17:24:02] /home/pivovaa/workplace/tvm/src/runtime/vm/vm.cc:281: Check failed: pf != nullptr: Cannot find function in module:
/buildbot/src/android/ndk-release-r21/external/libcxx/../../external/libcxxabi/src/abort_message.cpp:72: abort_message: assertion "terminating with uncaught exception of type dmlc::Error: [17:24:02] /home/pivovaa/workplace/tvm/src/runtime/vm/vm.cc:281: Check failed: pf != nullptr: Cannot find function in module: " failed
Aborted
Error Line: src/runtime/vm/vm.cc:281