Proteus: Simulating the Performance of Distributed DNN Training

Jiangfei Duan, Xiuhong Li, Ping Xu, Xingcheng Zhang, Shengen Yan, Yun Liang, Dahua Lin

TL;DR

This paper introduces Proteus, a novel simulator for accurately modeling the performance of complex parallelization strategies in distributed deep neural network (DNN) training. By introducing a hierarchical "Strategy Tree" and a "Hierarchical Topo-Aware Executor," Proteus can capture intricate runtime behaviors like bandwidth sharing and computation-communication overlap, achieving significantly lower prediction errors than existing methods.

What Problem Does This Paper Address?

Training increasingly large DNN models requires massive computing clusters and sophisticated parallelization strategies to achieve acceptable training times. However, accurately predicting the performance of these strategies is challenging due to their complexity and the intricate runtime behaviors they introduce. Existing performance models often struggle with these complex strategies, are limited to simpler parallelism types (like data or model parallelism), or are designed for automated strategy search rather than accurate prediction. This gap makes it difficult for researchers and engineers to optimize training performance, analyze costs, and make informed decisions about cluster resource allocation without costly experimentation.

Methods

Proteus tackles this problem with two main innovations:

  • Strategy Tree: A hierarchical tree structure is used to represent complex parallelization strategies. This tree classifies strategies into "operator-level" (how individual operations and tensors are split) and "subgraph-level" (how groups of operations, like layers or entire network blocks, are scheduled). This unified representation allows for modeling a vast and complex strategy space, including combinations of data, model, pipeline, and recomputation parallelism.
  • Hierarchical Topo-Aware Executor (HTAE): This component simulates the execution of the compiled strategy. It goes beyond simply summing operator costs by actively detecting and modeling two critical runtime behaviors:
  • Bandwidth Sharing: When multiple communication operations compete for the same physical network links, their performance degrades. HTAE models this by considering the cluster's topology and how communication groups share bandwidth.
  • Comp-Comm Overlap: The ability to overlap computation with communication operations can hide latency. HTAE simulates this overlap and models its impact on operator costs.

Proteus first compiles the DNN model and Strategy Tree into a distributed execution graph. Then, HTAE simulates this graph, adapting operator costs based on detected runtime behaviors and the cluster's topology to predict training throughput and Out-Of-Memory (OOM) errors.

Datasets

The paper evaluates Proteus using six representative DNN models: ResNet50, Inception_V3, VGG19, GPT-2, GPT-1.5B, and DLRM. These models cover vision, NLP, and recommendation tasks. The evaluation uses synthetic datasets, explicitly stating that data loading latency is ignored as it is orthogonal to the core problem of parallelization strategy performance modeling.

Key Insights and Ideas

  • Complexity of Parallelization Strategies: The paper highlights that modern DNN training relies on intricate, hierarchical parallelization strategies that combine multiple techniques (data, model, pipeline, recomputation) at different levels. Simple models are insufficient.
  • Runtime Behaviors are Crucial: Ignoring runtime behaviors like bandwidth sharing and comp-comm overlap leads to significant prediction errors. These behaviors are not static but emerge from the interaction of strategies and hardware topology.
  • Hierarchical Representation is Key: A hierarchical "Strategy Tree" is an effective way to represent the complex, nested nature of parallelization strategies, offering a more expressive and manageable space than flat computation graphs.
  • Topology Matters: The physical layout and interconnects of the cluster significantly impact communication performance, especially bandwidth sharing. Proteus's "Topo-Aware" executor is vital for capturing this.
  • Simulation as a Practical Approach: While analytical models have limitations, simulation, when done accurately by capturing runtime behaviors, provides a powerful tool for performance prediction without requiring actual GPU resources for every strategy evaluation.

Key Results

  • Proteus achieves an average prediction error of 3.0% for training throughput across various DNN models and hardware configurations.
  • It significantly reduces prediction error by up to 133.8% compared to state-of-the-art approaches like FlexFlow-Sim.
  • Proteus preserves the relative order of training throughput for different parallelization strategies, which is crucial for strategy comparison and optimization.
  • The inclusion of runtime behavior modeling (comp-comm overlap and bandwidth sharing) drastically improves prediction accuracy, reducing errors from 14.4% to 2.4% for VGG19 in specific scenarios.
  • The simulation cost is reported to be in the order of seconds for large-scale configurations, making it practical for evaluating strategies.

Limitations and Future Work

  • Limited Strategy Space Evaluation: The paper states they evaluate Proteus on "2 popular parallelization strategies" (one common, one expert-designed) for each model, acknowledging that exploring "less commonly used parallelization strategies" was not done due to implementation difficulty. Future work could explore a broader range of handcrafted strategies.
  • Synthetic Datasets: The evaluation uses synthetic datasets, ignoring data loading latency. Extending Proteus to incorporate realistic data loading pipelines would be a valuable future direction.
  • Comp-Comm Overlap Factor: The paper uses a fixed "overlap factor γ" for comp-comm overlap, derived from profiling. While effective, exploring more dynamic or learned approaches for this factor could further improve accuracy.
  • Extensibility: Proteus is designed to be extensible, with the potential to incorporate more sophisticated operator cost models and communication primitives.

Summary updated

BibTeX
@article{duan2023proteus,
  author = {Jiangfei Duan and Xiuhong Li and Ping Xu and Xingcheng Zhang and Shengen Yan and Yun Liang and Dahua Lin},
  title = {{Proteus: Simulating the Performance of Distributed DNN Training}},
  journal = {IEEE Trans. Parallel Distributed Syst.},
  year = {2023},
}
Figure