[論文レビュー] EcoRNN: Efficient Computing of LSTM RNN Training on GPUs
EcoRNNは、LSTM RNN学習中のGPUメモリ使用量を削減するために、ソースコードの変更なしに特徴マップを再計算するコンパイラベース最適化であるEchoを提案する。メモリ削減量と再計算オーバーヘッドを知的に推定することで、平均1.89倍、最大3.13倍のメモリ削減を達成し、固定GPUメモリ制限内での高速な学習、より大きなバッチサイズ、またはより多くの層の利用を可能にする。
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.
研究の動機と目的
- LSTM RNNの学習におけるGPUメモリボトルネック、特にニューラル機械翻訳のようなモデルに対して解決を図ること。
- モデルのソースコードを変更せずにメモリフットプリントを削減すること。
- 固定GPUメモリ予算下で、より大きなバッチサイズ、より多くの層、またはエネルギー消費量の低減を実現した効率的な学習を可能にすること。
- 従来の再計算技術がメモリ削減と実行時オーバーヘッドのバランスに失敗していたという制限を克服すること。
提案手法
- Echoは、計算グラフ全体にわたって特徴マップの再計算を自動的に特定・適用するコンパイラベースの手法を採用する。
- 実用的で非保守的なメカニズムを用いて、計算グラフ全体にわたる再計算のメモリ的利益を推定する。
- レイヤー固有の特性を活用して再計算オーバーヘッドを非保守的にモデル化し、不要な再計算を回避する。
- このアプローチは透明かつ自動的であり、モデルのソースコードの変更を一切不要としない。
- EchoはLSTM RNNにとどまらず、他のディープラーニングワークロードに対しても汎用的であるように設計されている。
実験結果
リサーチクエスチョン
- RQ1LSTM RNN学習における特徴マップの再計算を、どのように効果的にGPUメモリフットプリント削減に応用できるか?
- RQ2RNNモデルの異なるレイヤーにおいて、メモリ削減と再計算オーバーヘッドのトレードオフはどのように変化するか?
- RQ3コンパイラベースのシステムは、ソースコードの変更なしに自動的かつ透明にメモリ使用量を最適化できるか?
- RQ4提案手法は、既存の再計算技術と比較して、メモリ削減効果とパフォーマンスの面でどのように異なるか?
主な発見
- Echoは、複数の最先端の機械学習ワークロードにおいて、平均で1.89倍のメモリフットプリント削減を達成した。
- 観察された最大のメモリ削減は3.13倍であり、固定GPUメモリ制限内での学習容量を顕著に拡大した。
- この最適化により、1枚のGPUで4枚のGPUと同等のスループットを達成する学習が可能になった。
- この手法により、より少ないGPU数やより大きなバッチサイズで効率的な学習が可能となり、エネルギー消費量が削減された。
- このアプローチはLSTM RNNにとどまらず、RNNを超える他のディープラーニングモデルに対しても有効である。
より良い研究を、今すぐ始めましょう
論文設計から論文執筆まで、研究時間を劇的に削減しましょう。
クレジットカード登録不要
このレビューはAIが作成し、人間の編集者が確認しました。