Skip to content

Upgrade modern backend to LLVM 21.1.8 and CUDA 13.3 - #408

Open
brandonros wants to merge 10 commits into
Rust-GPU:mainfrom
brandonros:experiment/cuda13.3-llvm21
Open

brandonros wants to merge 10 commits into
Rust-GPU:mainfrom
brandonros:experiment/cuda13.3-llvm21

Conversation

@brandonros

@brandonros brandonros commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

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.8 release with linux-x86_64.tar.xz, linux-aarch64.tar.xz, and windows-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, and cust has a non-exhaustive match for CUDA's CU_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.

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

Successfully merging this pull request may close these issues.

1 participant