All stories

NVIDIA agent translates CUDA tile kernels to Rust

NVIDIA says an agentic translation pipeline ported all 24 public TileGym operators from cuTile Python and Triton-TileIR into cuTile Rust at 99.5% of the original performance, using Tile IR diffs as a verification gate.

NVIDIA has published details of an agent "skill," shipped in the TileGym repository, that translates GPU kernels written in cuTile Python and Triton-TileIR into cuTile Rust, the tile-based Rust front end for CUDA kernel authoring.

Using the skill, NVIDIA's team ported all 24 public TileGym operators — roughly 40 kernels in total, from element-wise operations to flash-attention decode, Multi-head Latent Attention, and mixture-of-experts — and reports reaching 99.5% of cuTile Python performance on average. Some operators required multiple kernel variants.

The translation is tractable because cuTile Python, Triton-TileIR, and cuTile Rust are three front ends over the same CUDA Tile IR (the cuda_tile dialect), all compiled by tileiras to a cubin. That shared IR also supplies the verification gate: the reference and translated kernels' Tile IR can be dumped and diffed before any test runs, catching structurally wrong-but-passing ports such as a TMA load with the wrong cost hint or a dropped divisibility attribute.

Each conversion runs through a bounded multi-agent pipeline covering analysis, device kernel, host and FFI code, and benchmarking, with every stage ending in a machine-checkable verdict from validator scripts or IR diffs.

The central difficulty NVIDIA identifies is specialization: cuTile Python's JIT specializes implicitly at call time, while Rust requires every specialization declared in the kernel signature. One Python kernel can therefore split into several Rust entries — layer_norm becomes 2-D nchw and 1-D w1 variants because the branch changes tile rank — and dtype support becomes an explicit ABI extension across a fixed symbol table.