paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Descend: A Safe GPU Systems Programming Language

Descend:一种安全的 GPU 系统编程语言
PLDI 8(PLDI)2024匹配度 2/10 · 论文属于 PL/类型系统与 GPU 内存安全方向,提出安全 GPU 系统编程语言并通过 ownership/lifetime 与 borrow checking 保证 CPU/GPU 内存安全;但未涉及 LLM/Agent、静态分析在 ML/Agentic 程序中的应用,也不涉及浮点程序分析或贝叶斯程序分析。引用 10 inbox
Bastian Köpcke, Sergei Gorlatch, Michel Steuwer
dblp: 2026-09-10crossref: 2026-09-10arxiv: 2026-09-10

AI 速览

一句话:提出 Descend,一种在类型系统中追踪所有权与生命周期、保证 CPU/GPU 内存安全并支持 GPU 层次化执行资源的系统编程语言。

GPU 提供大规模并行算力,但 CUDA/OpenCL 等 C/C++ 系语言用原始指针访问内存,易产生数据竞争和死锁。Descend 是受 Rust 启发的安全命令式 GPU 系统编程语言,在类型系统中追踪所有权与生命周期以保证 CPU/GPU 内存安全。它引入覆盖 grid、block、warp、thread 的层次化 GPU 模型,并用扩展 borrow checking、views 与原子变量确保执行资源无数据竞争地访问内存,无法检查的代码段可标注 unsafe。论文讨论其内存安全保证,并用多个基准测试表明其能表达真实 GPU 程序,性能与手写 CUDA 相比有竞争力。

问题
GPU 等大规模并行硬件的编程依赖 CUDA/OpenCL 等不安全的 C/C++ 系语言,原始指针容易导致数据竞争、死锁等难以检测的错误,且需手动协调数千线程与共享内存访问。
方法
Descend 受 Rust 启发,在类型系统中追踪所有权与生命周期,引入覆盖 grid、block、warp、thread 的层次化 GPU 编程模型,并通过扩展 borrow checking、views 和原子变量保证执行资源安全访问内存,允许将有限代码段标注为 unsafe。
评估
论文论证了 Descend 提供的内存安全保证,并使用多个基准测试表明其能表达真实 GPU 程序,性能与手写 CUDA 程序具有竞争力。
原文摘要(Abstract)

Graphics Processing Units (GPU) offer tremendous computational power by following a throughput oriented paradigm where many thousand computational units operate in parallel. Programming such massively parallel hardware is challenging. Programmers must correctly and efficiently coordinate thousands of threads and their accesses to various shared memory spaces. Existing mainstream GPU programming languages, such as CUDA and OpenCL, are based on C/C++ inheriting their fundamentally unsafe ways to access memory via raw pointers. This facilitates easy to make, but hard to detect bugs, such as data races and deadlocks . In this paper, we present Descend : a safe GPU programming language. In contrast to prior safe high-level GPU programming approaches, Descend is an imperative GPU systems programming language in the spirit of Rust, enforcing safe CPU and GPU memory management in the type system by tracking Ownership and Lifetimes . Descend introduces a new holistic GPU programming model where computations are hierarchically scheduled over the GPU’s execution resources : grid, blocks, warps, and threads. Descend’s extended Borrow checking ensures that execution resources safely access memory regions without data races. For this, we introduced views describing safe parallel access patterns of memory regions, as well as atomic variables. For memory accesses that can’t be checked by our type system, users can annotate limited code sections as unsafe . We discuss the memory safety guarantees offered by Descend and evaluate our implementation using multiple benchmarks, demonstrating that Descend is capable of expressing real-world GPU programs showing competitive performance compared to manually written CUDA programs lacking Descend’s safety guarantees.

链接与引用

DOI 原文 · arXiv · PDF(开放获取) · DBLP

BibTeX
@article{KopckeGS24,
  title = {Descend: A Safe GPU Systems Programming Language},
  author = {Bastian Köpcke and Sergei Gorlatch and Michel Steuwer},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {8},
  number = {PLDI},
  year = {2024},
  doi = {10.1145/3656411}
}