Descend: A Safe GPU Systems Programming Language

05/05/2023
by   Bastian Köpcke, et al.
0

Graphics Processing Units (GPU) offer tremendous computational power by following a throughput oriented computing paradigm where many thousand computational units operate in parallel. Programming this 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 systems programming language. In the spirit of Rust, Descend's type system enforces safe CPU and GPU memory management 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, and threads. Descend's extended Borrow checking ensures that execution resources safely access memory regions without introducing data races. For this, we introduced views describing safe parallel access patterns of memory regions. We discuss the memory safety guarantees offered by Descend's type system and evaluate our implementation of Descend using a number of benchmarks, showing that no significant runtime overhead is introduced compared to manually written CUDA programs lacking Descend's safety guarantees.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
10/15/2018

MGSim + MGMark: A Framework for Multi-GPU System Research

The rapidly growing popularity and scale of data-parallel workloads dema...
research
06/29/2018

Josephine: Using JavaScript to safely manage the lifetimes of Rust data

This paper is about the interface between languages which use a garbage ...
research
12/26/2022

Modular Formal Verification of Rust Programs with Unsafe Blocks

Rust is a modern systems programming language whose type system guarante...
research
09/29/2021

Unified Shader Programming in C++

In real-time graphics, the strict separation of programming languages an...
research
09/19/2022

Is Rust C++-fast? Benchmarking System Languages on Everyday Routines

Rust is a relatively new system programming language that has been exper...
research
08/09/2023

rCanary: Detecting Memory Leaks Across Semi-automated Memory Management Boundary in Rust

Rust is an effective system programming language that guarantees memory ...
research
12/13/2021

Bento and the Art of Repeated Research

Bento provides a new approach to developing file systems, with safety an...

Please sign up or login with your details

Forgot password? Click here to reset