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] Default installation has LLVM errors #17492

Open
MehdiTantaoui-99 opened this issue Oct 27, 2024 · 4 comments
Open

[Bug] Default installation has LLVM errors #17492

MehdiTantaoui-99 opened this issue Oct 27, 2024 · 4 comments
Labels
needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it type: bug

Comments

@MehdiTantaoui-99
Copy link

MehdiTantaoui-99 commented Oct 27, 2024

I installed tvm like instructed here: https://tvm.apache.org/docs/install/from_source.html

Once I run the test :

python -c "import tvm; print(tvm.__file__)"

Expected behavior

/home/ubuntu/tvm/python/tvm/__init__.py

Actual behavior

[13:07:34] /home/ubuntu/tvm/src/target/llvm/llvm_instance.cc:226: Error: Using LLVM 19.1.2 with `-mcpu=apple-latest` is not valid in `-mtriple=arm64-apple-macos`, using default `-mcpu=generic`
[13:07:34] /home/ubuntu/tvm/src/target/llvm/llvm_instance.cc:226: Error: Using LLVM 19.1.2 with `-mcpu=apple-latest` is not valid in `-mtriple=arm64-apple-macos`, using default `-mcpu=generic`
[13:07:34] /home/ubuntu/tvm/src/target/llvm/llvm_instance.cc:226: Error: Using LLVM 19.1.2 with `-mcpu=apple-latest` is not valid in `-mtriple=arm64-apple-macos`, using default `-mcpu=generic`
/home/ubuntu/tvm/python/tvm/__init__.py

Environment

PRETTY_NAME="Ubuntu 22.04.5 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.5 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

Steps to reproduce

Follow step on : https://tvm.apache.org/docs/install/from_source.html

@MehdiTantaoui-99 MehdiTantaoui-99 added needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it type: bug labels Oct 27, 2024
@youngwayfarer
Copy link

I've met the same problem as well. Have you resolved it?

@MehdiTantaoui-99
Copy link
Author

I found a solution. You have to setup the LLVM config before compiling the library:

cd tvm/build/
vi config.cmake

Set set(USE_LLVM llvm-config) in the config.cmake file. Then run:

cmake ..
make -j$(nproc)

This solved the issue for me.

@youngwayfarer
Copy link

youngwayfarer commented Oct 29, 2024

I found a solution. You have to setup the LLVM config before compiling the library:

cd tvm/build/
vi config.cmake

Set set(USE_LLVM llvm-config) in the config.cmake file. Then run:

cmake ..
make -j$(nproc)

This solved the issue for me.

Thanks!!! I'll try.

@youngwayfarer
Copy link

I found a solution. You have to setup the LLVM config before compiling the library:

cd tvm/build/
vi config.cmake

Set set(USE_LLVM llvm-config) in the config.cmake file. Then run:

cmake ..
make -j$(nproc)

This solved the issue for me.

I'm sorry, but I have a few more questions. According to https://tvm.apache.org/docs/install/from_source.html, I need to execute the "echo "set(USE_LLVM "llvm-config --ignore-libllvm --link-static")" >> config.cmake" command,. Do you mean changing this command to "echo "set(USE_LLVM llvm-config)" >> config.cmake"? I have done this, but the problems above remain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it type: bug
Projects
None yet
Development

No branches or pull requests

2 participants