たれぱんのびぼーろく

わたしの備忘録、生物学とプログラミングが多いかも

GPUパフォーマンス for 深層学習

Cost/Performance of GPU for Mixed Precision Training

GPU GCP price [\$/h] (vs T4) perf [TOPS] (vs T4)
NVIDIA A100 0.--- (x-.-) 312.0 (x4.80)
NVIDIA V100 0.740 (x6.7) 125.0 (x1.92)
NVIDIA T4 0.110 (----) 65.0 (-----)
NVIDIA P100 0.430 (x3.9) 21.2 (x0.33)
NVIDIA K80 0.135 (x1.2) 4.4 (x0.07)

GCP の K80 は 1GPU (1 ボードに 2GPU 載ってる) 単位の課金

NVIDIA® K80® ボードにはそれぞれ 2 個の GPU が搭載されています。K80 GPU の料金は、ボード単位ではなく、GPU 単位で課金されます。
GCP

AWS

type GPU 1GPU type price [\$/h] cost [K-yen/month] FP16 FP32
P3 NVIDIA V100 p3.2xlarge 0.918 66 119 14.9
P2 NVIDIA K80 p2.xlarge 0.27 19 - 4.4
G4 NVIDIA T4 g4dn.xlarge 0.1578 11 65 8.1
G3 NVIDIA M60 g3s.xlarge 0.225 16 9 4.8
(G2) NVIDIA K520 g2.2xlarge 0.195 14
Inf1 AWS Inferentia inf1.xlarge 0.1104 8

spec ref (qiita blog)
Price of EC2 Spot Instance

速度実測

env: Google Colab@2020-10-20
model: Scyclone

it/s (vs T4 FP32) FP32 AMP
T4 1.29 (----) 3.37 (x2.6)
P100 2.03 (x1.6) 1.88 (x1.5)
K80 0.47 (x0.4) 0.47 (x0.4)

T4_AMP : P100_FP32 = 1.66 : 1

c.f.
T4 vs P100: ~40% faster training, reported in blog1
qiita, NVIDIA の人

TensorCore の効果

TensorCore: Volta/Turing/Ampere 世代の NVIDIA GPU のうちいくつかが積んでいるコア.
テンソル処理が可能になっており、行列計算に強い.