I want to use TVM on my rk3399 board by cross compilation way.
host pc: ubuntu16.04 , mxnet + NNVM +TVM(full) + LLVM
target device (rk3399 board): ubuntu 16.04 , tvm (runtime)
After installing all tools above,I try to deploy TVM Module using C++ ways (not RPC ways) ,then I excute ./run_example.sh on host pc , but I get error ,below:
emel@workpc:~/arm-project/tvm/apps/howto_deploy$ ./run_example.sh
Build the libraries…
g++ -std=c++11 -O2 -fPIC -I/home/emel/arm-project/tvm/include -I/home/emel/arm-project/tvm/include/tvm -I/home/emel/arm-project/tvm/3rdparty/dmlc-core/include -I/home/emel/arm-project/tvm/3rdparty/dlpack/include -o lib/cpp_deploy_normal cpp_deploy.cc lib/test_addone_sys.o -L/home/emel/arm-project/tvm/build -ldl -lpthread -ltvm_runtime
/home/emel/arm-project/tvm/build/libtvm_runtime.so: undefined reference to pthread_create’ /home/emel/arm-project/tvm/build/libtvm_runtime.so: undefined reference to dlopen’
/home/emel/arm-project/tvm/build/libtvm_runtime.so: undefined reference to dlclose’ /home/emel/arm-project/tvm/build/libtvm_runtime.so: undefined reference to dlerror’
/home/emel/arm-project/tvm/build/libtvm_runtime.so: undefined reference to dlsym’ /home/emel/arm-project/tvm/build/libtvm_runtime.so: undefined reference to pthread_setaffinity_np’
collect2: error: ld returned 1 exit status
Makefile:34: recipe for target ‘lib/cpp_deploy_normal’ failed
make: *** [lib/cpp_deploy_normal] Error 1
Run the example
Run the deployment with all in one packed library…
[15:23:58] cpp_deploy.cc:59: Verify dynamic loading from test_addone_dll.so
[15:23:58] cpp_deploy.cc:52: Finish verification…
[15:23:58] cpp_deploy.cc:63: Verify load function from system lib
[15:23:58] cpp_deploy.cc:52: Finish verification…
Run the deployment with all in normal library…
./run_example.sh: line 13: lib/cpp_deploy_normal: No such file or directory
what’s the reason of it? Is there anything left to do ?