Upgrade modern backend to LLVM 21.1.8 and CUDA 13.3 - #408
Open
brandonros wants to merge 10 commits into
Open
brandonros wants to merge 10 commits into
brandonros wants to merge 10 commits into
Conversation
brandonros
marked this pull request as ready for review
September 13, 2026 22:03
This was referenced Sep 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace the modern LLVM 19 backend feature with LLVM 21 while retaining LLVM 7 for the legacy path. Update feature forwarding, LLVM tool discovery, the vector-add example, and documentation together. The modern Nix shell uses LLVM 21.1.8 and CUDA 13.3; CUDA 13 Docker definitions use CUDA 13.3.1 bases. Update the Windows CUDA installer action to support CUDA 13.3.1.
Extend the existing Linux CI matrix with LLVM 21 vector-add host/PTX compilation on x86_64 and aarch64. These jobs use CUDA 13.3.1 and LLVM 21.1.8 prebuilts from
Rust-GPU/rustc_codegen_nvvm-llvm. The backend's default LLVM 21 download uses the same upstream release. The six existing LLVM 7 configurations retain their workspace checks. There is no separate experiment workflow or dependency on contributor-hosted releases or Actions artifacts.Depends on Rust-GPU/rustc_codegen_nvvm-llvm#4 and publication of the upstream
llvm-21.1.8release withlinux-x86_64.tar.xz,linux-aarch64.tar.xz, andwindows-x86_64.tar.xz. The URLs intentionally describe the post-publication setup; downloads will fail until upstream publishes that release.Validation: Rust formatting, workflow YAML parsing, and diff checks pass. Trial LLVM 21 prebuilts built successfully for all three platforms. Rust-CUDA integration exposed unresolved compatibility failures: the wrapper includes
llvm/Transforms/Instrumentation.h, absent in LLVM 21, andcusthas a non-exhaustive match for CUDA'sCU_GRAPH_NODE_TYPE_RESERVED_16. This remains a draft pending the upstream release, compilation fixes, and runtime validation. The LLVM 21 CI jobs compile the existing vector-add example; GPU execution and broader LLVM 21 workspace checks are not covered yet.Based directly on upstream
main; no portable PTX exporter changes are included.