GPU concurrency: weak behaviours and programming assumptions
File(s) paper.pdf (223.02 KB)
Accepted version
Author(s)
Type
Conference Paper
Abstract
Concurrency is pervasive and perplexing, particularly on graphics processing units (GPUs). Current specifications of languages and hardware are inconclusive; thus programmers often rely on folklore assumptions when writing software.
To remedy this state of affairs, we conducted a large empirical study of the concurrent behaviour of deployed GPUs. Armed with litmus tests (i.e. short concurrent programs), we questioned the assumptions in programming guides and vendor documentation about the guarantees provided by hardware. We developed a tool to generate thousands of litmus tests and run them under stressful workloads. We observed a litany of previously elusive weak behaviours, and exposed folklore beliefs about GPU programming---often supported by official tutorials---as false.
As a way forward, we propose a model of Nvidia GPU hardware, which correctly models every behaviour witnessed in our experiments. The model is a variant of SPARC Relaxed Memory Order (RMO), structured following the GPU concurrency hierarchy.
To remedy this state of affairs, we conducted a large empirical study of the concurrent behaviour of deployed GPUs. Armed with litmus tests (i.e. short concurrent programs), we questioned the assumptions in programming guides and vendor documentation about the guarantees provided by hardware. We developed a tool to generate thousands of litmus tests and run them under stressful workloads. We observed a litany of previously elusive weak behaviours, and exposed folklore beliefs about GPU programming---often supported by official tutorials---as false.
As a way forward, we propose a model of Nvidia GPU hardware, which correctly models every behaviour witnessed in our experiments. The model is a variant of SPARC Relaxed Memory Order (RMO), structured following the GPU concurrency hierarchy.
Date Issued
2015-04-01
Date Acceptance
2014-11-10
Citation
ACM Sigplan Notices, 2015, 50 (4), pp.577-591
ISSN
1523-2867
Publisher
Association for Computing Machinery
Start Page
577
End Page
591
Journal / Book Title
ACM Sigplan Notices
Volume
50
Issue
4
Copyright Statement
Copyright © 2015 ACM. This is the author's version of the work. It is posted here by permission of ACM for your personal use. Not for redistribution. The definitive version was published in ASPLOS '15, (2015) http://doi.acm.org/10.1145/10.1145/2694344.2694391
Sponsor
Engineering & Physical Science Research Council (EPSRC)
Grant Number
EP/K011499/1
Source
Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS)
Subjects
Science & Technology
Technology
Computer Science, Software Engineering
Computer Science
memory consistency
GPU
Nvidia PTX
OpenCL
litmus testing
test generation
formal model
Software Engineering
Publication Status
Published
Start Date
2015-03-14
Finish Date
2015-03-18
Coverage Spatial
Istanbul, Turkey
Date Publish Online
2015-03-14
