Compiling error: Cannot open include file: 'llvm/ExecutionEngine/MCJIT.h':

Iā€™m compiling TVM on Windows with LLVM built from source but I get this error:

Cannot open include file: 'llvm/ExecutionEngine/MCJIT.h': No such file or directory (compiling source file C:\Users\Alexa\Applications\incubator-tvm\src\codegen\llvm\codegen_amdgpu.cc) tvm C:\Users\Alexa\Applications\incubator-tvm\src\codegen\llvm\llvm_common.h

I successfully compiled LLVM and linked llvm-config in CMake. I tried both LLVM 9.0 and 6.1, compiled in VS 2019

I have had success with LLVM 8 and 9.

In both cases, I do not use the llvm-config as it does not seem to play nice with multi-config VS projects (Debug/Release).

I set ā€œUSE_LLVMā€ to ā€œONā€ and set ā€œLLVM_DIRā€ to ā€œC:/build/llvm/winx64/lib/cmake/llvmā€, which is the dir with LLVMConfig.cmake. I build both Debug and Release builds of LLVM (if you plan on having both debug / release builds of TVM).

1 Like

Thanks that seemed to make it work :smiley: