apache / tvm

Open deep learning compiler stack for cpu, gpu and specialized accelerators
https://tvm.apache.org/
Apache License 2.0
11.81k stars 3.48k forks source link

[Bug] Build Failed in LLVM == 19.x #17452

Closed Freesia810 closed 1 month ago

Freesia810 commented 1 month ago

Thanks for participating in the TVM community! We use https://discuss.tvm.ai for any general usage questions and discussions. The issue tracker is used for actionable items such as feature proposals discussion, roadmaps, and bug tracking. You are always welcomed to post on the forum first :smile_cat:

Issues that are inactive for a period of time may get closed. We adopt this policy so that we won't lose track of actionable issues that may fall at the bottom of the pile. Feel free to reopen a new one if you feel there is an additional problem that needs attention when an old one gets closed.

Expected behavior

Build Successfully with CMake.

Actual behavior

tvm/src/target/llvm/codegen_llvm.cc:2319:40: error: too many arguments to function ‘const llvm::StringMap<bool, llvm::MallocAllocator> llvm::sys::getHostCPUFeatures()’

Environment

python == 3.11

cmake == 3.30.4

LLVM == 19.1.0

Solution

Back to LLVM == 18.x

Refer

https://github.com/llvm/llvm-project/blob/release/18.x/llvm/include/llvm/TargetParser/Host.h bool getHostCPUFeatures(StringMap<bool, MallocAllocator> &Features);

https://github.com/llvm/llvm-project/blob/release/19.x/llvm/include/llvm/TargetParser/Host.h const StringMap<bool, MallocAllocator> getHostCPUFeatures();