Portable Inter-workgroup Barrier Synchronisation for GPUs
File(s) paper.pdf (817.65 KB)
Accepted version
Author(s)
Sorensen, T
Donaldson, AF
Batty, M
Gopalakrishnan, G
Rakamaric, Z
Type
Conference Paper
Abstract
Despite the growing popularity of GPGPU programming,
there is not yet a portable and formally-specified barrier
that one can use to synchronise across workgroups. Moreover,
the occupancy-bound execution model of GPUs breaks
assumptions inherent in traditional software execution barriers,
exposing them to deadlock. We present an occupancy
discovery protocol that dynamically discovers a safe estimate
of the occupancy for a given GPU and kernel, allowing
for a starvation-free (and hence, deadlock-free) interworkgroup
barrier by restricting the number of workgroups
according to this estimate. We implement this idea by
adapting an existing, previously non-portable, GPU interworkgroup
barrier to use OpenCL 2.0 atomic operations,
and prove that the barrier meets its natural specification in
terms of synchronisation.
We assess the portability of our approach over eight
GPUs spanning four vendors, comparing the performance
of our method against alternative methods. Our key findings
include: (1) the recall of our discovery protocol is
nearly 100%; (2) runtime comparisons vary substantially
across GPUs and applications; and (3) our method provides
portable and safe inter-workgroup synchronisation across
the applications we study.
there is not yet a portable and formally-specified barrier
that one can use to synchronise across workgroups. Moreover,
the occupancy-bound execution model of GPUs breaks
assumptions inherent in traditional software execution barriers,
exposing them to deadlock. We present an occupancy
discovery protocol that dynamically discovers a safe estimate
of the occupancy for a given GPU and kernel, allowing
for a starvation-free (and hence, deadlock-free) interworkgroup
barrier by restricting the number of workgroups
according to this estimate. We implement this idea by
adapting an existing, previously non-portable, GPU interworkgroup
barrier to use OpenCL 2.0 atomic operations,
and prove that the barrier meets its natural specification in
terms of synchronisation.
We assess the portability of our approach over eight
GPUs spanning four vendors, comparing the performance
of our method against alternative methods. Our key findings
include: (1) the recall of our discovery protocol is
nearly 100%; (2) runtime comparisons vary substantially
across GPUs and applications; and (3) our method provides
portable and safe inter-workgroup synchronisation across
the applications we study.
Date Issued
2016-10-19
Date Acceptance
2016-08-02
Citation
Proceedings of the 2016 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2016, part of {SPLASH} 2016, 2016, pp.39-58
ISBN
978-1-4503-4444-9
Publisher
ACM
Start Page
39
End Page
58
Journal / Book Title
Proceedings of the 2016 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2016, part of {SPLASH} 2016
Copyright Statement
© ACM, 2016. 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 Proceedings of the 2016 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2016, part of {SPLASH} 2016, 19 Oct 2016 http://doi.acm.org/10.1145/3022671.2984032
Sponsor
Engineering & Physical Science Research Council (E
GCHQ
Grant Number
EP/K503733/1
N/A
Source
The 2016 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications
Subjects
Science & Technology
Technology
Computer Science, Software Engineering
Computer Science
GPU
OpenCL
barrier
synchronisation
portability
Software Engineering
Publication Status
Published
Start Date
2016-10-30
Finish Date
2016-11-04
Coverage Spatial
Amsterdam, Netherlands
