Introduction
As Deep Neural Networks (DNNs) scale to billions of parameters, they increasingly exceed the memory capacity of individual GPUs. While Data Parallelism (DP) is a standard scaling technique, it requires the entire model to fit on every device. Pipeline Parallelism (PP) addresses this by splitting models across multiple devices, but existing synchronous approaches like GPipe often suffer from high peak memory usage or efficiency losses due to re-computation. DAPPLE introduces a synchronous training framework designed to overcome these bottlenecks through a topology-aware planner and a novel scheduling algorithm.
System Architecture
DAPPLE is structured into three primary components that automate the parallelization process:
- DAPPLE Profiler: This component measures execution times, activation sizes, and parameter sizes for each layer of the target model.
- DAPPLE Planner: Utilizing Dynamic Programming, the planner identifies the optimal hybrid strategy. it partitions layers into stages, determines stage replication (DP within the pipeline), and maps these to hardware based on interconnect speeds (e.g., NVLink vs. Ethernet).
- DAPPLE Runtime: The execution engine that implements the generated plan using a specialized scheduler.
Early Backward Scheduling
A core innovation of DAPPLE is its Early Backward Scheduling algorithm. In traditional synchronous pipeline parallelism (like GPipe), a device typically processes all forward micro-batches before starting any backward passes. This leads to a massive accumulation of activation data in memory.
DAPPLE instead interleaves forward and backward tasks. As soon as a micro-batch completes its forward pass and the pipeline state allows, the scheduler triggers the corresponding backward pass. This "just-in-time" execution releases the memory held by activations much earlier, effectively decoupling memory pressure from the total pipeline depth.
Key Insights and Methodology
- Topology-Awareness: DAPPLE recognizes the hierarchy of modern hardware. The planner intentionally places heavy gradient synchronization (AllReduce) over high-speed NVLink while assigning smaller activation transfers to slower Ethernet links.
- The Pivot Stage Heuristic: To simplify the complexity of predicting pipeline latency, DAPPLE identifies a "pivot stage"—the bottleneck stage with the least idle time—to determine overall throughput.
- Flexible Partitioning: The framework demonstrates that uneven layer partitions can sometimes be superior if they better align with hardware topology or reduce communication overhead.
Evaluation and Results
The authors evaluated DAPPLE across various NLP and CV benchmarks, including BERT-48, XLNet-36, and ResNet-50, on clusters of NVIDIA V100 GPUs. Key findings include:
- Throughput: DAPPLE achieved up to 1.6x higher throughput than GPipe.
- Memory Efficiency: The system reduced peak memory consumption by 12% compared to GPipe. When combined with re-computation, it saved an additional 20% of memory, enabling the training of a 5.5 billion parameter BERT model on only 8 GPUs.
- Planner Performance: The DAPPLE planner generated strategies up to 3.23x faster than adapted versions of previous tools like PipeDream.
Conclusion
DAPPLE provides a robust solution for training massive models by optimizing the trade-off between memory usage and throughput. While it currently relies on static offline profiling, its ability to generate topology-aware, memory-efficient schedules represents a significant advancement in synchronous distributed training. Future work may explore dynamic scheduling to better handle variable execution times and network congestion.
Summary updated