PFACC: An OpenACC‐like programming model for irregular nested parallelism
- 9 July 2020
- journal article
- research article
- Published by Wiley in Software: Practice and Experience
- Vol. 50 (10) , 1877-1904
Abstract
Summary: OpenACC is a directive‐based programming model which allows programmers to write graphic processing unit (GPU) programs by simply annotating parallel loops. However, OpenACC has poor support for irregular nested parallel loops, which are natural choices to express nested parallelism. We propose PFACC, a programming model similar to OpenACC. PFACC directives can be used to annotate parallel loops and to guide data movement between different levels of memory hierarchy. Parallel loops can be arbitrarily nested or be placed inside functions that would be (possibly recursively) called in other parallel loops. The PFACC translator translates C programs with PFACC directives into CUDA programs by inserting runtime iteration‐sharing and memory allocation routines. The PFACC runtime iteration‐sharing routine is a two‐level mechanism. Thread blocks dynamically organize loop iterations into batches and execute the batches in a depth‐first order. Different thread blocks share iterations among one another with an iteration‐stealing mechanism. PFACC generates CUDA programs with reasonable memory usage because of the depth‐first execution order. The two‐level iteration‐sharing mechanism is implemented purely in software and fits well with the CUDA thread hierarchy. Experiments show that PFACC outperforms CUDA dynamic parallelism in terms of performance and code size on most benchmarks.Keywords
Funding Information
- Ministry of Science and Technology, Taiwan, R.O.C. (MOST 103-2221-E-009-105-MY3, MOST 105-2221-E-009-078-MY3)
This publication has 15 references indexed in Scilit:
- Partial Flattening: A Compilation Technique for Irregular Nested Parallelism on GPGPUs2016
- CUDA-NP2014
- Hidp: A hierarchical data parallel language2013
- Nested data-parallelism on the gpu2012
- CuNesl: Compiling Nested Data-Parallel Languages for SIMT Architectures2012
- Lazy tree splittingJournal of Functional Programming, 2012
- A study of Persistent Threads style GPU programming for GPGPU workloads2012
- Copperhead2011
- Cetus – An Extensible Compiler Infrastructure for Source-to-Source Transformation2004
- Piecewise execution of nested data-parallel programsLecture Notes in Computer Science, 1996