Hi I have a problem when I am trying to import relay from tvm. It is the OSError: tvm/build/libtvm.so: undefined symbol: _ZN4llvm3sys22getDefaultTargetTripleEv. Does anybody have ever came across the same problem ? Thanks.
This looks like it is trying to call into llvm functionality; did you build tvm with llvm support enabled? You can edit the
config.cmake to build with llvm support.
Thanks for the reply, I built tvm with llvm support enabled, which is
And my LLVM version is 8.0.0. I rebuild the tvm, and checked that cmake found LLVM in the configuration. I think tvm is built with llvm.
Is it any possible that this error is because of the newest version of LLVM ? Thanks.
This might due to incompatible ABI between prebuilt LLVM and TVM.
Last time when I saw similar errors, I changed the version of my g++ and the errors disappeared.
Yes, I think you are right. In LLVM-8.0.0, it requires gcc which is later than 5.1, as I use centos 7.6, whose default gcc is 4.8.5, so I install gcc 8.3.2. When I build LLVM, I use gcc 8.3.2, whereas I build TVM using default gcc 4.8.5. Problem is solved by using gcc 8.3.2 to build tvm. Thanks very much for your reply.