TL;DR
This paper introduces EasyScale, a novel framework for elastic deep learning training on GPUs. EasyScale enables training jobs to dynamically scale their GPU resources up or down without sacrificing model accuracy, a critical issue in existing elastic training systems. This leads to significantly improved GPU cluster utilization and reduced job completion times.
What Problem Does This Paper Address?
Deep learning (DL) models are increasingly trained on large, shared GPU clusters. A common challenge is the "gang-scheduling" policy, where a training job must wait for all its required GPUs to become available simultaneously. This leads to long queuing times and underutilization of cluster resources, especially when resources fluctuate due to other high-priority jobs. While "elastic training" frameworks aim to address this by allowing jobs to adapt to changing resource availability, they often introduce non-determinism, leading to inconsistent model accuracy. This inconsistency is a major barrier to adoption in industry, as it can render models unreliable for critical applications. Furthermore, existing elastic training methods make it difficult for developers to tune hyperparameters, as the training behavior itself changes with resource allocation.
Methods
EasyScale tackles the problem of accuracy-inconsistent elastic training through several key innovations:
- EasyScaleThread (EST) Abstraction: This core abstraction decouples the training procedure from resource allocation. Each EST encapsulates a training worker's state and execution, allowing multiple ESTs to share a single GPU through time-slicing. This preserves the data-parallel training behavior of frameworks like PyTorch DDP.
- Eliminating Non-Determinism: EasyScale meticulously identifies and addresses sources of non-determinism across the DL software stack, including framework states (e.g., RNG states), communication mechanisms (e.g., gradient synchronization), and operator implementations. It introduces three levels of determinism:
- D0 (Static Determinism): Ensures bitwise identical results on fixed resources.
- D1 (Elastic Determinism): Guarantees consistency when resources scale up or down.
- D2 (Heterogeneous Determinism): Ensures consistency across different types of GPUs.
- Lightweight Context Switching: To minimize overhead when switching between ESTs on a GPU, EasyScale intelligently saves and loads only necessary states, leveraging DL characteristics to reduce the working set.
- Optimized Data Pre-processing: EasyScale enables data workers to be shared among ESTs on a single GPU, reducing the overhead of launching numerous data processing processes.
- Hierarchical Scheduler: A two-level scheduler (inter-job/cluster and intra-job) is introduced to efficiently allocate heterogeneous GPU resources among jobs, maximizing cluster utilization and job throughput.
Datasets
The paper mentions using standard datasets for evaluating deep learning workloads, including:
- ImageNet
- PASCAL
- MovieLens
- SQuAD
- CIFAR10
The experiments utilize a variety of state-of-the-art DL models, as summarized in Table 1, which includes models for image classification, object detection, recommendation, and question answering.
Key Insights and Ideas
- The fundamental obstacle to elastic training adoption is accuracy inconsistency. Existing frameworks often trade accuracy for elasticity, which is unacceptable for many real-world applications.
- Non-determinism in DL training is pervasive and scattered across the entire software stack. It's not just one component, but a combination of framework states, communication, and hardware-specific optimizations.
- Decoupling training logic from resource allocation is key. The EST abstraction allows for flexible resource sharing without altering the core training procedure.
- Leveraging DL-specific characteristics is crucial for efficiency. EasyScale's success relies on understanding how DL models operate to minimize context switching overhead and optimize data loading.
- A hierarchical scheduler is necessary for efficient resource management in heterogeneous clusters. Balancing individual job needs with overall cluster utilization requires a multi-layered approach.
Key Results
- Accuracy Consistency: EasyScale, particularly with D1+D2 configurations, demonstrated bitwise identical model training results compared to standard PyTorch DDP, even when scaling resources or using heterogeneous GPUs.
- Improved Cluster Utilization: In a production cluster with over 3,000 GPUs, EasyScale improved GPU allocation ratio by 17.1% and average GPU SM utilization by 62.1%.
- Reduced Job Completion Time (JCT) and Makespan: Trace experiments showed EasyScale improving average JCT by up to 13.2x and makespan by up to 2.8x compared to traditional schedulers.
- Efficient Resource Sharing: EasyScale allowed multiple ESTs to run on a single GPU with constant throughput and significantly lower memory usage compared to worker packing, avoiding OOM errors.
- Lightweight Context Switching: The overhead for context switching was negligible in most cases, with a maximum of 1.9%.
- Data Worker Sharing: This optimization reduced training time for the first mini-batch by an average of 67.1%.
Limitations and Future Work
- Overhead for certain models with heterogeneous GPUs: Enabling D2 (heterogeneous determinism) can introduce considerable overhead (236% on average) for models that heavily rely on vendor-optimized convolution kernels. EasyScale can automatically identify such jobs and restrict them to homogeneous GPUs, but this still represents a limitation for those specific workloads.
- Future work: The authors plan to extend EasyScale to support more deterministic operators and explore new parallel strategies for large model training beyond data parallelism. They also aim to allow users to customize D2 kernels via Cutlass to better leverage hardware features.
Summary updated