[SOLVED] Can’t build TVM with LLVM


#1

I have tried many times to build TVM with LLVM but always failed.
I did follow the instructions to build,downloaded pre-built version of LLVM(8.0.0).
Then I modify build/config.cmake to add set(USE_LLVM ON).
But when I input this command: cmake -G “Visual Studio 15 2017 Win64” -DCMAKE_BUILD_TYPE=Release -DCMAKE_CONFIGURATION_TYPES=“Release” …
it says can’t find file llvm-config.

Could not find a package configuration file provided by “LLVM” with any of
the following names:

LLVMConfig.cmake
llvm-config.cmake

Add the installation prefix of “LLVM” to CMAKE_PREFIX_PATH or set
“LLVM_DIR” to a directory containing one of the above files. If “LLVM”
provides a separate development package or SDK, be sure it has been
installed.
Call Stack (most recent call first):
cmake/modules/LLVM.cmake:22 (find_llvm)
CMakeLists.txt:193 (include)

– Configuring incomplete, errors occurred!

I have no idea how to fix it. If someone knows about it please give me a reply,thank you!


#2

Hey could you try set USE_LLVM to be the exact path to llvm-config?


#3

Try USE_LLVM your_llvm_path instead of USE_LLVM ON


#4

yeah,thank you very much!


#5

Could you show me your llvm_path?
I set the comand like set(USE_LLVM “C:/Program Files/LLVM/bin”) , but it did not work


#6

should be C:/Program Files/LLVM/bin/llvm-config


#7

But I can’t find the “llvm-config” file in path C:/Program Files/LLVM/bin/llvm-config


#8

I find words in the install toturial saying: “In order to build with LLVM in windows, you will need to build LLVM from source. You need to run build the nnvm by running the same script under the nnvm folder.”

Now I am confused.


#9

You should build llvm from source on Windows. Then you should find llvm-config.


#10

You build the LLVM from source in windows???


#11

see https://github.com/dmlc/tvm/issues/611


#12

I got it. Thanks a lot .