第23章付録:深層学習のための道具
23.5.2. Selecting GPUs23.5.2 GPUを選ぶ
At present, AMD and NVIDIA are the two main manufacturers of dedicated GPUs. NVIDIA was the first to enter the deep learning field and provides better support for deep learning frameworks via CUDA. Therefore, most buyers choose NVIDIA GPUs.
英語のヒント
現在、AMDとNVIDIAが、専用GPUの二大メーカーである。NVIDIAは深層学習の分野に最初に参入し、CUDAを通じて深層学習のフレームワークへのよりよいサポートを提供している。そのため、たいていの購入者はNVIDIAのGPUを選ぶ。
NVIDIA provides two types of GPUs, targeting individual users (e.g., via the GTX and RTX series) and enterprise users (via its Tesla series). The two types of GPUs provide comparable compute power. However, the enterprise user GPUs generally use (passive) forced cooling, more memory, and ECC (error correcting) memory. These GPUs are more suitable for data centers and usually cost ten times more than consumer GPUs.
英語のヒント
NVIDIAは、個人ユーザー向け(たとえばGTXやRTXのシリーズ)と企業ユーザー向け(Teslaシリーズ)の二種類のGPUを提供している。二種類のGPUは同等の計算能力をもつ。しかし、企業ユーザー向けのGPUは一般に、(受動的な)強制冷却、より多くのメモリ、ECC(誤り訂正)メモリを使う。これらのGPUはデータセンターにより適しており、ふつうコンシューマ向けのGPUの10倍の費用がかかる。
If you are a large company with 100+ servers you should consider the NVIDIA Tesla series or alternatively use GPU servers in the cloud. For a lab or a small to medium company with 10+ servers the NVIDIA RTX series is likely most cost effective. You can buy preconfigured servers with Supermicro or Asus chassis that hold 4–8 GPUs efficiently.
英語のヒント
100台以上のサーバをもつ大企業なら、NVIDIAのTeslaシリーズを検討するか、あるいはクラウドのGPUサーバを使うべきである。10台以上のサーバをもつ研究室や中小企業なら、NVIDIAのRTXシリーズがおそらく最も費用対効果が高い。4〜8基のGPUを効率よく収められるSupermicroやAsusの筐体を使った、構成済みのサーバを買える。
GPU vendors typically release a new generation every one to two years, such as the GTX 1000 (Pascal) series released in 2017 and the RTX 2000 (Turing) series released in 2019. Each series offers several different models that provide different performance levels. GPU performance is primarily a combination of the following three parameters:
英語のヒント
GPUのベンダーは、ふつう1〜2年ごとに新しい世代を出す。たとえば、2017年に出たGTX 1000(Pascal)シリーズや、2019年に出たRTX 2000(Turing)シリーズである。各シリーズには、異なる性能水準を与えるいくつかの異なるモデルがある。GPUの性能は主に次の三つのパラメータの組み合わせである。
- Compute Power. Generally we look for 32-bit floating-point compute power. 16-bit floating point training (FP16) is also entering the mainstream. If you are only interested in prediction, you can also use 8-bit integer. The latest generation of Turing GPUs offers 4-bit acceleration. Unfortunately at the time of writing the algorithms for training low-precision networks are not yet widespread.
英語のヒント
計算能力。一般に、32ビット浮動小数点の計算能力を見る。16ビット浮動小数点の訓練(FP16)も主流になりつつある。予測だけに関心があるなら、8ビット整数も使える。最新世代のTuring GPUは4ビットの高速化を提供する。残念ながら、執筆時点では、低精度のネットワークを訓練するアルゴリズムはまだ広まっていない。 - Memory Size. As your models become larger or the batches used during training grow bigger, you will need more GPU memory. Check for HBM2 (High Bandwidth Memory) vs. GDDR6 (Graphics DDR) memory. HBM2 is faster but much more expensive.
英語のヒント
メモリの大きさ。モデルが大きくなったり、訓練中に使うバッチが大きくなったりするにつれて、より多くのGPUメモリが必要になる。HBM2(High Bandwidth Memory)とGDDR6(Graphics DDR)のメモリを比べよう。HBM2のほうが速いが、ずっと高価である。 - Memory Bandwidth. You can only get the most out of your compute power when you have sufficient memory bandwidth. Look for wide memory buses if using GDDR6.
英語のヒント
メモリ帯域幅。十分なメモリ帯域幅があるときにだけ、計算能力を最大限に活用できる。GDDR6を使うなら、幅の広いメモリバスを探そう。
For most users, it is enough to look at compute power. Note that many GPUs offer different types of acceleration. For example, NVIDIA’s TensorCores accelerate a subset of operators by 5. Ensure that your libraries support this. The GPU memory should be no less than 4 GB (8 GB is much better). Try to avoid using the GPU also for displaying a GUI (use the built-in graphics instead). If you cannot avoid it, add an extra 2 GB of RAM for safety.
英語のヒント
たいていのユーザーにとっては、計算能力を見れば十分である。多くのGPUが異なる種類の高速化を提供していることに注意しよう。たとえば、NVIDIAのTensorCoreは、演算子の一部を5に高速化する。ライブラリがこれをサポートしていることを確かめよう。GPUのメモリは4 GB以上であるべきである(8 GBならずっとよい)。GPUをGUIの表示にも使うのは避けるようにしよう(代わりに内蔵グラフィックスを使う)。避けられないなら、安全のため2 GBのRAMを追加しよう。
Fig. 23.5.1 compares the 32-bit floating-point compute power and price of the various GTX 900, GTX 1000 and RTX 2000 series models. The prices suggested are those found on Wikipedia at the time of writing.
英語のヒント
図23.5.1は、さまざまなGTX 900、GTX 1000、RTX 2000シリーズのモデルの32ビット浮動小数点の計算能力と価格を比べている。示した価格は、執筆時点でWikipediaにあったものである。
Fig. 23.5.1図23.5.1
Floating-point compute power and price comparison.
英語のヒント
浮動小数点の計算能力と価格の比較。
We can see a number of things:
英語のヒント
いくつかのことがわかる。
- Within each series, price and performance are roughly proportional. Titan models command a significant premium for the benefit of larger amounts of GPU memory. However, the newer models offer better cost effectiveness, as can be seen by comparing the 980 Ti and 1080 Ti. The price does not appear to improve much for the RTX 2000 series. However, this is due to the fact that they offer far superior low precision performance (FP16, INT8, and INT4).
英語のヒント
各シリーズの中では、価格と性能はおおよそ比例する。Titanのモデルは、GPUメモリが多いという利点のために大きな割増価格がつく。しかし、980 Tiと1080 Tiを比べるとわかるように、新しいモデルのほうが費用対効果がよい。RTX 2000シリーズでは価格はあまり改善していないように見える。しかし、これは、それらがはるかに優れた低精度の性能(FP16、INT8、INT4)を提供するという事実による。 - The performance-to-cost ratio of the GTX 1000 series is about two times greater than the 900 series.
英語のヒント
GTX 1000シリーズの性能対費用の比は、900シリーズの約2倍である。 - For the RTX 2000 series the performance (in GFLOPs) is an affine function of the price.
英語のヒント
RTX 2000シリーズでは、性能(GFLOPs単位)は価格のアフィン関数である。
Fig. 23.5.2図23.5.2
Floating-point compute power and energy consumption.
英語のヒント
浮動小数点の計算能力とエネルギー消費。
Fig. 23.5.2 shows how energy consumption scales mostly linearly with the amount of computation. Second, later generations are more efficient. This seems to be contradicted by the graph corresponding to the RTX 2000 series. However, this is a consequence of the TensorCores that draw disproportionately much energy.
英語のヒント
図23.5.2は、エネルギー消費が計算量に対してほぼ線形に増えることを示している。次に、後の世代のほうが効率がよい。これはRTX 2000シリーズに対応するグラフと矛盾するように見える。しかし、これは不釣り合いに多くのエネルギーを使うTensorCoreの結果である。