We highly recommend to build with LLVM to enable all the features.
Additions/Changes Requested
But I cannot figure out which versions of LLVM are acceptable. On Ubuntu 20.04, I have clang-12 and llvm-12-dev installed from the official Ubuntu focal-updates repo, as well as clang-19 and libpolly-19-dev installed from http://apt.llvm.org/focal/ llvm-toolchain-focal main.
In my config.cmake, I tried setting USE_LLVM to /usr/lib/llvm-12/bin/llvm-config and /usr/lib/llvm-19/bin/llvm-config for ninja builds. Neither worked.
With 12:
/home/jchia/gh/tvm/src/target/llvm/llvm_module.cc:502:38: error: ‘x86’ is not a namespace-name
502 | using namespace llvm::sys::detail::x86;
Why exactly LLVM is good/necessary, namely which features are affected and how if LLVM is not used. It's worrying to not know what downsides one is getting for not using LLVM.
Whether this part is referring to the USE_LLVM in the config.cmake or something else. E.g. do we need to do something about and CMAKE_C_COMPILER or CMAKE_CXX_COMPILER to point them to clang?
Install from Source
The page at https://tvm.apache.org/docs/install/from_source.html says this about LLVM:
Additions/Changes Requested
But I cannot figure out which versions of LLVM are acceptable. On Ubuntu 20.04, I have clang-12 and llvm-12-dev installed from the official Ubuntu focal-updates repo, as well as clang-19 and libpolly-19-dev installed from
http://apt.llvm.org/focal/ llvm-toolchain-focal main
.In my config.cmake, I tried setting
USE_LLVM
to/usr/lib/llvm-12/bin/llvm-config
and/usr/lib/llvm-19/bin/llvm-config
for ninja builds. Neither worked.With 12:
With 19:
Could you clarify:
USE_LLVM
in the config.cmake or something else. E.g. do we need to do something about andCMAKE_C_COMPILER
orCMAKE_CXX_COMPILER
to point them to clang?Triage