NVIDIA Announces CUDA Rust with cuda-oxide (SIMT) and cutile-rs (Tile) for Compile-Time-Safe GPU Kernels
NVIDIA has announced CUDA Rust, a push to make Rust a first-class language for writing GPU kernels. Rust code might already launch CUDA kernels, however the kernel physique normally needed to be written elsewhere. CUDA Rust closes that hole with two NVlabs open-source initiatives: cuda-oxide for the SIMT mannequin and cutile-rs for the newer Tile mannequin. Both compile Rust kernels natively and use Rust’s possession guidelines to reject aliasing bugs at compile time.
Is it deployable? Partially. cutile-rs is published on crates.io, runs on secure Rust 1.89+, and is already utilized in Hugging Face’s Grout inference engine and in mistral.rs. cuda-oxide is early alpha. The each initiatives are in alpha part and not confirmed for manufacturing.
Why Rust for the GPU Kernel
The programs layer of AI, from inference engines to drivers and agent runtimes, is more and more written in Rust. NVIDIA’s Nova Linux driver is in Rust, NVIDIA Dynamo has a Rust core, and NVTX has Rust bindings. The GPU kernel was the exception.
The two tracks mirror the 2 programming fashions CUDA already presents. SIMT is the mannequin utilized in CUDA C++ and numba-cuda: you describe what one thread does and launch hundreds of them. Tile is the newer mannequin, additionally obtainable in C++ and Python: you describe what one tile of knowledge does, and the Tile IR compiler handles thread mapping and reminiscence structure. NVIDIA recommends Tile first, with SIMT for specific thread and reminiscence management. Planned inter-language interop means selecting Rust won’t lock builders out of C++ or Python.
The SIMT Track: cuda-oxide
cuda-oxide is a customized rustc codegen backend. It routes #[kernel] capabilities by means of Rust MIR, the group Pliron IR framework, and LLVM IR all the way down to PTX, then palms every thing else to the usual backend. NVIDIA wrote the GPU dialects on high of Pliron.
Requirements: Linux, a GPU with compute functionality 8.0 or later, CUDA 12.x or newer, clang with libclang, and a pinned nightly toolchain (nightly-2026-04-03). cargo oxide physician checks the setup and cargo oxide new scaffolds a vector addition program, with host and machine code in a single file.
The security argument sits within the kernel signature. Inputs a and b are unusual shared slices. The output c is a DisjointSlice<f32>, a kind that offers every thread unique entry to its personal aspect. A plain &mut [f32] would wish each thread to carry the identical mutable borrow, which Rust refuses. c.get_mut(idx) returns an Option, so out-of-bounds entry turns into a dealt with department. A #[launch_contract] attribute declares the block form, and the generated prepare_vecadd technique validates the launch configuration towards it earlier than the protected launch runs.
The Tile Track: cutile-rs
cutile-rs works one degree increased. Each tile block runs the kernel physique as soon as as a single logical thread over one sub-tensor, and the compiler decides what number of actual GPU threads again it. The #[cutile::module] macro embeds the kernel’s AST within the host binary and JIT-compiles it by means of CUDA Tile IR when the kernel is first launched.
Requirements are lighter: compute functionality 8.0 or later, CUDA 13.3, secure Rust 1.89 or newer, and Linux, with no nightly and no customized LLVM. Setup is cargo new, then cargo add cutile.
The host-side .partition([128]) name does 3 jobs. It offers every tile unique possession of its 128-element chunk, fixes the grid at 1,024 / 128 = 8 tiles, and provides the const tile width B. Input tensors use -1 as a dynamic dimension resolved at launch. The generated launcher takes possession of all tensors and returns them when the GPU finishes. Nothing executes till .sync_on(&stream); every thing earlier than it’s a lazy description recorded in a single chain.
What the Compiler Catches
Passing the SIMT kernel’s output buffer as certainly one of its personal inputs fails with error[E0502]: can't borrow c_dev as mutable as a result of additionally it is borrowed as immutable. The identical aliasing on the Tile facet fails with error[E0382]: use of moved worth: z. cuda-oxide checks every launch name; cutile-rs’s possession follows tensors throughout the launch boundary, which NVIDIA calls the stronger assure.
Tile exposes no shared reminiscence or thread indexing to misuse. SIMT retains that management, however shared reminiscence in cuda-oxide at present requires unsafe.
Key Takeaways
- CUDA Rust provides 2 native GPU kernel tracks in Rust: cuda-oxide (SIMT) and cutile-rs (Tile).
- cuda-oxide compiles Rust MIR by means of Pliron and LLVM to PTX; it wants a pinned nightly.
- cutile-rs runs on secure Rust 1.89+ with CUDA 13.3 and JIT-compiles through CUDA Tile IR.
- Both reject buffer aliasing at compile time utilizing Rust’s borrow checker and possession.
- cutile-rs already powers Grout and mistral.rs; neither undertaking is production-ready but.
Check out the Technical details here. Also, be at liberty to observe us on Twitter and don’t neglect to hitch our 150k+ML SubReddit and Subscribe to our Newsletter. Wait! are you on telegram? now you can join us on telegram as well.
Need to companion with us for selling your GitHub Repo OR Hugging Face Page OR Product Release OR Webinar and many others.? Connect with us
The put up NVIDIA Announces CUDA Rust with cuda-oxide (SIMT) and cutile-rs (Tile) for Compile-Time-Safe GPU Kernels appeared first on MarkTechPost.
