NVIDIA/cuda-rust
NVIDIA's CUDA platform for Rust. Host runtime crates plus Tile (cutile-rs) and SIMT (cuda-oxide) kernel programming models in idiomatic Rust.
What it solves
CUDA Rust solves the problem of writing NVIDIA GPU programs in Rust instead of CUDA C++. It brings Rust's memory-safety features to GPU code and offers two distinct ways to structure that code: one that gives you fine-grained control over threads, and one that lets you work with whole blocks of data.
How it works
It provides two kernel-writing approaches. The SIMT model (cuda-oxide) uses a custom compiler backend to turn Rust directly into GPU machine code (PTX), letting you manage threads, blocks, and shared memory yourself. The Tile model (cutile-rs) uses a macro plugin to let you write operations on chunks of data called tiles; the compiler then decides how to schedule those tiles on the hardware. Both approaches share a common runtime (cuda-bindings, cuda-core, cuda-async) that handles the low-level driver, memory buffers, and asynchronous operations. A key safety feature is that Rust's ownership rules extend across the GPU launch: mutable data is split into disjoint pieces before launch, preventing data races.
Who it's for
It's for Rust developers who want to write high-performance GPU code. If you're familiar with CUDA C++, the SIMT model will feel natural. If you work with dense numerical data like in NumPy or PyTorch, the Tile model is a good fit. Because it's an early-stage research project, it's best suited for developers who are comfortable experimenting and adapting to API changes.
Highlights
- Two complementary kernel models: SIMT for explicit thread control, Tile for tensor-style operations.
- Extends Rust's ownership and borrowing rules across the GPU launch boundary to help prevent data races.
- Shared runtime crates handle driver bindings, contexts, streams, device buffers, and async operations.
- Kernels from both models can interoperate on the same stream over shared device buffers.
- SIMT compiles ahead-of-time to PTX; Tile compiles just-in-time and tunes per GPU architecture.
- Includes a catalog of reusable Tile kernels, such as fused QKV and NVFP4 MoE.
Related
- Dispatch
- Dispatch
- Dispatch
- Project
- Project