[Paper Review] EcoRNN: Efficient Computing of LSTM RNN Training on GPUs
EcoRNN proposes Echo, a compiler-based optimization that recomputes feature maps during LSTM RNN training to reduce GPU memory footprint without modifying source code. By intelligently estimating memory savings and recomputation overhead, Echo achieves an average 1.89X and up to 3.13X memory reduction, enabling faster training, larger batch sizes, or more layers within fixed GPU memory limits.
The Long-Short-Term-Memory Recurrent Neural Networks (LSTM RNNs) are a popular class of machine learning models for analyzing sequential data. Their training on modern GPUs, however, is limited by the GPU memory capacity. Our profiling results of the LSTM RNN-based Neural Machine Translation (NMT) model reveal that feature maps of the attention and RNN layers form the memory bottleneck and runtime is unevenly distributed across different layers when training on GPUs. Based on these two observations, we propose to recompute the feature maps rather than stashing them persistently in the GPU memory. While the idea of feature map recomputation has been considered before, existing solutions fail to deliver satisfactory footprint reduction, as they do not address two key challenges. For each feature map recomputation to be effective and efficient, its effect on (1) the total memory footprint, and (2) the total execution time has to be carefully estimated. To this end, we propose *Echo*, a new compiler-based optimization scheme that addresses the first challenge with a practical mechanism that estimates the memory benefits of recomputation over the entire computation graph, and the second challenge by non-conservatively estimating the recomputation overhead leveraging layer specifics. *Echo* reduces the GPU memory footprint automatically and transparently without any changes required to the training source code, and is effective for models beyond LSTM RNNs. We evaluate *Echo* on numerous state-of-the-art machine learning workloads on real systems with modern GPUs and observe footprint reduction ratios of 1.89X on average and 3.13X maximum. Such reduction can be converted into faster training with a larger batch size, savings in GPU energy consumption (e.g., training with one GPU as fast as with four), and/or an increase in the maximum number of layers under the same GPU memory budget.
Motivation & Objective
- To address the GPU memory bottleneck in training LSTM RNNs, especially in models like Neural Machine Translation.
- To reduce memory footprint without requiring changes to the model's source code.
- To enable efficient training with larger batch sizes, more layers, or reduced energy consumption under fixed GPU memory budgets.
- To overcome limitations of prior recomputation techniques that failed to balance memory savings and runtime overhead.
Proposed method
- Echo uses a compiler-based scheme to automatically identify and apply feature map recomputation across the computation graph.
- It estimates memory benefits of recomputation across the entire computation graph using a practical, non-conservative mechanism.
- It non-conservatively models recomputation overhead by leveraging layer-specific characteristics to avoid unnecessary recomputation.
- The approach is transparent and automatic, requiring no source code modifications to the model.
- Echo is designed to be generalizable beyond LSTM RNNs to other deep learning workloads.
Experimental results
Research questions
- RQ1How can feature map recomputation be effectively applied to reduce GPU memory footprint in LSTM RNN training?
- RQ2What is the trade-off between memory savings and recomputation overhead in different layers of an RNN model?
- RQ3Can a compiler-based system automatically and transparently optimize memory usage without source code changes?
- RQ4How does the proposed method compare to existing recomputation techniques in terms of memory reduction and performance?
Key findings
- Echo achieves an average memory footprint reduction of 1.89X across multiple state-of-the-art machine learning workloads.
- The maximum memory reduction observed is 3.13X, significantly expanding the training capacity within fixed GPU memory limits.
- The optimization enables training with one GPU to achieve performance equivalent to four GPUs in terms of throughput.
- The method reduces energy consumption by allowing efficient training with fewer GPUs or larger batch sizes.
- The approach is effective not only for LSTM RNNs but also for other deep learning models beyond RNNs.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.