[conda] [tvm-py] `target.build.llvm` is not enabled

Hi, appreciate your help,

I try to install TVM at conda environment and do the tutorial of " Quick Start Tutorial for Compiling Deep Learning Models". I meet the issue about target.build.llvm is not enabled like below:

`target.build.llvm` is not enabled · Issue #7 · conda-forge/libtvm-feedstock · GitHub Quick Start Tutorial for Compiling Deep Learning Models — tvm 0.8.dev0 documentation

… (tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*), tvm::runtime::TypedPackedFunc<tvm::runtime::Module (tvm::IRModule, tvm::Target)>::AssignTypedLambda<tvm::runtime::Module ()(tvm::IRModule, tvm::Target)>(tvm::runtime::Module ()(tvm::IRModule, tvm::Target))::{lambda(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*)#1}>::_M_invoke(std::_Any_data const&, tvm::runtime::TVMArgs&&, tvm::runtime::TVMRetValue*&&)+0x22a) [0x7f37e76cbf8a] [bt] (1) /home/chayi/miniconda3/envs/tvm/lib/libtvm.so(tvm::codegen::Build(tvm::IRModule, tvm::Target)+0xd97) [0x7f37e76c7f97] [bt] (0) /home/chayi/miniconda3/envs/tvm/lib/libtvm.so(+0x902eff) [0x7f37e76c6eff] File “…/src/target/codegen.cc”, line 58 TVMError: Check failed: bf != nullptr: target.build.llvm is not enabled

it seems NOT work by install llvm firstly, such as:

  1. conda install llvm
  2. conda install tvm-py

I am not sure that the package have some issue, anyway, please give some suggestion, thanks.

Have you set llvm toolchain during the compilation of libtvm.so ?

I use the way of conda package like below:

conda install -c conda-forge tvm-py

Do you mean that we can “set llvm toolchain during the compilation of libtvm.so” when using the conda install?

no, I mean in cmake.config, set llvm config and recompile libtvm.so from tvm source code. see Install from Source — tvm 0.8.dev0 documentation. Install tvm from source, and export to PYTHON_PATH, and it will be visible to conda env.

Thanks, i understand what you mean. Because I am not the supervisor of my company’s server, so i use the conda environment and install the package. It seems that current conda package is with this issue.

seems another way: conda env create --file conda/build-environment.yaml, i am trying … …

I don’t think install from source needs any system privileges, even PYTHON_PATH, you can use export method to make it visible.

Hi Huangteng,

Thanks.

I think that your suggestion may be right. Because we meet some(many) issues in the install process, (pardon: i am not so familiar with setup UNIX environment), finally, i ask server’s supervisor’s help and choose the way of “install from source”, and it seems work now.

thank your giving me a hand and suggestion, –chayi