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

Failed to initialize target for LLVM Triple #514

Closed
astrolemonade opened this issue Oct 13, 2021 · 3 comments
Closed

Failed to initialize target for LLVM Triple #514

astrolemonade opened this issue Oct 13, 2021 · 3 comments

Comments

@astrolemonade
Copy link

astrolemonade commented Oct 13, 2021

I compiled commit: a337b4f
The compilation went fine. When running terra

$ ./terra
src/terralib.lua:750: failed to initialize target for LLVM Triple: nvptx64-nvidia-cuda (No available targets are compatible with triple "nvptx64-nvidia-cuda")

Do you have any idea on why is this happening or how can this be fixed?
LLVM version 12.0.1
Thanks.

@elliottslaughter
Copy link
Member

It looks like you built your LLVM without the NVPTX target enabled. Terra currently requires that LLVM be built (at least) with the native target (X86, etc., depending on platform) and NVPTX (i.e., CUDA).

The easiest way to do this is to build LLVM with all targets enabled. You can see a sample recipe for doing this here: https://github.com/terralang/terra#instructions-for-building-llvm-from-source

@astrolemonade
Copy link
Author

Are there any plains to remove NVPTX dependency(make it optional)?

@elliottslaughter
Copy link
Member

Yes, we should only do this when Terra itself is built with CUDA.

I'm marking this as a duplicate of #446, if there is anything else please let us know there or open a new issue (if it's something unrelated).

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

2 participants