Skip to main content
QUICK REVIEW

[Paper Review] Efficient Memory Management for GPU-based Deep Learning Systems

Junzhe Zhang, Sai Ho Yeung|arXiv (Cornell University)|Feb 19, 2019
Advanced Neural Network ApplicationsComputer Science36 references19 citations
TL;DR

This paper proposes SmartPool and AutoSwap—two transparent, system-level GPU memory optimization techniques for deep learning training. SmartPool reduces memory fragmentation via lifetime-aware allocation using a heuristic algorithm, cutting memory use by up to 13.3% compared to NVIDIA’s CnMem. AutoSwap dynamically moves inactive variables between GPU and CPU memory based on access patterns, reducing footprint by up to 34.2% with no communication overhead, and the combined approach scales across diverse models and workloads without accuracy loss or user intervention.

ABSTRACT

GPU (graphics processing unit) has been used for many data-intensive applications. Among them, deep learning systems are one of the most important consumer systems for GPU nowadays. As deep learning applications impose deeper and larger models in order to achieve higher accuracy, memory management becomes an important research topic for deep learning systems, given that GPU has limited memory size. Many approaches have been proposed towards this issue, e.g., model compression and memory swapping. However, they either degrade the model accuracy or require a lot of manual intervention. In this paper, we propose two orthogonal approaches to reduce the memory cost from the system perspective. Our approaches are transparent to the models, and thus do not affect the model accuracy. They are achieved by exploiting the iterative nature of the training algorithm of deep learning to derive the lifetime and read/write order of all variables. With the lifetime semantics, we are able to implement a memory pool with minimal fragments. However, the optimization problem is NP-complete. We propose a heuristic algorithm that reduces up to 13.3% of memory compared with Nvidia's default memory pool with equal time complexity. With the read/write semantics, the variables that are not in use can be swapped out from GPU to CPU to reduce the memory footprint. We propose multiple swapping strategies to automatically decide which variable to swap and when to swap out (in), which reduces the memory cost by up to 34.2% without communication overhead.

Motivation & Objective

  • Address the growing memory pressure in deep learning due to larger, deeper models despite limited GPU memory.
  • Overcome limitations of existing approaches like model compression (accuracy loss) and manual memory swapping (high overhead, expertise required).
  • Develop automatic, transparent, and system-level memory optimization techniques that do not alter model structure or training algorithms.
  • Enable efficient memory usage across diverse DNN architectures, batch sizes, and memory constraints without sacrificing performance or accuracy.
  • Provide a unified, extensible framework for memory optimization that scales across different deep learning workloads.

Proposed method

  • Propose SmartPool: a memory pool that reuses GPU memory space by allocating variables with non-overlapping lifetimes into the same region, minimizing fragmentation.
  • Design a heuristic algorithm to solve the NP-complete memory allocation problem efficiently, achieving near-optimal allocation with equal time complexity to baseline.
  • Analyze the read/write access patterns of back-propagation in DNNs to identify variables that are inactive during parts of the training iteration.
  • Implement AutoSwap: an automatic memory swapping mechanism that moves unused variables from GPU to CPU memory and restores them before reuse.
  • Develop multiple scheduling strategies for swapping that minimize communication and synchronization overhead while maximizing memory savings.
  • Integrate both techniques under a unified abstraction that collects variable lifetime and access order information at runtime, enabling transparent optimization.

Experimental results

Research questions

  • RQ1Can we reduce GPU memory footprint in deep learning training without altering model structure or training algorithms?
  • RQ2How can we minimize memory fragmentation in GPU memory pools using lifetime information of variables?
  • RQ3Can we automatically identify and swap out inactive variables to CPU memory to reduce GPU memory usage?
  • RQ4What scheduling strategies can minimize communication overhead while maximizing memory savings in GPU-CPU memory swapping?
  • RQ5How do the proposed techniques scale across different DNN architectures, batch sizes, and memory constraints?

Key findings

  • SmartPool reduces GPU memory usage by up to 13.3% compared to NVIDIA’s default CnMem memory pool, with identical time complexity.
  • AutoSwap reduces GPU memory footprint by up to 34.2% without incurring any measurable communication overhead.
  • The combined SmartPool + AutoSwap approach achieves significant memory savings across diverse models, including VGG and ResNet, with minimal performance impact.
  • The approach is fully transparent to users and requires no manual configuration or model-specific knowledge.
  • The method scales effectively across different network depths, batch sizes, and memory load limits, outperforming existing tools like MXNet-memonger and SuperNeurons in both memory reduction and overhead control.
  • Compared to GeePS, the proposed method achieves greater memory reduction while maintaining low overhead and eliminating the need for manual layer/tensor selection.

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.