Skip to main content
QUICK REVIEW

[Paper Review] Synthesizing Optimal Parallelism Placement and Reduction Strategies on Hierarchical Systems for Deep Learning

Ningning Xie, Tamara Norman|arXiv (Cornell University)|Oct 20, 2021
Parallel Computing and Optimization TechniquesComputer Science11 references7 citations
TL;DR

This paper presents $P^{2}$, a framework that synthesizes optimal parallelism placements and hierarchy-aware reduction strategies for deep learning on multi-level GPU systems. By modeling parallelism via structured matrices and using syntax-guided program synthesis with formal semantics, $P^{2}$ reduces communication overhead—achieving up to 448× better all-reduce performance and 2.04× speedup over default implementations in 69% of cases—while a simulator predicts top-10 performance with 92% accuracy.

ABSTRACT

We present a novel characterization of the mapping of multiple parallelism forms (e.g. data and model parallelism) onto hierarchical accelerator systems that is hierarchy-aware and greatly reduces the space of software-to-hardware mapping. We experimentally verify the substantial effect of these mappings on all-reduce performance (up to 448x). We offer a novel syntax-guided program synthesis framework that is able to decompose reductions over one or more parallelism axes to sequences of collectives in a hierarchy- and mapping-aware way. For 69% of parallelism placements and user requested reductions, our framework synthesizes programs that outperform the default all-reduce implementation when evaluated on different GPU hierarchies (max 2.04x, average 1.27x). We complement our synthesis tool with a simulator exceeding 90% top-10 accuracy, which therefore reduces the need for massive evaluations of synthesis results to determine a small set of optimal programs and mappings.

Motivation & Objective

  • To address the high communication cost in distributed deep learning caused by suboptimal mapping of multiple parallelism forms (e.g., data and model parallelism) onto hierarchical hardware.
  • To reduce the search space for effective parallelism placements and reduction strategies by introducing a hierarchy-aware, matrix-based representation of mappings.
  • To develop a program synthesis framework that generates optimized collective communication sequences using formal semantics and a domain-specific language (DSL).
  • To enable accurate performance prediction via simulation, minimizing the need for expensive full-scale evaluations of synthesized programs.
  • To demonstrate that custom reduction strategies outperform standard all-reduce across diverse GPU topologies, especially under complex parallelism combinations.

Proposed method

  • The framework models parallelism placement as a parallelism matrix that maps axes of parallelism (e.g., data, model) to system hierarchy levels (e.g., rack, server, GPU), drastically reducing the search space.
  • It introduces a domain-specific language (DSL) to express hierarchical reductions, with formal semantics based on Hoare triples to ensure correctness during synthesis.
  • A syntax-guided synthesis procedure generates sequences of collective operations (e.g., AllReduce) from the DSL, guided by the formal semantics to ensure semantic validity.
  • The system leverages the parallelism matrix to prune the search space of possible reduction strategies, ensuring no valid program is missed while improving efficiency.
  • It includes a simulator that models communication costs across different network layers (NIC, PCIe, NVLink) using realistic bandwidth assumptions to predict performance.
  • The synthesis pipeline integrates with XLA and NCCL, enabling evaluation on real systems using standard deep learning workloads.

Experimental results

Research questions

  • RQ1How can the search space for parallelism placements on hierarchical systems be reduced without sacrificing expressiveness or completeness?
  • RQ2What is the impact of different parallelism mappings on all-reduce performance across diverse GPU system topologies?
  • RQ3Can a formal semantics and DSL-based approach enable the synthesis of high-performance, hierarchy-aware reduction strategies that outperform default all-reduce implementations?
  • RQ4To what extent can simulation accurately predict the performance of synthesized reduction strategies, reducing the need for costly hardware evaluation?
  • RQ5How effective is the combination of parallelism matrix modeling and syntax-guided synthesis in identifying optimal communication patterns for deep learning workloads?

Key findings

  • The performance of a single AllReduce operation varies by up to 448.5× depending on the parallelism placement, demonstrating the critical impact of mapping choices on communication efficiency.
  • For 69% of parallelism placements, the synthesized reduction strategies outperform the default AllReduce implementation, achieving a maximum speedup of 2.04× and an average speedup of 1.27×.
  • The simulator achieves 92% top-10 accuracy in predicting the best-performing reduction strategies, significantly reducing the need for full hardware evaluation.
  • The framework successfully identifies near-optimal programs even in complex topologies, with predictions closely matching experimental results on both V100 and A100 GPU systems.
  • XLA optimizations can interfere with simulation accuracy, but $P^{2}$ still correctly predicts performance for optimized programs, such as those reduced to a single AllReduce step.
  • The use of formal semantics and syntax-guided synthesis ensures that all generated programs are semantically valid, with no false positives or missed optimal solutions.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.