Skip to content

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

Draft
brandonros wants to merge 1 commit into
mainfrom
experiment/cuda13.3-llvm21
Draft

brandonros wants to merge 1 commit into
mainfrom
experiment/cuda13.3-llvm21

Conversation

@brandonros

@brandonros brandonros commented Sep 14, 2026

Copy link
Copy Markdown
Owner

Upstream review: Rust-GPU#408

Upgrade the modern backend to LLVM 21.1.8 and CUDA 13.3, including feature selection, Nix tooling, LLVM downloads, and Linux/Windows CI configuration. Linux validation uses upstream LLVM release prebuilts and compiles the vector-add example.

This is the bottom of stack Rust-GPU#6: mainexperiment/cuda13.3-llvm21poc/portable-ptx-export. The dependent portable PTX export work is in #4; this PR retains the existing six LLVM upgrade commits unchanged.

Validation: branch ancestry verified against the current fork main. The combined export backend requires fresh Linux CI validation; previous LLVM 19 workload results do not validate LLVM 21.

LLVM archive override: the builder accepts PREBUILT_LLVM_URL with or without a trailing slash; USE_PREBUILT_LLVM=1 forces its download path. Linux CI reads the repository variable of the same name and defaults to the fork's LLVM 21.1.8 release. All three release asset SHA-256 hashes match artifacts downloaded from run 34781677658 at commit 2cf27700bffbab35dff21a58d1e19ca12525ca6f. Archive layout was checked for each host platform. The guide documents the override.

Active native stack: #3#7#8#9#10. Historical-report PR #11 is closed. Updated CI is pending.

Replace the 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, the Nix shell, container definitions, and docs.

- rustc_llvm_wrapper: guard the Instrumentation.h include to LLVM < 19 and
  update wrapper APIs for LLVM 21; add tests/llvm-wrapper capture checks.
- nvvm: restore kernel annotations after the LLVM 21 bitcode upgrade.
- cust: handle CUDA 13.3's CU_GRAPH_NODE_TYPE_RESERVED_16 graph node type.
- CI: add LLVM 21 vector-add jobs on x86_64 and aarch64 using CUDA 13.3.1
  and LLVM 21.1.8 prebuilts, with a configurable PREBUILT_LLVM_URL; install
  libzstd-dev so the static LLVM link resolves -lzstd.
- Update the Windows CUDA installer action for CUDA 13.3.1.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@brandonros
brandonros force-pushed the experiment/cuda13.3-llvm21 branch from af6880e to 0e5545c Compare September 21, 2026 13:45

This branch has not been deployed

No deployments
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