You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "jchia (via GitHub)" <gi...@apache.org> on 2024/03/12 13:02:36 UTC

[I] [Docs] What versions of LLVM exactly to use? [tvm]

jchia opened a new issue, #16708:
URL: https://github.com/apache/tvm/issues/16708

   ### Install from Source
   The page at https://tvm.apache.org/docs/install/from_source.html says this about LLVM:
   
   > 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`. 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;
   
   ```
   
   With 19:
   
   ```
   FAILED: CMakeFiles/tvm_objs.dir/src/target/llvm/llvm_instance.cc.o 
   ccache /usr/bin/c++ -DDMLC_USE_FOPEN64=0 -DDMLC_USE_LOGGING_LIBRARY="<tvm/runtime/logging.h>" -DNDEBUG -DNDEBUG=1 -DTVM_GRAPH_EXECUTOR_TENSORRT -DTVM_INDEX_DEFAULT_I64=1 -DTVM_KALLOC_ALIGNMENT=64 -DTVM_LLVM_VERSION=190 -DTVM_THREADPOOL_USE_OPENMP=0 -DTVM_USE_LIBBACKTRACE=1 -DUSE_FALLBACK_STL_MAP=0 -DUSE_MICRO_STANDALONE_RUNTIME=1 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DDMLC_ENABLE_RTTI=0 -I/home/jchia/gh/tvm/include -I/home/jchia/gh/tvm/build/libbacktrace/include -I/home/jchia/gh/tvm/3rdparty/libcrc/include -isystem /home/jchia/gh/tvm/3rdparty/dlpack/include -isystem /home/jchia/gh/tvm/3rdparty/dmlc-core/include -isystem /home/jchia/gh/tvm/3rdparty/rang/include -isystem /home/jchia/gh/tvm/3rdparty/compiler-rt -isystem /home/jchia/gh/tvm/3rdparty/picojson -isystem /home/jchia/gh/tvm/build/crt_config -isystem /usr/local/cuda/include -isystem /usr/lib/llvm-19/include -std=c++17 -faligned-new -O2 -Wall -fPIC  -fno-rtti -MD -MT CMakeFiles/t
 vm_objs.dir/src/target/llvm/llvm_instance.cc.o -MF CMakeFiles/tvm_objs.dir/src/target/llvm/llvm_instance.cc.o.d -o CMakeFiles/tvm_objs.dir/src/target/llvm/llvm_instance.cc.o -c /home/jchia/gh/tvm/src/target/llvm/llvm_instance.cc
   /home/jchia/gh/tvm/src/target/llvm/llvm_instance.cc:45:10: fatal error: llvm/Support/Host.h: No such file or directory
      45 | #include <llvm/Support/Host.h>
   ```
   
   Could you clarify:
   
   - Which versions of LLVM can be used.
   - Why exactly LLVM is good/necessary, namely which features are affected if LLVM is not used.
   - 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?
   
   ### Triage
   
   * needs-triage
   * docs
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Docs] What versions of LLVM exactly to use? [tvm]

Posted by "cbalint13 (via GitHub)" <gi...@apache.org>.
cbalint13 commented on issue #16708:
URL: https://github.com/apache/tvm/issues/16708#issuecomment-2645947133

   Starting with PR https://github.com/apache/tvm/pull/17631 , LLVM should compile on {10,11,12,13,14,15,16,17,18,19,20} .


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Docs] What versions of LLVM exactly to use? [tvm]

Posted by "tqchen (via GitHub)" <gi...@apache.org>.
tqchen closed issue #16708: [Docs] What versions of LLVM exactly to use?
URL: https://github.com/apache/tvm/issues/16708


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Docs] What versions of LLVM exactly to use? [tvm]

Posted by "tqchen (via GitHub)" <gi...@apache.org>.
tqchen commented on issue #16708:
URL: https://github.com/apache/tvm/issues/16708#issuecomment-2645736928

   we close the issue due to the staleness, the latest llvm18 should work


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Docs] What versions of LLVM exactly to use? [tvm]

Posted by "chensterliu (via GitHub)" <gi...@apache.org>.
chensterliu commented on issue #16708:
URL: https://github.com/apache/tvm/issues/16708#issuecomment-2455233466

   I met the same error for combination of (TVM v0.15.0, llvm-18). Upgrade tvm and compile TVM v0.18.0  with llvm-18 works fine for me.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Docs] What versions of LLVM exactly to use? [tvm]

Posted by "tqchen (via GitHub)" <gi...@apache.org>.
tqchen closed issue #16708: [Docs] What versions of LLVM exactly to use?
URL: https://github.com/apache/tvm/issues/16708


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Docs] What versions of LLVM exactly to use? [tvm]

Posted by "jchia (via GitHub)" <gi...@apache.org>.
jchia commented on issue #16708:
URL: https://github.com/apache/tvm/issues/16708#issuecomment-1991678210

   From the llvm github repo, it appears that llvm-17 has `llvm/Support/Host.h` but llvm-18 and llvm-19 do not.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Docs] What versions of LLVM exactly to use? [tvm]

Posted by "jchia (via GitHub)" <gi...@apache.org>.
jchia commented on issue #16708:
URL: https://github.com/apache/tvm/issues/16708#issuecomment-2644497909

   This is not even a feature request. There is nothing to "not plan". The issue is just a request for clarification about which LLVM versions exactly are needed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org