Abstract
This paper introduces DisCo, an automated deep learning compilation module specifically designed for data-parallel distributed training. While traditional compilers focus on optimizing performance for single-device execution, they often neglect the communication overhead inherent in multi-GPU environments. DisCo addresses this by jointly optimizing computation operator fusion and communication tensor fusion. By utilizing a Graph Neural Network (GNN)-based simulator to navigate a complex strategy space, DisCo identifies optimization strategies that maximize the overlap between computation and communication. Experimental results demonstrate that DisCo achieves significant training speedups, reaching up to 26.73% over existing frameworks and approaching the theoretical limit of perfect computation-communication overlap.
Introduction
Modern deep learning models require massive computational resources, necessitating distributed training across multiple GPU machines. To optimize performance, deep learning compilers like TVM, XLA, and TASO typically employ operator (op) fusion. This technique combines multiple small operations into a single kernel to reduce memory overhead and kernel launch latency.
However, these compilers are primarily "device-centric." In a distributed setting, the primary bottleneck is often the network synchronization step, such as AllReduce. Standard op fusion can inadvertently delay the availability of gradients, pushing back the start of communication and destroying the "computation-communication overlap" essential for scaling. DisCo proposes a paradigm shift: treating computation and communication as a unified optimization problem rather than independent silos.
The DisCo Framework
DisCo integrates three core components to optimize distributed training performance:
1. Joint Strategy Space
DisCo explores a combined optimization space that includes both op fusion and tensor fusion (grouping multiple AllReduce calls). A unique feature of DisCo is its support for duplicate fusion. In this scenario, a small operation may be recomputed on the fly to free up dependencies earlier, potentially unblocking communication threads sooner than if the system waited for a memory-bound result. This demonstrates that local computational "inefficiency" can lead to global distributed efficiency.
2. GNN-based Fused Operator Estimation
Predicting the execution time of a fused kernel is challenging because the number of possible combinations is too large for exhaustive profiling. DisCo employs a Graph Neural Network (GNN) to predict the latency of fused operators. The GNN analyzes the subgraph of a fused op—considering op types, shapes, and data dependencies—to estimate performance. Trained on 30,000 randomly generated fused op samples, the estimator achieves high accuracy, typically within a 14% error margin for previously unseen kernels.
3. Backtracking Search and Simulation
To identify the optimal strategy without the prohibitive cost of physical execution on a GPU cluster, DisCo utilizes a high-fidelity simulator. The simulator combines the GNN’s operator latency predictions with a linear regression model for network latency. A backtracking search algorithm then navigates the strategy space, pruning sub-optimal paths to find the global "sweet spot" that minimizes total per-iteration training time.
Experimental Evaluation
The authors evaluated DisCo across two distinct GPU clusters (NVIDIA 1080 Ti and Tesla T4) using a variety of representative DNN architectures:
- Computer Vision: VGG19 and ResNet50.
- Natural Language Processing: Transformer, RNNLM, BERT, and Reformer.
DisCo's performance was compared against standard JAX compilation and state-of-the-art single-device compilers like TVM and TASO.
Key Results and Insights
- Superior Speedups: DisCo outperformed JAX’s default compiler by up to 26.73% in distributed environments. It consistently provided better training times than single-device compilers because it accounts for the distributed "big picture."
- Closing the Gap to Perfection: The strategies identified by DisCo brought performance remarkably close to the "Full Overlap" (FO) case—a theoretical upper bound where all communication is perfectly hidden behind computation.
- The Joint Advantage: The research proves that optimizing operators first and then tensors (the standard sequential approach) often leads to local optima. DisCo shows that not fusing certain operators can be beneficial if it allows communication to begin earlier.
- Search Efficiency: The backtracking search, guided by the GNN simulator, typically identifies optimized strategies within a few hours. This overhead is negligible compared to the weeks required for large-scale model training.
Conclusion and Future Work
DisCo represents a significant advancement in distributed deep learning compilation by bridging the gap between local kernel optimization and global network efficiency. Currently, the framework is optimized for data-parallel training. Future work will focus on extending DisCo to support model parallelism and pipeline parallelism, where the transfer of activations between layers introduces additional complexity. By refining the simulator to account for these multi-dimensional parallelisms, the authors aim to provide a truly universal compiler for large-scale distributed AI.
Summary updated