AccUDNN: A GPU Memory Efficient Accelerator for Training Ultra-Deep Neural Networks

Jinrong Guo, Wantao Liu, Wang Wang, Chunrong Yao, Jizhong Han, Ruixuan Li, Yijun Lu, Songlin Hu

TL;DR

This paper introduces AccUDNN, a GPU accelerator designed to tackle the memory limitations of training ultra-deep neural networks (UDNNs). AccUDNN employs a novel performance-model guided dynamic swap-out/in strategy to efficiently manage GPU memory, enabling larger batch sizes and significantly reducing training time without sacrificing accuracy.

What Problem Does This Paper Address?

Training ultra-deep neural networks (UDNNs), like ResNet, yields impressive accuracy but demands substantial computational resources, particularly GPU memory. The limited capacity of modern GPUs (typically 24GB) acts as a major bottleneck, hindering both the trainability (ability to train the model at all) and training efficiency (speed of training) of these large models. Existing solutions often focus on reducing memory usage to enable training but come at the cost of slower training times. This paper addresses the critical need for a solution that not only allows UDNNs to fit within limited GPU memory but also optimizes the training speed.

Methods

AccUDNN is built around two core modules:

  • Memory Optimizer: This module implements a "performance-model guided dynamic swap out/in strategy." Instead of a naive approach of simply offloading all data to host memory, it uses a performance model to intelligently decide what data (primarily feature maps) to swap between GPU and host memory and when to do it. This dynamic strategy aims to balance trainability with training efficiency, minimizing performance degradation. It involves:
  • Information Gathering: Collecting static (dataflow graph) and dynamic (profiling) information about the network and hardware.
  • Performance Modeling: Building models for GPU computation, memory usage, and PCIe communication.
  • Constraint Condition: Defining conditions to avoid stalling GPU computation.
  • Dynamic Swap Strategy: Orchestrating the swap operations based on the performance model and constraints.
  • Hyperparameter Tuner: After the memory optimization is applied, the runtime environment becomes more complex. This module automatically finds the efficiency-optimal minibatch size and its corresponding learning rate. This is crucial because larger minibatch sizes can improve training efficiency but might require careful tuning to maintain accuracy. The tuner formulates this as an optimization problem and uses a linear search algorithm.

Datasets

The paper evaluates AccUDNN on standard datasets for image recognition tasks, specifically mentioning:

  • ILSVRC12 classification task (used for training and evaluating models like ResNet and its variants).
  • AlexNet, GoogleNet, VGG-16, ResNet-34, ResNet-50, ResNet-101, and ResNet-152 are used as benchmark models.

No new datasets or benchmarks were introduced.

Key Insights and Ideas

  • Feature Maps are Key: The paper identifies feature maps as the primary target for memory optimization due to their large memory footprint and the long intervals between their uses.
  • Dynamic Swapping is Crucial: A naive swap-out strategy can severely degrade training efficiency. AccUDNN's performance-model guided dynamic approach is key to achieving both memory reduction and speedup.
  • Co-design of System and Algorithm: The paper emphasizes that achieving optimal training efficiency requires jointly optimizing hardware utilization (memory management) and algorithmic parameters (minibatch size, learning rate).
  • Minibatch Size Matters for Efficiency: Increasing the minibatch size is a direct way to improve training efficiency, especially in distributed settings, by reducing parameter synchronization overhead. AccUDNN makes larger minibatch sizes feasible.
  • Accuracy Preservation: A significant achievement is maintaining training accuracy even with significantly larger minibatch sizes and reduced memory footprints.

Key Results

  • Memory Reduction: AccUDNN reduces the GPU memory requirement for ResNet-152 from over 24GB to 8GB.
  • Larger Minibatch Sizes: With a 12GB GPU memory budget, AccUDNN enables an efficiency-optimal minibatch size that is 4.2x larger than with original Caffe.
  • Training Speedup:
    • On a single GPU, AccUDNN achieves significant improvements in training throughput.
  • In a distributed setting (8 GPUs), AccUDNN achieves a 7.7x speedup for ResNet-152 compared to Caffe with parameter server (Caffe-PS), and a 1.9x improvement in scaling efficiency.
  • Accuracy: No accuracy losses were reported.
  • Comparison to Prior Work: AccUDNN shows superior performance and efficiency compared to methods like SuperNeurons and vDNN, particularly in enabling larger minibatch sizes and achieving better training throughput.

Limitations and Future Work

  • Overhead: AccUDNN incurs a one-off overhead for model building and hyperparameter tuning, which is on the order of hundreds of seconds. While negligible compared to the total training time for UDNNs, it's a factor.
  • Future Work: The paper suggests that AccUDNN is a complete and efficient scheme for training UDNNs, promoting their practical use. Further exploration of communication optimization in distributed settings could yield even greater speedups. The paper also implicitly suggests that this approach could be extended to other complex deep learning models beyond UDNNs.

Summary updated

BibTeX
@inproceedings{guo2019accudnn,
  author = {Jinrong Guo and Wantao Liu and Wang Wang and Chunrong Yao and Jizhong Han and Ruixuan Li and Yijun Lu and Songlin Hu},
  title = {{AccUDNN: A GPU Memory Efficient Accelerator for Training Ultra-Deep Neural Networks}},
  booktitle = {ICCD},
  year = {2019},
  url = {https://openreview.net/forum?id=tdOOlm8vniZ},
}
Figure