一句话:提出 Prism 语言与 typed perspectives,以类型层面区分线程控制粒度,在保持 GPU 高性能的同时恢复模块化编程。
现代 GPU 要达到峰值性能,编程者必须同时以单线程视角发出指令,又要追踪大量线程的收敛以执行 Tensor Core 等集合操作;两种心智模型交织使模块化封装极易出错,按线程调用的集合操作函数必须由线程组协作执行。本文提出 GPU 语言 Prism,核心思想是 typed perspectives:在类型层面具体化程序员控制线程行为的粒度,从而在保留对集合操作低层控制的同时恢复模块化。作者给出 Prism 设计、实现了编译器,并用核心演算 Bundl 奠定理论基础。用 Prism 实现多种先进 GPU 内核后表明,它能在不牺牲性能的前提下提供编写模块化代码所需的安全保证。
To achieve peak performance on modern GPUs, one must balance two frames of mind: issuing instructions to individual threads to control their behavior, while simultaneously tracking the convergence of many threads acting in concert to perform collective operations like Tensor Core instructions. The tension between these two mindsets makes modular programming error prone. Functions that encapsulate collective operations, despite being called per-thread, must be executed cooperatively by groups of threads. In this work, we introduce Prism, a new GPU language that restores modularity while still giving programmers the low-level control over collective operations necessary for high performance. Our core idea is typed perspectives, which materialize, at the type level, the granularity at which the programmer is controlling the behavior of threads. We describe the design of Prism, implement a compiler for it, and lay its theoretical foundations in a core calculus called Bundl. We implement state-of-the-art GPU kernels in Prism and find that it offers programmers the safety guarantees needed to confidently write modular code without sacrificing performance.
DOI 原文 · arXiv · PDF(开放获取) · DBLP
@article{abs-2511-11939,
title = {Modular GPU Programming with Typed Perspectives},
author = {Manya Bansal and Daniel Sainati and Joseph W. Cutler and Saman Amarasinghe and Jonathan Ragan-Kelley},
journal = {Proceedings of the ACM on Programming Languages},
volume = {10},
number = {PLDI},
year = {2026},
doi = {10.1145/3808290}
}