从推理引擎到驱动程序和代理运行时,AI 的系统层越来越多地使用 Rust 编写。NVIDIA 的 Nova Linux 驱动是用 Rust 编写的,NVIDIA Dynamo:https://www.nvidia.com/en-us/ai/dynamo/ 具有 Rust 核心,NVTX 也有 Rust 绑定。GPU 内核是一个例外。
这两个途径对应 CUDA 已经提供的两种编程模型。SIMT 是 CUDA C++ 和 numba-cuda:https://nvidia.github.io/numba-cuda/ 使用的模型:你描述一个线程的动作并启动成千上万的线程。Tile 是较新的模型,也可用于 C++:https://docs.nvidia.com/cuda/cuda-tile-cpp-api-reference/ 和 Python:https://docs.nvidia.com/cuda/cutile-python/:你描述一片数据瓦片的动作,Tile IR 编译器:https://docs.nvidia.com/cuda/tile-ir/latest/index.html 负责线程映射和内存布局。NVIDIA 建议优先使用 Tile,而对于需要显式线程和内存控制的场景使用 SIMT。计划中的跨语言互操作意味着选择 Rust 不会让开发者无法使用 C++ 或 Python。
cuda-oxide 是一个自定义的 rustc 代码生成后端。它通过 Rust MIR、社区的 Pliron:https://github.com/pliron-org/pliron IR 框架和 LLVM IR 将 #[kernel] 函数路由到 PTX,然后将其他部分交给标准后端处理。NVIDIA 在 Pliron 之上编写了 GPU 方言。
需要与我们合作推广您的 GitHub 仓库、Hugging Face 页面、产品发布或网络研讨会等吗?请联系:https://forms.gle/wbash1wF6efRj8G58
Asif Razzaq 是 Marktechpost Media Inc. 的首席执行官。作为一名有远见的企业家和工程师,Asif 致力于利用人工智能的潜力为社会带来益处。他最近的努力是推出了一个人工智能媒体平台 Marktechpost,该平台以对机器学习和深度学习新闻的深入报道而脱颖而出,这些报道既具有技术性又易于广大受众理解。该平台每月浏览量超过 200 万次,显示了其在观众中的受欢迎程度。
以从业者为先的 AI/ML 新闻和分析,每月有 100 万以上的开发者和研究人员阅读。
NVIDIA has announced CUDA Rust:https://developer.nvidia.com/blog/introducing-cuda-rust-two-tracks-for-writing-gpu-kernels/, a push to make Rust a first-class language for writing GPU kernels. Rust code could already launch CUDA kernels, but the kernel body usually had to be written elsewhere. CUDA Rust closes that gap with two NVlabs open-source projects: cuda-oxide:https://github.com/NVlabs/cuda-oxide for the SIMT model and cutile-rs:https://github.com/NVlabs/cutile-rs for the newer Tile model. Both compile Rust kernels natively and use Rust’s ownership rules to reject aliasing bugs at compile time.
Is it deployable? Partially. cutile-rs is published on crates.io:https://crates.io/crates/cutile, runs on stable Rust 1.89+, and is already used in Hugging Face’s Grout:https://github.com/huggingface/grout inference engine and in mistral.rs:https://github.com/EricLBuehler/mistral.rs. cuda-oxide is early alpha. The both projects are in alpha phase and not confirmed for production.
The systems layer of AI, from inference engines to drivers and agent runtimes, is increasingly written in Rust. NVIDIA’s Nova Linux driver is in Rust, NVIDIA Dynamo:https://www.nvidia.com/en-us/ai/dynamo/ has a Rust core, and NVTX has Rust bindings. The GPU kernel was the exception.
The two tracks mirror the two programming models CUDA already offers. SIMT is the model used in CUDA C++ and numba-cuda:https://nvidia.github.io/numba-cuda/: you describe what one thread does and launch thousands of them. Tile is the newer model, also available in C++:https://docs.nvidia.com/cuda/cuda-tile-cpp-api-reference/ and Python:https://docs.nvidia.com/cuda/cutile-python/: you describe what one tile of data does, and the Tile IR compiler:https://docs.nvidia.com/cuda/tile-ir/latest/index.html handles thread mapping and memory layout. NVIDIA recommends Tile first, with SIMT for explicit thread and memory control. Planned inter-language interop means choosing Rust will not lock developers out of C++ or Python.
cuda-oxide is a custom rustc codegen backend. It routes #[kernel] functions through Rust MIR, the community Pliron:https://github.com/pliron-org/pliron IR framework, and LLVM IR down to PTX, then hands everything else to the standard backend. NVIDIA wrote the GPU dialects on top of Pliron.
Requirements: Linux, a GPU with compute capability 8.0 or later, CUDA 12.x or newer, clang with libclang, and a pinned nightly toolchain ( nightly-2026-04-03 ). cargo oxide doctor checks the setup and cargo oxide new scaffolds a vector addition program, with host and device code in one file.
The safety argument sits in the kernel signature. Inputs a and b are ordinary shared slices. The output c is a DisjointSlice , a type that gives each thread exclusive access to its own element. A plain &mut [f32] would need every thread to hold the same mutable borrow, which Rust refuses. c.get_mut(idx) returns an Option , so out-of-bounds access becomes a handled branch. A #[launch_contract] attribute declares the block shape, and the generated prepare_vecadd method validates the launch configuration against it before the safe launch runs.
cutile-rs works one level higher. Each tile block runs the kernel body once as a single logical thread over one sub-tensor, and the compiler decides how many real GPU threads back it. The #[cutile::module] macro embeds the kernel’s AST in the host binary and JIT-compiles it through CUDA Tile IR when the kernel is first launched.
Requirements are lighter: compute capability 8.0 or later, CUDA 13.3, stable Rust 1.89 or newer, and Linux, with no nightly and no custom LLVM. Setup is cargo new , then cargo add cutile .
The host-side .partition([128]) call does 3 jobs. It gives each tile exclusive ownership of its 128-element chunk, fixes the grid at 1,024 / 128 = 8 tiles, and supplies the const tile width B . Input tensors use -1 as a dynamic dimension resolved at launch. The generated launcher takes ownership of all tensors and returns them when the GPU finishes. Nothing executes until .sync_on(&stream) ; everything before it is a lazy description recorded in one chain.
Passing the SIMT kernel’s output buffer as one of its own inputs fails with error[E0502]: cannot borrow c_dev as mutable because it is also borrowed as immutable . The same aliasing on the Tile side fails with error[E0382]: use of moved value: z . cuda-oxide checks each launch call; cutile-rs’s ownership follows tensors across the launch boundary, which NVIDIA calls the stronger guarantee.
Tile exposes no shared memory or thread indexing to misuse. SIMT keeps that control, but shared memory in cuda-oxide currently requires unsafe .
Need to partner with us for promoting your GitHub Repo OR Hugging Face Page OR Product Release OR Webinar etc.? Connect with us :https://forms.gle/wbash1wF6efRj8G58
Asif Razzaq is the CEO of Marktechpost Media Inc.. As a visionary entrepreneur and engineer, Asif is committed to harnessing the potential of Artificial Intelligence for social good. His most recent endeavor is the launch of an Artificial Intelligence Media Platform, Marktechpost, which stands out for its in-depth coverage of machine learning and deep learning news that is both technically sound and easily understandable by a wide audience. The platform boasts of over 2 million monthly views, illustrating its popularity among audiences.
Practitioner-first AI/ML news and analysis, read by 1M+ developers and researchers every month.