arrow
返回

GPU memory usage optimization for backward propagation in deep network training

delete2025-05-01
delete0
PRE
AI
D
Ding‐Yong Hong *
T
Tzu‐Hsien Tsai
P
Pangfeng Liu
DOI:10.1016/j.jpdc.2025.105053delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
In modern Deep Learning, it has been a trend to design larger Deep Neural Networks (DNNs) for the execution of more complex tasks and better accuracy. On the other hand, Convolutional Neural Networks (CNNs) have become the standard method for most of computer vision tasks. However, the memory allocation for the intermediate data in convolution layers can cause severe memory pressure during model training. Many solutions have been proposed to resolve the problem. Besides hardware-dependent solutions, a general methodology rematerialization can reduce GPU memory usage by trading computation for memory efficiently. The idea is to select a set of intermediate results during the forward phase as checkpoints, and only save them in memory to reduce memory usage. The backward phase recomputes the intermediate data from the closest checkpoints in memory as needed. This recomputation increases execution time but saves memory by not storing all intermediate results in memory during the forward phase. In this paper, we will focus on efficiently finding the optimal checkpoint subset to achieve the least peak memory usage during the model training. We first describe the theoretical background of the training of a neural network using mathematical equations. We use these equations to identify all essential data required during both forward and backward phases to compute the gradient of weights of the model. We first identify the checkpoint selection problem and propose a dynamic programming algorithm with time complexity O(n3) to solve the problem of finding the optimal checkpoint subset. With extensive experiments, we formulate a more accurate description of the problem using our theoretical analysis and revise the objective function based on the tracing, and propose an O(n)-time algorithm for finding the optimal checkpoint subset.
Keyword:
Deep learning
Dynamic programming
Memory usage optimization
Memory pressure
Checkpointing

期刊

Journal of Parallel and Distributed Computing 封面图
Journal of Parallel and Distributed Computing
IF:
4
论文数:
3.8K
被引数:
4.8K

机构

A
academia sinica - taiwan
学者数:
1.9W
论文数: 1.6W
被引数: 17
N
National Taiwan University
学者数:
4.7W
论文数: 4.2W
被引数: 3.6W
引用论文

引用论文

ImageNet Large Scale Visual Recognition ChallengeImageNet大规模视觉识别挑战
err2015-04-11
err2.7W
PREAI
errRussakovsky, Olga; Deng, Jia; Su, Hao; Krause, Jonathan; Satheesh, Sanjeev; Ma, Sean; Huang, Zhiheng; Karpathy, Andrej; Khosla, Aditya; Bernstein, Michael; Berg, Alexander C.; Fei-Fei, Li
err分享
err收藏
err分享
err收藏