Rust-GPU / Rust-CUDA

Ecosystem of libraries and tools for writing and executing fast GPU code fully in Rust.
Apache License 2.0
3.02k stars 115 forks source link

LLVM dependency version #23

Open kjetilkjeka opened 2 years ago

kjetilkjeka commented 2 years ago

rustc_codegen_nvvm v0.2.2 depends on LLVM7 which is somewhat outdated and not packaged for the latest ubuntu version (21.10). Adding the possibility of using LLVM9 or later would make it simpler to get started writing device code on Ubuntu 21.10.

What are the reasons for depending on specifically version 7? Would it be beneficial to change this?

RDambrosio016 commented 2 years ago

This is because libnvvm requires llvm 7 bitcode or it does not work. In the future we will probably do what numba does and lower the textual ir from a higher version, but there are still a lot of issues. Are you sure llvm isnt present on ubuntu? This is what we do in CI and it works

kjetilkjeka commented 2 years ago

Thanks for the explanation.

Are you sure llvm isnt present on ubuntu

It's available as a package with Ubuntu 20.04 LTS and Ubuntu 21.04. I'm sure your CI must be running one of those. I'm not able to find a package that works with Ubuntu 21.10, which was released just two months ago.

I'm sure it's possible, but I would be happy to not have to compile LLVM myself. If there are other users that have LLVM7 working on 21.10 it would be nice to hear how they solved it.