Litcius/Paper detail

CoTrain: Efficient Scheduling for Large-Model Training upon GPU and CPU in Parallel

Zhenxing Li, Qiang Cao, Yajie Chen, Wenrui Yan

202310 citationsDOI

Abstract

The parameters of deep learning (DL) have ballooned from millions to trillions over the past decade, thus cannot be fully placed in a limited GPU memory. Existing works offload the parameter-update stage of training DL model to CPU, thus leveraging CPU capability and memory to support training large-scale model. However, the stage running upon CPU could block its following stage running upon GPU, thus wasting expensive GPU-cycles. We first analyze the dataflow and workflow of DL training, and find that the backward stage and the parameter-update stage can be parallelized upon GPU and CPU respectively. To this end, we present a DL-training scheduling framework, CoTrain, to allocate a compute task and its corresponding data into GPU and CPU and to parallelize them effectively at coarse-grain and fine-grain way. Particularly, the fine-grained task-partition scheme allocates a portion of parameter-update stage to GPU according to data-reuse-distance, thus largely avoiding idleness of both GPU and CPU while reducing data movement between GPU and CPU. We build and evaluate CoTrain atop PyTorch under representative models. The results show that compared to the state-of-the-art ZeRO-Offload, CoTrain achieves 30.4% improvement in the training throughput while increasing model-size by up to 7% without changing the training semantics.

Topics & Concepts

Computer scienceParallel computingScheduling (production processes)CPU shieldingCUDAGeneral-purpose computing on graphics processing unitsProcessor schedulingCentral processing unitOperating systemScheduleGraphicsMathematical optimizationMathematicsAdvanced Neural Network ApplicationsParallel Computing and Optimization TechniquesStochastic Gradient Optimization Techniques