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.
Wed 26 JunDisplayed time zone: Windhoek change
16:00 - 17:20 | Fast Linear AlgebraPLDI Research Papers at Sweden Chair(s): Zachary Tatlock University of Washington | ||
16:00 20mTalk | A Verified Compiler for a Functional Tensor Language PLDI Research Papers Amanda Liu Massachusetts Institute of Technology, Gilbert Bernstein University of Washington, Seattle, Adam Chlipala Massachusetts Institute of Technology, Jonathan Ragan-Kelley Massachusetts Institute of Technology DOI | ||
16:20 20mTalk | [TOPLAS] (De/Re)-Composition of Data-Parallel Computations via Multi-Dimensional Homomorphism PLDI Research Papers Ari Rasch University of Muenster Link to publication DOI Pre-print Media Attached | ||
16:40 20mTalk | Compilation of Modular and General Sparse Workspaces PLDI Research Papers Genghan Zhang Stanford University, Olivia Hsu Stanford University, Fredrik Kjolstad Stanford University DOI | ||
17:00 20mTalk | Descend: A Safe GPU Systems Programming Language PLDI Research Papers Bastian Köpcke University of Münster, Sergei Gorlatch University of Muenster, Michel Steuwer Technische Universität Berlin DOI Pre-print |