Skip to main content
QUICK REVIEW

[Paper Review] DELTA: Dynamically Optimizing GPU Memory beyond Tensor Recomputation

Yu Tang, Chenyu Wang|arXiv (Cornell University)|Mar 30, 2022
Tensor decomposition and applicationsMathematics6 citations
TL;DR

DELTA is a novel dynamic GPU memory manager that jointly optimizes tensor swapping and recomputation at runtime, eliminating manual tuning and reducing memory pressure. It uses a filter, director, and prefetching module to intelligently offload tensors, achieving up to 70% memory savings and 2.25× larger batch sizes with minimal training delay.

ABSTRACT

The further development of deep neural networks is hampered by the limited GPU memory resource. Therefore, the optimization of GPU memory resources is highly demanded. Swapping and recomputation are commonly applied to make better use of GPU memory in deep learning. However, as an emerging domain, several challenges remain:1)The efficiency of recomputation is limited for both static and dynamic methods. 2)Swapping requires offloading parameters manually, which incurs a great time cost. 3) There is no such dynamic and fine-grained method that involves tensor swapping together with tensor recomputation nowadays. To remedy the above issues, we propose a novel scheduler manager named DELTA(Dynamic tEnsor offLoad and recompuTAtion). To the best of our knowledge, we are the first to make a reasonable dynamic runtime scheduler on the combination of tensor swapping and tensor recomputation without user oversight. In DELTA, we propose a filter algorithm to select the optimal tensors to be released out of GPU memory and present a director algorithm to select a proper action for each of these tensors. Furthermore, prefetching and overlapping are deliberately considered to overcome the time cost caused by swapping and recomputing tensors. Experimental results show that DELTA not only saves 40%-70% of GPU memory, surpassing the state-of-the-art method to a great extent but also gets comparable convergence results as the baseline with acceptable time delay. Also, DELTA gains 2.04$ imes$ maximum batchsize when training ResNet-50 and 2.25$ imes$ when training ResNet-101 compared with the baseline. Besides, comparisons between the swapping cost and recomputation cost in our experiments demonstrate the importance of making a reasonable dynamic scheduler on tensor swapping and tensor recomputation, which refutes the arguments in some related work that swapping should be the first and best choice.

Motivation & Objective

  • Address the GPU memory wall in training large-scale deep neural networks by optimizing memory usage beyond static recomputation.
  • Overcome limitations of existing methods that rely on manual tuning, static checkpointing, or inefficient swapping.
  • Develop a fully dynamic, user-transparent runtime memory manager that combines tensor swapping and recomputation.
  • Minimize training time overhead from memory offloading through intelligent prefetching and computation-computation overlap.
  • Enable training of larger models (e.g., ResNet-101) with significantly increased batch sizes under constrained GPU memory.

Proposed method

  • Proposes a three-component system: Filter (selects tensors for release using a heuristic function), Director (decides between offloading to CPU or recomputing), and Prefetcher (overlaps communication with computation).
  • Employs a base heuristic filter function ($h^{base}_{filter}$) that balances memory savings and reduced data movement, outperforming LRU and greedy alternatives in dynamic settings.
  • Introduces a dynamic decision-making framework that evaluates each tensor’s release cost and benefit in real time, avoiding manual model analysis.
  • Uses prefetching and overlapping techniques to hide communication latency between GPU and CPU, reducing time overhead from offloading.
  • Designs a framework-agnostic architecture, enabling integration with PyTorch, TensorFlow, MXNet, and other deep learning frameworks.
  • Employs a runtime manager that continuously monitors memory pressure and adapts tensor release strategies during training.

Experimental results

Research questions

  • RQ1Can a dynamic, automated system effectively combine tensor swapping and recomputation to reduce GPU memory usage without user intervention?
  • RQ2How does the choice between swapping and recomputation impact training time and memory savings in practice?
  • RQ3What heuristic function for tensor selection yields the best trade-off between memory reduction and runtime overhead?
  • RQ4To what extent can dynamic memory management increase batch size in large models like ResNet-50 and ResNet-101?
  • RQ5Does combining prefetching and overlapping significantly reduce the performance penalty of offloading tensors?

Key findings

  • DELTA reduces GPU memory consumption by 40% to 70% across ResNet-50, ResNet-101, and BERT, significantly outperforming state-of-the-art methods.
  • With DELTA, the maximum batch size for ResNet-50 increases by 2.04× compared to the baseline, and for ResNet-101 by 2.25×.
  • The base heuristic filter ($h^{base}_{filter}$) achieves better performance than LRU and greedy filters, especially under small memory budgets, due to reduced offloading frequency and better overlap.
  • Experimental results show that recomputing is often more efficient than swapping, contradicting claims that swapping should be the default strategy.
  • DELTA maintains convergence behavior comparable to the baseline, indicating minimal impact on model training quality despite aggressive memory optimization.
  • Prefetching and overlapping strategies significantly reduce time delay, making the memory management overhead acceptable in practice.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.