Compiling Loop-Based Nested Parallelism for Irregular Workloads
Open Access
- 27 April 2024
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 232-250
Abstract
Modern programming languages offer special syntax and semantics for logical fork-join parallelism in the form of parallel loops, allowing them to be nested, e.g., a parallel loop within another parallel loop. This expressiveness comes at a price, however: on modern multicore systems, realizing logical parallelism results in overheads due to the creation and management of parallel tasks, which can wipe out the benefits of parallelism. Today, we expect application programmers to cope with it by manually tuning and optimizing their code. Such tuning requires programmers to reason about architectural factors hidden behind layers of software abstractions, such as task scheduling and load balancing. Managing these factors is particularly challenging when workloads are irregular because their performance is input-sensitive. This paper presents HBC, the first compiler that translates C/C++ programs with high-level, fork-join constructs (e.g., OpenMP) to binaries capable of automatically controlling the cost of parallelism and dealing with irregular, input-sensitive workloads. The basis of our approach is Heartbeat Scheduling, a recent proposal for automatic granularity control, which is backed by formal guarantees on performance. HBC binaries outperform OpenMP binaries for workloads for which even entirely manual solutions struggle to find the right balance between parallelism and its costs.Keywords
Funding Information
- Department of Energy (DE-SC0022268)
- National Science Foundation (CCF-1901381, CCF-2107241, CCF-2115104, NSF-2119069, CCF-2119352, NSF-2107042, NSF-2028851, NSF-1908488)
This publication has 39 references indexed in Scilit:
- Metronome2012
- HELIX2012
- What is Twitter, a social network or a news media?2010
- Rodinia: A benchmark suite for heterogeneous computing2009
- Wool-A work stealing libraryACM SIGARCH Computer Architecture News, 2008
- DNA Electrophoresis Studied with the Cage ModelJournal of Computational Physics, 2002
- Implementing Atomic Sequences on Uniprocessors Using RollforwardSoftware: Practice and Experience, 1996
- Using the run-time sizes of data structures to guide parallel-thread creation1994
- Low-cost process creation and dynamic partitioning in Qlisp1990
- The program dependence graph and its use in optimizationACM Transactions on Programming Languages and Systems, 1987