Partial Flattening: A Compilation Technique for Irregular Nested Parallelism on GPGPUs
Authors:
- Ming-Hsiang HuangMHMing-Hsiang Huang
- Wuu YangWYWuu Yang
- 22 September 2016
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 552-561
Abstract
Supporting irregular nested parallelism on modern GPUs requires much effort. One should distribute the parallel tasks evenly while preserving reasonable memory usage. Moreover, the task distribution should also fit the thread hierarchy of the underlying GPU to fully exploit its computing power. We propose partial flattening, an automatic code transformation which translates annotated C programs to CUDA kernels. Thread blocks are treated as flat SIMT processors. Iterations are dynamically organized into batches. Batches are executed in a sequential (depth-first) order. A kernel is treated as multiple independent SIMT processors with an additional task-stealing mechanism. Partial flattening allows easy expression of nested parallelism and synchronization by annotating nested parallel loops or parallel-recursive calls, while preserving reasonable memory usage by the depth-first execution order. Our 2-level task distribution scheme does not need special hardware support, and fits well with the CUDA thread hierarchy. Experiments show that partial flattening outperforms NESL significantly in most benchmarks, and obtains 2.15x and 67x speedup over CUDA dynamic parallelism in Quicksort and the Bron-Kerbosch algorithm, respectively.Keywords
This publication has 12 references indexed in Scilit:
- Efficient warp execution in presence of divergence with collaborative context collection2015
- CUDA-NP2014
- Nested data-parallelism on the gpu2012
- CuNesl: Compiling Nested Data-Parallel Languages for SIMT Architectures2012
- Lazy tree splittingJournal of Functional Programming, 2012
- Fast Two Dimensional Convex Hull on the GPU2011
- Lessons Learned from Exploring the Backtracking Paradigm on the GPU2011
- GPU-QuicksortACM Journal of Experimental Algorithmics, 2009
- New Algorithms for Enumerating All Maximal Cliques2004
- The quickhull algorithm for convex hullsACM Transactions on Mathematical Software, 1996