Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Build Error: too many arguments to function 'const llvm::StringMap<bool, llvm::MallocAllocator> llvm::sys::getHostCPUFeatures()' #325

Open
shyeonn opened this issue Sep 19, 2024 · 0 comments

Comments

@shyeonn
Copy link

shyeonn commented Sep 19, 2024

Expected behavior

Successful build tvm

Actual behavior

/mlc-llm/3rdparty/tvm/src/target/llvm/codegen_llvm.cc: In lambda function:
/mlc-llm/3rdparty/tvm/src/target/llvm/codegen_llvm.cc:2329:40: error: too many arguments to function 'const llvm::StringMap<bool, llvm::MallocAllocator> llvm::sys::getHostCPUFeatures()'
2329 | if (llvm::sys::getHostCPUFeatures(features)) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
In file included from /mlc-llm/3rdparty/tvm/src/target/llvm/codegen_llvm.cc:77:
/root/miniconda3/envs/tvm-build-venv/include/llvm/TargetParser/Host.h:55:42: note: declared here
55 | const StringMap<bool, MallocAllocator> getHostCPUFeatures();
| ^~~~~~~~~~~~~~~~~~
/mlc-llm/3rdparty/tvm/src/target/llvm/codegen_llvm.cc:2329:40: error: could not convert 'llvm::sys::getHostCPUFeatures()()' from 'const llvm::StringMap<bool, llvm::MallocAllocator>' to 'bool'
2329 | if (llvm::sys::getHostCPUFeatures(features)) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
| |
| const llvm::StringMap<bool, llvm::MallocAllocator>

Environment

When using LLVM version 19.1.0, occur the error

Solution

I changed LLVM version to 18, and the error disappeared.
I think installation docs have to specify use LLVM < =18 or fix this bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant