Agents

NVIDIA AI Agent Ports GPU Kernels from Python to Rust

NVIDIA has developed an AI agent workflow that successfully translates GPU kernels from Python to Rust, preserving near-native performance while introducing Rust's compile-time safety.

NVIDIA Developer Blog16 hrs agoAgents
Image: NVIDIA Developer Blog

NVIDIA researchers have developed an AI agent skill powered by NVIDIA Nemotron that automates the translation of CUDA tile operations from cuTile Python and Triton-TileIR into cuTile Rust. Operating within the TileGym repository, this multi-agent pipeline successfully ported all 24 public TileGym operators, which encompass roughly 40 GPU kernels. These converted kernels span critical workloads including element-wise operations, flash-attention decode, Multi-head Latent Attention, and mixture-of-experts models.

Benchmarked on an NVIDIA DGX B200 system, the converted cuTile Rust kernels achieved an average geometric mean speedup of 0.995 compared to their cuTile Python baselines, representing virtual performance parity. Every single one of the 24 operators cleared the strict 0.95 geomean speedup threshold. This high fidelity is maintained because both front ends compile down to the same underlying CUDA Tile Intermediate Representation, allowing the system to perform structural "IR diffing" to verify equivalence before running functional tests.

For developers, this development bridges the gap between Python's rapid prototyping and Rust's strict safety guarantees. While cuTile Python relies on implicit just-in-time specialization at call time, cuTile Rust mandates explicit specialization in kernel signatures, exposing type and shape constraints to the rustc compiler. The converted kernels integrate back into TileGym through a C-ABI layer that passes tensor descriptors without memory copying or allocation. Because the system compiles lazily, developers can edit Rust kernels and see immediate updates on the next call, combining the safety of ahead-of-time compilation with the fast iteration cycles of Python. Running the system requires CUDA 13.1 or higher, a Blackwell GPU for performance checks, and Rust 1.89 or higher.

This is our own summary of reporting by NVIDIA Developer Blog

More in Agents