Abstract
Training massive Deep Neural Networks (DNNs) requires efficient model distribution across multiple GPUs. While Pipeline Parallelism (PP) is a standard technique, existing frameworks like GPipe and PipeDream often suffer from significant memory imbalance, wasting over 40% of available GPU memory. This paper introduces DawnPiper, a memory-scalable PP framework that leverages fine-grained compiler-based profiling and a novel binary partitioning algorithm. By balancing both computation and memory resources, DawnPiper achieves up to an 11× increase in maximum trainable batch size and a 1.5× performance speedup over state-of-the-art baselines.
Introduction
As DNN models grow in size, they exceed the memory capacity of individual GPUs, necessitating parallelization. Pipeline Parallelism (PP) divides a model into stages, each assigned to a different GPU. However, traditional PP frameworks primarily focus on balancing computation time to minimize idle "bubbles," often ignoring the heterogeneous memory footprints of different layers. This oversight leads to memory bottlenecks: when a single GPU reaches its memory limit, the entire pipeline is throttled, even if other GPUs have significant unused capacity.
The Memory Imbalance Problem
Existing tools like GPipe (synchronous) and PipeDream (asynchronous) treat layers as coarse blocks. Because different layers have vastly different activation and parameter memory requirements, a compute-balanced partition often results in severe memory imbalance. For instance, in models like BERT or AmoebaNet, certain stages may consume significantly more memory than others, leading to wasted resources and limited batch sizes.
Methodology
DawnPiper addresses these challenges through a three-pronged approach:
- Fine-Grained Profiling: Utilizing deep learning compilation (via
torch.fx), DawnPiper transforms models into fine-grained computation graphs. This allows partitioning at the level of individual operators and tensors, providing the precision needed for better balancing. - The Partitioning Theorem: The authors prove a "performance-optimal theorem," identifying that the ideal partition point lies between the compute-balanced and memory-balanced positions. This theoretical insight significantly narrows the search space for optimal strategies.
- Binary Pipeline Partitioning: DawnPiper employs a recursive binary search to find optimal split points. It integrates a cost-model-based optimization to determine where to apply memory swapping (to CPU) or recomputation to maximize GPU utilization.
Evaluation and Results
DawnPiper was evaluated using industry-standard models including BERT, T5, GPT-2, and AmoebaNet on a cluster of 8 NVIDIA Tesla A100 GPUs.
Key Findings:
- Maximum Batch Size: DawnPiper achieved a staggering 11× increase in maximum batch size compared to PipeDream and a 4× increase over vPipe.
- Training Throughput: The framework provided up to a 1.5× speedup in synchronous mode. In asynchronous mode, it consistently outperformed baselines as batch sizes increased due to superior GPU utilization.
- Resource Efficiency: For the irregular AmoebaNet model, DawnPiper improved overall GPU memory utilization by 17.8% and reduced the execution time gap between stages from 35.8% to just 7.7%.
Conclusion
DawnPiper demonstrates that fine-grained, memory-aware partitioning is critical for scaling the training of massive DNNs. By breaking the compute-only focus of traditional pipeline parallelism, it unlocks significant hardware potential. Future work will explore extending these optimizations to 3D parallelism strategies that combine data, tensor, and pipeline dimensions.
Summary updated