Quadro RTX8000 4GPU Deep Learning ベンチマーク、NVLinkに効果はあるのか?
2020年2月15日土曜日 2時29分00秒 Asia/Tokyo
NVIDIA Quadro RTXシリーズには、GPU間DMA転送機能があるため、複数GPUでの並列学習で性能が出ると予想されます。また、NVLink有無で性能は異なるのか、標準的なTensorFlowのtf_cnn_benchmarks.pyを1, 2, 4GPUで実行してみました(ダウンロードはここから)。
テストしたネットワークはResNet50, ResNet152, Inception v3, Inception v4, VGG-16, Nasnetです。テストにはHPCDIY-XCLGPU4TS-DLを使いました。
スペックは
GPU:4*Quadro RTX8000 48GB + 2*NVLink有/無
CPU:2*Intel Xeon Gold 6254 (18C/36T 3.1G/4.0G 25MB 3UPI 1TB/2933M 200W)
Memory:12*32GB DDR4-2933 ECC REG DIMM
M.2 NVMeSSD:1*Samsung PM983 3.84TB NVMe PCIe3x4 V4 M.2 22x110mm (1.3 DWPD)
です。
Quadro RTX 8000 48GB x4 (NVLink無し) Deep Learning ベンチマーク: FP16 (XLA on)
カッコ内は1GPUに対して何倍になっているかを示しています。
Batch Size | 1 GPU img/sec | 2 GPU img/sec | 4 GPU img/sec | |
ResNet50 | 1024 | 1046.94(1.00) | 2047.45(1.96) | 4066.72(3.88) |
Inception v3 | 512 | 627.24(1.00) | 1225.64(1.95) | 2452.15(3.91) |
Nasnet | 512 | 507.75(1.00) | 999.52(1.97) | 1982.17(3.90) |
VGG-16 | 512 | 621.07(1.00) | 1189.83(1.92) | 2397.81(3.86) |
ResNet152 | 512 | 488.37(1.00) | 885.59(1.81) | 1733.01(3.55) |
nception v4 | 512 | 331.64(1.00) | 648.67(1.96) | 1290.16(3.89) |
FP16では、並列の効果が十分に出ています。スケーラビリティは高いのではないでしょうか。ベンチマークは下記のスクリプトの--batch_size. --model, --num_gpusをそれぞれに合わせて変更して実行しています。
- python tf_cnn_benchmarks.py --data_format=NCHW --batch_size=512 --num_batches=100 --model=inception4 --optimizer=momentum --variable_update=replicated --all_reduce_spec=nccl --use_fp16=True --nodistortions --gradient_repacking=2 --datasets_use_prefetch=True --per_gpu_thread_count=2 --loss_type_to_report=base_loss --compute_lr_on_cpu=True --single_l2_loss_op=True --xla_compile=True --local_parameter_device=gpu --num_gpus=1 --display_every=10
Quadro RTX 8000 48GB x4 (NVLink有) Deep Learning ベンチマーク: FP16 (XLA on)
カッコ内はNVLink無しに対して何倍になっているかを示しています。
Batch Size | 1 GPU img/sec | 2 GPU img/sec | 4 GPU img/sec | |
ResNet50 | 1024 | 1001.68(0.957) | 2037.73(0.995) | 4054.76(0.997) |
Inception v3 | 512 | 587.06(0.936) | 1220.89(0.996) | 2445.58(0.997) |
Nasnet | 512 | 432.60(0.852) | 990.81(0.991) | 1968.20(0.993) |
VGG-16 | 512 | 610.17(0.982) | 1219.88(1.025) | 2430.48(1.014) |
ResNet152 | 512 | 436.85(0.895) | 888.29(1.003) | 1739.82(1.004) |
nception v4 | 512 | 311.46(0.939) | 646.66(0.997) | 1284.33(0.995) |
NVLink無しに対して、NVLinkの効果があるようには見えません。
Quadro RTX 8000 48GB x4 (NVLink無し) Deep Learning ベンチマーク: FP32 (XLA on)
FP32ではどうなのかを試して見ます。カッコ内は1GPUに対して何倍になっているかを示しています。
Batch Size | 1 GPU img/sec | 2 GPU img/sec | 4 GPU img/sec | |
ResNet50 | 512 | 379.06(1.00) | 738.72(1.95) | 1458.05(3.85) |
Inception v3 | 256 | 245.04(1.00) | 476.36(1.94) | 942.79(3.85) |
Nasnet | 512 | 506.57(1.00) | 996.50(1.97) | 1967.14(3.88) |
VGG-16 | 512 | 169.30(1.00) | 334.62(1.98) | 657.29(3.88) |
ResNet152 | 256 | 153.41(1.00) | 295.86(1.93) | 586.68(3.82) |
nception v4 | 256 | 118.16(1.00) | 228.94(1.94) | 453.65(3.84) |
FP32でも、並列の効果が十分に出ています。スケーラビリティは非常に高いのではないでしょうか。ベンチマークは下記のスクリプトの--batch_size. --model, --num_gpusをそれぞれに合わせて変更して実行しています。
- python tf_cnn_benchmarks.py --data_format=NCHW --batch_size=512 --num_batches=100 --model=inception4 --optimizer=momentum --variable_update=replicated --all_reduce_spec=nccl --nodistortions --gradient_repacking=2 --datasets_use_prefetch=True --per_gpu_thread_count=2 --loss_type_to_report=base_loss --compute_lr_on_cpu=True --single_l2_loss_op=True --xla_compile=True --local_parameter_device=gpu --num_gpus=1 --display_every=10
Quadro RTX 8000 48GB x4 (NVLink有) Deep Learning ベンチマーク: FP32 (XLA on)
NVLinkを付けるとどうなるか試して見ます。カッコ内はNVLink無しに対して何倍になっているかを示しています。
Batch Size | 1 GPU img/sec | 2 GPU img/sec | 4 GPU img/sec | |
ResNet50 | 512 | 378.53(0.999) | 739.68(1.001) | 1456.84(0.999) |
Inception v3 | 256 | 243.26(0.993) | 475.07(0.997) | 938.83(0.996) |
Nasnet | 512 | 503.01(0.993) | 983.06(0.987) | 1958.60(0.996) |
VGG-16 | 512 | 168.20(0.994) | 337.50(1.009) | 660.82(1.005) |
ResNet152 | 256 | 152.59(0.995) | 297.29(1.005) | 585.68(0.998) |
nception v4 | 256 | 117.19(0.992) | 227.97(0.996) | 451.37(0.995) |
FP16と同様に、NVLinkの効果があるようには見えません。
You must be logged in to post a comment.
click here to log in