Skip to content

Support for CUDA 12.0 (libnvvm 2.0) #100

Description

@n4o847

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 ↩

Activity

  1. added a commit that references this issue on Nov 9, 2023
  2. jorge-ortega commented on Mar 14, 2025

    @jorge-ortega
    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".

  3. LegNeato commented on Mar 14, 2025

    @LegNeato
    Contributor
  4. LegNeato commented on Mar 17, 2025

    @LegNeato
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions