Modular GPU Programming with Typed Perspectives

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Bansal, Manya, Sainati, Daniel, Cutler, Joseph W., Amarasinghe, Saman, Ragan-Kelley, Jonathan
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866911266661990400
author Bansal, Manya
Sainati, Daniel
Cutler, Joseph W.
Amarasinghe, Saman
Ragan-Kelley, Jonathan
author_facet Bansal, Manya
Sainati, Daniel
Cutler, Joseph W.
Amarasinghe, Saman
Ragan-Kelley, Jonathan
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2511_11939
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Modular GPU Programming with Typed Perspectives
Bansal, Manya
Sainati, Daniel
Cutler, Joseph W.
Amarasinghe, Saman
Ragan-Kelley, Jonathan
Programming Languages
Distributed, Parallel, and Cluster Computing
D.3.0; D.3.3; C.1.2
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.
title Modular GPU Programming with Typed Perspectives
topic Programming Languages
Distributed, Parallel, and Cluster Computing
D.3.0; D.3.3; C.1.2
url https://arxiv.org/abs/2511.11939