Abstract
Distributed training using multiple devices (e.g., GPUs) has been widely adopted for learning DNN models over large datasets. However, the performance of large-scale distributed training tends to be far from linear speed-up in practice. Given the complexity of distributed systems, it is challenging to identify the root cause(s) of inefficiency and exercise effective performance optimizations when unexpected low training speed occurs. To date, there exists no software tool which diagnoses performance issues and helps expedite distributed DNN training, while the training can be run using different deep learning frameworks. This paper proposes dPRO, a toolkit that includes: (1) an efficient profiler that collects runtime traces of distributed DNN training across multiple frameworks, especially fine-grained communication traces, and constructs global data flow graphs including detailed communication operations for accurate replay; (2) an optimizer that effectively identifies performance bottlenecks and explores optimization strategies (from computation, communication, and memory aspects) for training acceleration. We implement dPRO on multiple deep learning frameworks (TensorFlow, MXNet) and representative communication schemes (AllReduce and Parameter Server). Extensive experiments show that dPRO predicts the performance of distributed training in various settings with < 5% errors in most cases and finds optimization strategies with up to 3.48x speed-up over the baselines.
Introduction
Distributed training is the backbone of modern AI, enabling the training of massive models like BERT or ResNet on large GPU clusters. However, doubling hardware rarely results in a linear doubling of training speed. Communication overhead, "straggler" nodes, and poor overlapping of computation and data transfer often lead to sub-linear scaling. Identifying the root causes of these inefficiencies is difficult because existing tools are often framework-siloed or provide only a local view of a single machine. They frequently struggle with clock drift across servers, inaccurate communication profiling (missing queuing time), and the sheer complexity of choosing the right combination of optimizations.
Methodology
The dPRO toolkit addresses these challenges through a three-pillar architecture: a Profiler, a Replayer, and an Optimizer.
1. Profiler and Global Data Flow Graph (DFG)
dPRO collects fine-grained traces from multiple workers to construct a Global DFG. This graph maps every computation and communication task across the entire cluster, capturing the intricate dependencies between them. To resolve clock drift without specialized hardware, dPRO treats timestamp alignment as a mathematical optimization problem, using the known dependencies between "send" and "receive" operations to calculate exact time offsets.
2. The Optimizer
The Optimizer identifies the critical path—the sequence of tasks determining total iteration time—and explores various optimization passes:
- Operator Fusion: Combining small math operations to reduce overhead.
- Tensor Fusion/Partitioning: Grouping or splitting network transfers to better hide latency.
- Re-computation: Trading computation for memory to optimize the schedule.
To manage the massive search space, dPRO employs a "Coarsened View," grouping related operations into blocks based on the inherent symmetry of DNN models (e.g., repeated Transformer blocks). This reduces search time from over 24 hours to less than one hour.
Key Insights: The Impact of Optimization
A critical finding of this research is that standard optimizations can sometimes be counterproductive in a distributed environment. For instance, default operator fusion (like XLA) might delay the start of network transfers, reducing the overlap between computation and communication.
As shown in Figure 1, while "OP fusion" might speed up local computation, it can push back the start of communication tasks (A and B), potentially extending the overall iteration time. dPRO’s global view allows it to navigate these trade-offs effectively.
Evaluation and Results
The researchers evaluated dPRO using standard models (BERT Base, ResNet50, VGG16, InceptionV3) on a production-grade cluster with up to 128 NVIDIA V100 GPUs. The system was tested across TensorFlow and MXNet using both Parameter Server (BytePS) and AllReduce (Horovod) schemes.
- High Simulation Accuracy: dPRO’s replayer predicts actual training time with less than 5% error in most cases. This significantly outperforms previous state-of-the-art tools like Daydream, which can have error rates as high as 70% due to an inability to account for complex network queuing.
- Significant Speedups: dPRO identified optimization strategies providing up to 3.48× speedup over default XLA strategies on large clusters.
- Search Efficiency: The symmetry-based search allows dPRO to find optimal configurations for complex models like BERT in approximately 30 minutes.
Conclusion
dPRO provides a comprehensive "global view" necessary for optimizing distributed DNN training. By accurately simulating performance and intelligently navigating a complex optimization space, it offers a robust solution for researchers and engineers to maximize the efficiency of their GPU clusters. Future work may extend these capabilities to pipeline and model parallelism and address dynamic workloads in shared cluster environments.
Summary updated