How to install tvm on Windows?



I’m trying to install tvm stack on Windows10 computer with Anaconda3 installed. But further steps to install LLVM are not clear.

I have made all steps from the “Building on Windows” on []. Namely:

  1. Installed Visual Studio Community 2015 Update 3.
  2. Cloned the tvm source from github in c:\Anaconda3 to my computer.
  3. Have made the “c:\Anaconda3\tvm\build” directory, copied “config.cmake”, launched “cmake -G” Visual Studio 14 2015 Win64 “-DCMAKE_BUILD_TYPE = Release -DCMAKE_CONFIGURATION_TYPES =” Release “…”
    4 I launched a file with the extension “.sln” under Visual Studio, after which the necessary dll files appeared in the directory “C:\Anaconda3\tvm\build\Release”.

I do not understand the sequence to connect llvm. The phrase in the documentation “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” don’t contain anything about it for me. And it seems to contain an error, because nnvm is mentioned instead of llvm.

I would be immensely grateful if you explain in more detail the tvm compilation process with llvm support for Windows.

Thanks for attention.


On Windows, you need to build LLVM from source, and during cmake config of TVM, set USE_TVM=On and LLVM_DIR to your LLVM installation.


I’ve build LLVM from source (as it discribed in, made “set(USE_LLVM ON)” in “config.cmake” file (writing LLVM_DIR doesn’t work for me). And successfully have made tvm.sln with llvm support:

– Build with LLVM 6.0.1
– Configuring done
– Generating done

But Visual Studio after building tvm.sln gave me this error:

Error LNK1112 module machine type ‘X86’ conflicts with target machine type ‘x64’ tvm C:\Anaconda3\tvm\build\LLVMSupport.lib(MemoryBuffer.obj)

Could you say what went wrong?


It seems you have built a 32-bit version of LLVM and trying to link it with a 64-bit version of TVM. You should make them consistent.


LLVM was build from source and enabled in the cmake file.
But after trying to build the INSTALL below mentioned errors pop up.
Can you say what went wrong


Don’t forget to git submodule init and git submodule update.


Thanks for the reply…
After doing the git submodule init and git submodule update . Those errors were resolved but later when i give LLVM_DIR path .Leads to some 9k errors in release mode.Below is the snip of the errors.
Any suggestion on this.