NVIDIA opens native GPU kernel programming to Rust
NVIDIA is extending CUDA to let developers write GPU kernels directly in Rust, closing the last gap in a stack that has increasingly moved to the language. Rust already underpins much of NVIDIA’s AI systems layer—the Nova Linux driver, the Dynamo core, and NVTX bindings—but kernels themselves still had to be written elsewhere and merely launched from Rust. The company frames this as a long-term investment, with CUDA C++ and CUDA Python remaining the mature enterprise toolchains while CUDA Rust matures through 2027.
The effort mirrors CUDA’s two existing programming models. The SIMT track, handled by a project called cuda-oxide, works like traditional CUDA C++: you describe what one thread does and launch thousands, with a custom rustc codegen backend routing #[kernel] functions through Rust MIR and LLVM down to PTX. The higher-level Tile track, via cutile-rs, lets you operate on tiles of data and leaves thread mapping to NVIDIA’s Tile IR compiler, which JIT-compiles the kernel on first use. NVIDIA recommends reaching for Tile first and dropping to SIMT only when you need manual control over memory and threads.
The pitch is safety without a performance penalty. Rust’s type system encodes launch correctness and memory access into the kernel itself—a DisjointSlice type gives each thread exclusive access to its own element, indices are typed rather than bare integers so out-of-bounds access becomes a handled branch, and a launch contract is validated against live device limits before a kernel can run. Host and device code live in one file and build with a single command, lowering the friction of writing memory-safe GPU code.
Read the full article
Continue reading at Hacker News →This is an AI-generated summary. Read the original for the full story.