[DISCUSS] cpp_deploy did not work in system module mode

HI, I just follow the cpp deploy tutorial. I’ve succeed in dynamic loading,but failed with loadind function from system lib.

which it failed to find the function of ‘addonesys’ from the SystemLib.

void Verify(tvm::runtime::Module mod, std::string fname) {
  // Get the function from the module.
  tvm::runtime::PackedFunc f = mod.GetFunction(fname);
  ICHECK(f != nullptr);
...
} 

....
tvm::runtime::Module mod_syslib = (*tvm::runtime::Registry::Get("runtime.SystemLib"))();
Verify(mod_syslib, "addonesys");

I did not change any code in howto_deploy. My steps for building the tvm runtime:

  1. follow the tutorial of build from source
  2. modify config.cmake:
set(USE_LLVM /some/path/to/llvm-13.0.0/bin/llvm-config)
  1. run example:
cd apps/howto_deploy
./run_example.sh

Is there anything I missed? Why can’t it find the function of ‘addonesys’?

1 Like

Hello,

I experienced the same issue. Did you find the solution? I am using a Mac M1 machine.

Not exactly… Still just work with dynamic library loading… Confusing… :confounded: