NVIDIA Announces CUDA Rust: Native GPU Kernels in Rust via SIMT and Tile Tracks

TL;DR – NVIDIA’s CUDA Rust lets you write GPU kernels directly in Rust, offering two distinct programming models (SIMT via cuda‑oxide and Tile via cutile‑rs) that compile to PTX and provide compile‑time safety guarantees.


Why native Rust GPU kernels matter

  • Rust’s ownership and type system catch whole classes of memory‑safety bugs at compile time, a property that is traditionally missing from CUDA C++ kernels.
  • NVIDIA’s driver stack is already moving to Rust (Nova Linux driver, Dynamo core, NVTX bindings). Extending Rust to the kernel layer completes the language coverage.
  • Developers can now launch kernels from Rust and write the kernel code itself in Rust, eliminating the need for a foreign language wrapper.

Two tracks mirror CUDA’s own models

1. SIMT track – cuda‑oxide

  • Model: Traditional single‑instruction‑multiple‑thread (SIMT) programming, identical to CUDA C++ or numba‑cuda.
  • Toolchain: Custom rustc code‑gen backend that routes #[kernel] functions through Rust MIR → Pliron IR → LLVM IR → PTX.
  • Requirements: Linux, GPU with compute capability ≥ 8.0, CUDA 12.x+, clang, and a pinned nightly Rust toolchain (cargo +nightly‑2026‑04‑03).
  • Getting started:
    cargo +nightly-2026-04-03 install --git https://github.com/NVlabs/cuda-oxide.git cargo-oxide
    cargo oxide new vecadd_demo
    cd vecadd_demo
    cargo oxide doctor   # verifies environment
    cargo oxide run      # builds and runs the vector‑add example
    
  • Safety highlights:
    • Kernel arguments use DisjointSlice to give each thread exclusive mutable access, avoiding the illegal &mut [T] pattern.
    • #[launch_contract] declares thread‑block geometry; prepare_vecadd validates the launch configuration against the contract and the device’s limits, producing a proof object required by the safe vecadd call.
    • Compile‑time errors prevent classic aliasing bugs, e.g., attempting to pass the same buffer as both input and mutable output fails with E0502.

2. Tile track – cutile‑rs

  • Model: Tile‑level abstraction where a tile is a logical thread operating on a sub‑tensor; the compiler decides how many physical GPU threads back each tile.
  • Toolchain: Pure stable Rust (≥ 1.89); no nightly, no custom LLVM needed. Requires CUDA 13.3 and a compute‑capability ≥ 8.0 GPU.
  • Getting started:
    cargo new vecadd_demo
    cd vecadd_demo
    cargo add cutile
    cargo run   # after pasting the example into src/main.rs
    
  • Safety highlights:
    • Tensor partitioning (api::zeros(...).partition([128])) grants each tile exclusive mutable ownership, eliminating the need for a special DisjointSlice type.
    • Dynamic dimensions are expressed with -1 in the type signature; the actual size is resolved at launch, allowing flexible shapes without recompilation.
    • The launcher (kernel::add) consumes the tensors, returns them as a tuple, and only executes when .sync_on(&stream) is called, making the whole program a lazy description that runs atomically.

What the compilers catch automatically

  • Alias‑free guarantees – Both tracks reject kernels that read and write the same buffer without proper exclusivity, surfacing errors like cannot borrow as mutable because it is also borrowed as immutable (SIMT) or use of moved value (Tile) at compile time.
  • Thread‑index safety – In SIMT, thread::index_1d() returns a typed index; out‑of‑bounds accesses become explicit Option branches rather than undefined memory reads.
  • Launch‑time validation#[launch_contract] enforces that the supplied LaunchConfig matches the kernel’s declared geometry and the device’s limits, turning a common source of runtime crashes into a compile‑time check.

Project maturity and ecosystem positioning

  • cuda‑oxide – Early‑alpha; requires a nightly toolchain and is Linux‑only. Provides a low‑level, MIR‑based path that stays close to CUDA’s existing PTX pipeline.
  • cutile‑rs – Published on crates.io, already used in HuggingFace’s Grout inference engine and the mistral.rs project. Considered more stable, but still pre‑1.0 and subject to API changes.
  • Both projects coexist with other Rust‑GPU efforts (rust‑cuda, rust‑gpu, CubeCL). NVIDIA’s blog links to an ecosystem appendix that maps these relationships.

How to try it today

  • SIMT examplecargo oxide new vecadd_demo && cargo oxide run.
  • Tile examplecargo add cutile && cargo run after copying the Tile‑based vector‑add code.
  • Documentation – The cuda‑oxide book and the cutile‑rs docs.
  • PaperFearless Concurrency on the GPU (arXiv 2606.15991).
  • Community – File issues on the respective GitHub repos, join the Discord, or attend Melih Elibol’s talk at RustConf 2026.

Community reactions (selected HN comments)

"The launch is checked rather than trusted. Damn even Nvidia is putting out fully Claude‑written articles." – claiir

"Been waiting for something like this. CUDA C++ is a pain; Rust's safety for kernel programming could be a game changer." – Driftbench

"Since NVIDIA owns HuggingFace now and HuggingFace has the excellent Candle crate for inference on Rust, this seems like a good step towards nice native Rust kernels." – dllu

"I strongly dislike CUDA… the best way to program GPUs is to write kernels in separate files and launch them manually, like in Metal, OpenCL, and D3D12." – jacobgorm (points out a philosophical alternative).


Outlook

NVIDIA’s CUDA Rust initiative signals a strategic push to bring Rust’s safety guarantees to the GPU stack, starting with two complementary tracks that cater to both low‑level control (SIMT) and higher‑level abstraction (Tile). While the tooling is still early, the projects are already being adopted in production‑grade Rust inference engines, suggesting a rapid maturation path. As the APIs stabilize, developers can expect a smoother, safer experience for writing high‑performance GPU kernels entirely in Rust.

Sources

Related

  • Dispatch
  • Dispatch
  • Project
  • Project
  • Project