第13章計算の性能
13.5. Training on Multiple GPUs13.5 複数のGPUでの訓練
So far we discussed how to train models efficiently on CPUs and GPUs. We even showed how deep learning frameworks allow one to parallelize computation and communication automatically between them in Section 13.3. We also showed in Section 6.7 how to list all the available GPUs on a computer using the
nvidia-smi command. What we did not discuss is how to actually parallelize deep learning training. Instead, we implied in passing that one would somehow split the data across multiple devices and make it work. The present section fills in the details and shows how to train a network in parallel when starting from scratch. Details on how to take advantage of functionality in high-level APIs is relegated to Section 13.6. We assume that you are familiar with minibatch stochastic gradient descent algorithms such as the ones described in Section 12.5.英語のヒント
ここまで、CPUとGPUでモデルを効率よく訓練する方法を論じた。13.3節では、深層学習のフレームワークがそれらのあいだで計算と通信を自動的に並列化できることさえ示した。6.7節では、
nvidia-smiコマンドを使って、コンピュータで使えるすべてのGPUを一覧にする方法も示した。論じていないのは、深層学習の訓練を実際にどう並列化するかである。代わりに、データをどうにかして複数の装置に分けて動かすのだろうと、ついでにほのめかしただけだった。この節では、その詳細を補い、ゼロから始めるときにネットワークを並列に訓練する方法を示す。高水準のAPIの機能を生かす方法の詳細は、13.6節に回す。12.5節で説明したようなミニバッチ確率的勾配降下法のアルゴリズムには慣れていると仮定する。