Lobsters | 原文链接 | 2026-09-10 收录

NVIDIA 推出 CUDA Rust:SIMT 与 Tile 两条轨,让 GPU 内核也能原生用 Rust 写并编译到 PTX

来源: developer.nvidia.com — 2026-09-08

概述

NVIDIA 官宣押注原生 Rust GPU 编程,推出 CUDA Rust,让内核不再只是「从别的语言启动」,而是真用 Rust 写、原生编译成 PTX。它照 CUDA 已有的两条轨道展开:SIMT 轨的项目叫 cuda-oxide,是一个自定义 rustc codegen 后端,把 `#[kernel]` 函数经由 MIR、Pliron IR、LLVM 一直降到 PTX;Tile 轨的叫 cutile-rs,在稳定 Rust 上把计算放到 tile 粒度、由编译期管线程映射与内存布局,内核体以单逻辑线程跑、通过 CUDA Tile IR 在首次调用时 JIT。两者的卖点都是把内存安全在编译期就守住:SIMT 用 DisjointSlice 与 launch contract 防别名并校验启动配置,Tile 用张量 partition 把独占写权限交给每个 tile。代价不同——cuda-oxide 要固定 nightly + LLVM,cutile-rs 只需稳定 Rust 1.89+ 与 CUDA 13.3。目前 cutile 已发布在 crates.io 并被 HuggingFace Grout 与 mistral.rs 采用,cuda-oxide 仍是早期 alpha,两项目均未生产就绪,NVIDIA 也预告将支持与其他前端互操作。

核心要点

金句

The GPU kernel is the exception. You can launch kernels from Rust, but the kernel itself often has to be written in another language. CUDA Rust closes that gap.
返回 Lobsters 首页