Rust-GPU / Rust-GPU/rust-cuda

CUDA 12.8.1 and LLVM 18.1.8

Open
#197 23 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
5.4k
Forks
249
PR merge metrics
No merged PRs in 30d

Description

CUDA 12.8 Update 1 Release Notes state:
libNVVM - Compilation of compute capabilities compute_100 and greater (Blackwell and future architectures) uses an updated NVVM IR dialect, based on LLVM 18.1.8 IR (the “modern” dialect)

As I have a Blackwell card, I'll be attempting to implement support for LLVM 18.1.8 with the new pass manager in rustc_codegen_nvvm/rustc_llvm_wrapper/PassWrapper.cpp

But my question is, would you like to preserve compatibility with very old LLVM versions? For example #ifdef LLVM_VERSION_LT(18,1).

The passes with the new PassManager in LLVM 18 are vastly different and it would complicate things to perserve compatibility for very old LLVM version, and the purpose of that is questionable as most people will download the latest CUDA toolkit.

In addition, LLVM aims to preserve backwards IR compatibility:
https://llvm.org/docs/DeveloperPolicy.html#ir-backwards-compatibility

In my experimentation, I'm deleting a lot of code for backwards compatibility so I thought I'd ask if the effort will be worth it, or will the Rust-CUDA project focus on LLVM 7 going forward.

Thank you, Rust CUDA is exactly what we need.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with rustc_codegen_nvvm/rustc_llvm_wrapper/PassWrapper.cpp and the CUDA 12.8.1 release notes cited in the issue. Review the existing LLVM version guards and pass-manager code, then clarify which LLVM versions the project intends to support. Done requires an agreed compatibility scope and an implementation plan for LLVM 18.1.8.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.