Skip to content

Support for CUDA 12.0 (libnvvm 2.0) #100

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

Closed
n4o847 opened this issue Jan 28, 2023 · 3 comments
Closed

Support for CUDA 12.0 (libnvvm 2.0) #100

n4o847 opened this issue Jan 28, 2023 · 3 comments

Comments

@n4o847
Copy link

n4o847 commented Jan 28, 2023

Hello.

I just upgraded to CUDA 12.0 and I am getting the following error in cuda_builder:

error: rustc_codegen_nvvm requires at least libnvvm 1.6 (CUDA 11.2)

This seems to be because CUDA 12.0 uses libnvvm 2.0, which is incompatible with version 1 1 2, and the version check fails.

Is there any plan to support CUDA 12.0? Thanks in advance!

Environment

  • Ubuntu 22.04
  • Rust nightly-2021-12-04 (the same version as this repository)
  • CUDA 12.0
  • LLVM 7.1.0

Footnotes

  1. https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html

  2. https://docs.nvidia.com/cuda/nvvm-ir-spec/index.html

Vollkornaffe added a commit to Vollkornaffe/Rust-CUDA that referenced this issue Nov 9, 2023
LegNeato pushed a commit that referenced this issue Jan 27, 2025
* Figure out what works for the add example

* Update guide's CUDA SDK versions

See also #100
@jorge-ortega
Copy link
Collaborator

We've just finished updates to a more recent rust toolchain. In my workspace, I've been using 12.8 with libnvvm 2.0, and have changed the line here to bypass that check 🤣

I'm not sure what issues this might cause with either the codegen or the cust/cuda crates today, but for now it seems to "just work".

@LegNeato
Copy link
Contributor

@LegNeato
Copy link
Contributor

It doesn't look the libnvvm API was breaking, and I don't think there is any case where we can generate multiple versions concurrently. We don't appear to support the addresspace intrinsics they removed, and there is a reference to addrspacecast in the codebase which is what they suggest using. We don't support pragma unroll, which changed in 2.0.

The only one I am concerned about is:

Shared variable initialization with non-undef values is no longer supported. In 1.x versions these initializers were ignored silently. This feature makes the 2.0 version incompatible with 1.x versions.

But I doubt it would be an issue unless you are mixing and matching.

So let's closed this as fixed and deal with any issues in follow-up bugs 🚀

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

3 participants