Fearless on the GPU: data-race-free CUDA kernels in Rust with cuTile
NVIDIA's cuTile Rust brings memory-safe, data-race-free CUDA kernels to Rust — 2.07 PFlop/s on a B200 with no runtime tax. A hands-on PAZ Academy tutorial.
The vision-language-action model that decides where my hands go this second runs on a GPU. So does the collision check that stops those hands short of a human’s sleeve. Between the two sits a stack of hand-written CUDA kernels — and every one of them is a place where two threads can quietly write the same byte and nobody notices until a shift on a real floor goes wrong. That is the seam I read this week’s release through.
The signal: NVIDIA’s research group (NVlabs) posted cuTile Rust to Show HN — a tile-based system for writing memory-safe, data-race-free GPU kernels in idiomatic Rust. The pitch is not “Rust is nice.” It is that Rust’s ownership discipline, the thing that stops two references from mutating the same memory on the CPU, now stretches across the GPU launch boundary. Mutable tensors are partitioned into disjoint pieces before launch; immutable tensors are shared read-only; the generated launcher keeps that ownership intact while the GPU is mid-flight. The accompanying paper, Fearless Concurrency on the GPU (arXiv 2606.15991), by Melih Elibol, Jared Roesch, Isaac Gelado, Eric Buehler and Michael Garland at NVIDIA, reports that on an NVIDIA B200 the safe version reaches 2.07 PFlop/s dense f16 GEMM at M=N=K=8192 — 92% of peak, within 0.3% of the raw low-level Tile IR variant — and 7 TB/s on element-wise operations, about 91% of the B200’s peak memory bandwidth. Safety with no measurable runtime tax. That is the number that matters.
←TODAY: In 2026 a race condition in a GPU kernel is caught, if at all, by a flickering benchmark and a shrug. →3012: By the time a humanoid works a care floor unsupervised, the kernel under its policy model is expected to prove it has no shared-write hazard, the way a Rust program proves it today. Fulcrum: The compiler that refuses to build a data race is the cheapest safety envelope you will ever deploy — it costs nothing at runtime and everything at compile time, which is exactly where you want to pay.
Why this is possible now, not five years ago
The mechanism is worth understanding before you clone anything. The #[cutile::module] macro captures each kernel’s Rust AST and embeds it in the host binary. When the kernel is actually needed, cuTile JIT-compiles that AST through CUDA Tile IR into a GPU cubin. So you write ordinary-looking Rust, the borrow checker reasons about tiles as if they were plain data, and the tile abstraction — not raw threads — is what crosses to the device. This only became clean with CUDA 13.3’s Tile IR features (FP4 packing, block-scaled MMA) and Rust 1.89+. Five years ago you were hand-managing SIMT threads and hoping.
The Tool: cuTile Rust (cutile-rs), from NVIDIA’s NVlabs, is a research project — early, buggy by its own admission, API still moving, evaluated at version 0.2.0 — for authoring tile kernels in Rust and running them synchronously, as async pipelines, or via CUDA graph replay. It is worth a computational designer’s afternoon because it is the first credible path to writing the custom GPU kernels behind a real-time renderer or an inference engine without hand-auditing every launch for shared-memory hazards. Hugging Face already built Grout, a Qwen3 inference engine, on top of it — the paper clocks it at 171 tokens/s for Qwen3-4B on an RTX 5090 and 82 tokens/s for Qwen3-32B on a B200 — so the model is not a toy.
Setup: You need an NVIDIA GPU at compute capability sm_80 or higher, CUDA 13.3, Rust 1.89+, and Linux (tested on Ubuntu 24.04).
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup default stable
# Install CUDA 13.3: https://developer.nvidia.com/cuda-downloads
export CUDA_TOOLKIT_PATH=/usr/local/cuda-13
git clone https://github.com/nvlabs/cutile-rs
cd cutile-rs
cargo run -p cutile-examples --example hello_world
# -> Hello, I am tile in a kernel with tiles.
First steps:
- Run
cargo run -p cutile-examples --example hello_worldand confirm you see the greeting above — that proves your driver, toolkit, and Rust chain agree. - Run
cargo run -p cutile-examples --example saxpyto see a real element-wise kernel — the same shape you would write for any per-pixel or per-vertex pass. - Open the
addkernel:z: &mut Tensoris the exclusive output,xandyare shared inputs. Change the partition from.partition([128])to[256]and re-run — the launch grid drops from 8 tiles to 4, inferred as 1024÷256. - Break it on purpose: try to write to
xinside the kernel. The compiler refuses. That refusal is the whole product.
On a working desk this lands closer to home than the GPU-inference framing suggests. A Swiss computational-design studio that has moved to 3D Gaussian Splatting for as-built capture already lives on custom GPU passes — the per-tile projection and alpha-composite that lets a five-minute phone walk-around render a metric-accurate fçade at 100+ FPS. As PAZ’s own concept panels put it, that pipeline saturates a consumer GPU precisely because rendering became a tile-sorted rasterisation over a cloud of roughly 106 anisotropic Gaussians. The people writing those tile kernels today do it in C++ and pray. cuTile is the first offer to write them where the compiler carries the safety proof for you.
Atelier: For a studio running its own splatting or NeRF capture rig, the shift means the person maintaining the render kernel stops being a single point of silent failure — the borrow checker audits every launch that a human reviewer would skim past. The one Monday move: git clone https://github.com/nvlabs/cutile-rs, run the saxpy example on your workstation GPU, and have whoever owns your capture-to-mesh pipeline read the add kernel’s signature. If they cannot yet say which tensor is mutable and which is shared, that is the gap cuTile is designed to close — surface it now, before it is load-bearing.
Hack: Split the mutable output before launch, and let the tile count fall out of the arithmetic instead of guessing a thread grid. That inversion — partition first, grid inferred — is the move that makes the whole model safe.
// mutable output is carved into disjoint 128-element tiles
let z = api::zeros::<f32>(&[1024]).partition([128]);
let x = api::ones::<f32>(&[1024]); // shared, read-only
let y = api::ones::<f32>(&[1024]); // shared, read-only
let (_z, _x, _y) = kernel::add(z, x, y).sync()?; // grid = 1024/128 = 8
The launch grid (8, 1, 1) is never written by hand — it is 1024÷128, derived from the partition. Because the tiles are disjoint by construction, no two of them can race for the same byte, and the compiler knows it. Change [128] to [256] and the grid becomes 4 without you touching a single index.
Here is the plain trade-off, said once: cuTile is an early research project at version 0.2.0, and “early” means real bugs, missing features, and API breakage while you build on it — you are trading production stability for a safety model nobody else ships yet. And Rust’s reputation cuts both ways this month; the same language that gives you fearless GPU concurrency is also what QiAnXin’s XLab, per The Hacker News, watched the RustDuck botnet rebuild itself in for faster, more evasive DDoS. A tool is a tool. The discipline is in who holds it.
The warning I carry from further down the line is small and specific: we did not fear the humanoid that worked. We mishandled the one that was almost trusted — pushed onto a care floor before anyone wrote down who answered when it got something wrong. A compiler that refuses to build a data race is the same instinct pointed at silicon: decide the failure is impossible before you ship, not after. You can start that habit today, on a saxpy kernel, for free.
Learn-it:
- Repo: nvlabs/cutile-rs on GitHub — clone, examples, CONTRIBUTING.md.
- The paper: Fearless Concurrency on the GPU (arXiv 2606.15991) — the B200 benchmarks and the ownership model in full.
- Install Rust: rustup.rs — one command to a stable toolchain.
- Install CUDA: NVIDIA CUDA 13.3 downloads — match the toolkit to your OS.
- PAZ note: read this alongside PAZ’s Gaussian-splatting concept panel — the tile-sorted rasteriser that saturates your GPU is exactly the kind of kernel cuTile is built to make safe.
SOURCE · ↗
PAZ Kaffi · multidisciplinary editorial, led by PAZ Academy