1. IBM 과 NVIDIA 가 제안하는
딥러닝 플랫폼
기존 GPU기술의 한계를 혁신한 새로운 딥러닝 플랫폼
IBM Minsky
IBM
유부선 상무
2. IBM 과 NVIDIA 가 제안하는
딥러닝 플랫폼
GPU 컴퓨팅에서의 난제 - Host <-> GPU 간의 data copy
• Host 서버의 data를 CPU에서 GPU로, 또 그 반대로 copy해야 함
• GPU를 써서 얻는 성능 개선의 상당 부분이 그 CPU-GPU간의 copy에서 상쇄됨
• Disk에서 시스템 memory로의 copy는 cache 될 수도 있으나, GPU 메모리는 16GB 또는 24GB 등으로
제한되므로 용량에 한계가 있음
data
이론적
16GB/sec
실질적
8GB/sec
PCIe Gen3
Source : http://www.tested.com/tech/457440-
theoretical-vs-actual-bandwidth-pci-express-and-
thunderbolt/
3. IBM 과 NVIDIA 가 제안하는
딥러닝 플랫폼
Vector computation time with CPU only
= calcCpu: 1662 ms
calcCpu
for (int k = 0; k < tot; k++) {
c_B[k] = c_B[k] + c_A[k];
}
calcGpu
cuMemcpyHtoD(d_A, Pointer.to(h_A), tot * Sizeof.DOUBLE);
add(tot, d_B, d_B, d_A);
cuMemcpyDtoH(Pointer.to(h_B), d_B, tot * Sizeof.DOUBLE);
copytoDevice: 1514
copytoHost: 1875
calcGpu: 174
Vector computation time with GPU = copytoDevice+copytoHost+calcGpu = 3563 ms
Using GPU
= calcCpu: 174 ms
(a, b, c, d, e, …. z) + (A, B, C, D, E, …. Z) = (a+A, b+B, c+C, d+D, e+E, …. z+Z)
CPU-GPU memcpy의 문제
4. IBM 과 NVIDIA 가 제안하는
딥러닝 플랫폼
Deep Learning을 위한 GPU 아키텍처의 고민
/usr/local/cuda-8.0/samples/0_Simple/simpleP2P# ./simpleP2P
…
Checking GPU(s) for support of peer to peer memory access...
> Peer access from Tesla K80 (GPU0) -> Tesla K80 (GPU1) : Yes
> Peer access from Tesla K80 (GPU1) -> Tesla K80 (GPU0) : Yes
…
Creating event handles...
cudaMemcpyPeer / cudaMemcpy between GPU0 and GPU1: 7.40GB/s
Source :
https://www.google.co.kr/url?sa=t&rct=j&q=&esrc=s&so
urce=web&cd=1&cad=rja&uact=8&ved=0ahUKEwij-
9jz48_QAhVJpJQKHezLBlkQFggnMAA&url=http%3A%2F%
2Focean.kisti.re.kr%2Fdownfile%2Fvolume%2Fkips%2FJB
CRJM%2F2013%2Fv2n2%2FJBCRJM_2013_v2n2_81.pdf&
usg=AFQjCNHByHvoX_uKCDeAChs5OaYgstURXw&sig2=W
NkcYVR8K6QZP_fEAKlIpQ&bvm=bv.139782543,d.dGo
“Design of MAHA Supercomputing System”
GPU 시스템 설계시 주요 고려 사항
a) 메모리 대역폭 : CPU-메모리
b) 매니코어 연산장치 대역폭 : CPU-매니코어장치
c) 네트워크 장치 대역폭 : CPU-네트워크장치
“스위치의 up-link 연결의 대역폭 제한으로 매니코어
장치의 유효 대역폭이 스위치에 연결된 장치 수에
반비례(1:n)하여 줄어들게 된다. MAHA
시스템에서는 연산 성능을 최대한 보장하기 위하여
CPU와 매니코어 연산장치의 비율을 1:2 이하로
제한하였다.”
5. IBM 과 NVIDIA 가 제안하는
딥러닝 플랫폼
Deep Learning을 위한 half-precision 지원
$ vi cifar10.py
...
if FLAGS.use_fp16:
images = tf.cast(images, tf.float16)
labels = tf.cast(labels, tf.float16)
return images, labels
...
(source : tensorflow CIFAR-10 example)
• Convolution layer로부터의 input은 noise 및 variation으로부터의 민감성을 줄이기 위해 해
상도를 줄이는 등의 sub-sampling을 거침
• Backpropagation 알고리즘을 이용해서 trainin하는 deep neural network 아키텍처에서는
half-precision(FP16)이면 충분
• 기존 Kepler/Maxwell에서도 FP16을 사용할 수는 있으나, 이는 GPU memory 사용량을 줄일
수 있을 뿐 그만큼 GPU 성능을 증가시키지는 못함
Source : https://algobeans.com/2016/01/26/introduction-to-convolutional-neural-network/
https://devblogs.nvidia.com/parallelforall/cuda-8-features-revealed/
6. IBM 과 NVIDIA 가 제안하는
딥러닝 플랫폼
Xeon Phi roadmap
Soource : http://www.nextplatform.com/2016/08/22/intel-tweaking-xeon-phi-
deep-learning/
7. IBM 과 NVIDIA 가 제안하는
딥러닝 플랫폼
IBM GPU 서버 솔루션의 특장점
신기술에 의한
기존 문제의 해결
진정한 오픈
아키텍처
OpenPOWER
플랫폼
최신, 최고의 GPU
PASCAL P100
Page Migration Engine +
Unified Memory = 한결
단순해진 개발 업무
기존 GPU 서버의 P2P 문제를
해결하는 NVLink 기술
Google, IBM, NVIDIA, Mellanox,
삼성전자 등 200여 회원사가 함께
하는 OpenPOWER 파운데이션
POWER 아키텍처 공개에 의한
진정한 오픈 아키텍처
PASCAL 아키텍처 GPU를 장착한
유일한 상용 서버
Deep Learning에 필요한 half-
precision 성능 21 TFLOPS
기존의 3배에 달하는 GPU 메모리
대역폭
8. IBM 과 NVIDIA 가 제안하는
딥러닝 플랫폼
POWER8 with NVLink (2x)
• 190W
• Integrated NVLink 1.0
Memory DIMM’s Riser (8x)
• 4 DDR4 DIMMs per riser
• Single Centaur per riser
• 32 IS DIMM’s total
PCIe slot (3x)
• Gen3 PCIeNVidia GPU
• SXM2 form factor
• NVLink 1.0
• 300 W
• Max of 2 per socket
Power Supplies (2x)
• 1300W
• Common Form Factor
Supply
Cooling Fans (4x)
• 80mm Counter- Rotating Fans
• Hot swap
Storage Option (2x)
• 0-2, SATA HDD.SSD
• Tray design for install/removal
• Hot Swap
Service Controller Card
• BMC Content
IBM S822LC for High Performance Computing : “Minsky” 서버
GPU-GPU는 물론 GPU-CPU도 NVLink로 연결된 유일한 서버
9. IBM 과 NVIDIA 가 제안하는
딥러닝 플랫폼
Source : http://www.nvidia.com/object/gpu-architecture.html#utm_source=shorturl&utm_medium=referrer&utm_campaign=pascal
http://www.nvidia.com/object/tesla-p100.html
P100 Pascal 아키텍처의 5가지 신기술 적용
FinFET (Fin Field Effect Transistor)
CoWoS (Chip-on Wafer-on-Substrate)
HBM2 (High Bandwidth Memory 2)
PME (Page Migration Engine)
UM (Unified Memory)
16 nm
FinFET
기술에 의해
향상된
에너지 효율
ML/DL을
위한 새로운
half-
precision
instruction
현재의 PCIe
대비 5배
빠른 NVLink
기술로 상호
연결
CoWoS
HBM2로
3배 향상된
메모리
대역폭
PME와
UM을 통해
사실상
해제된 GPU
메모리 한계
10. IBM 과 NVIDIA 가 제안하는
딥러닝 플랫폼
Current CPU to GPU PCIe Attachment
POWER8
w/ NVLink
DDR4
P100
GPU
NVLink
80 GB/s
New POWER8 with NVLink Processor Technology
GPU
mem
HBM2
GPU
mem
HBM2
POWER8 with NVLink
2.5배의 Peer to Peer
대역폭
PCIe Data Pipe
POWER8 NVLink
Data Pipe
GPU간의 P2P는 물론, CPU-GPU간 연결도 NVLink로 구현!
P100
GPU
Xeon
CPU
DDR4
PCIe
32 GB/s
GPU
mem
GDDR5
GPU
mem
GDDR5
GPUGPU
288 GB/s 288 GB/s 732 GB/s 732 GB/s
CPU-GPU 연결 방식의 차이
11. IBM 과 NVIDIA 가 제안하는
딥러닝 플랫폼
PCIe3 vs. NVLink (GPUdb의 query 테스트 결과)
전체 소요 시간 감축 수치 : 62 tick (1 tick = 0.01 sec)
Data Transfer에서의 감축 : 48 ticks 전체 감소치의 77%
GPU 계산에서의 감축 : 14 ticks 전체 감소치의 23%
전체 2.6x speedup
K80 w/ PCIe on Broadwell
P100 w/ NVLink on Minsky
Query time : 100 ticks
Query time : 38 ticks
NVLink로 data copy 속도 3배 향상 (73 tick 25 tick)
12. IBM 과 NVIDIA 가 제안하는
딥러닝 플랫폼
Tensorflow의 multi-GPU 사용에서는 CPU-GPU간 대역폭이 중요
Source : https://www.tensorflow.org/tutorials/deep_cnn/#training-a-model-using-multiple-gpu-cards
• GPU간 P2P가 중요한 Caffe와는 달리,
Tensorflow에서는 GPU간 P2P는 중요치
않으며 CPU-GPU간 대역폭이 전체 성능에
매우 중요
• CPU-GPU 구간이 80GB/sec의 NVLink로
연결된 Minsky가 Tensorflow를 위해서는
DGX-1보다 훨씬 더 나은 선택
Training a Model Using Multiple GPU Cards
“This setup requires that all GPUs share
the model parameters. A well-known fact
is that transferring data to and from GPUs
is quite slow. For this reason, we decide to
store and update all model parameters on
the CPU (see green box).”
13. IBM 과 NVIDIA 가 제안하는
딥러닝 플랫폼
Tesla Products Tesla K40 Tesla K80 Tesla M40
Tesla P100
(PCIe)
Tesla P100
(NVLink)
GPU / Form Factor
Kepler
GK110 / PCIe
Kepler
GK210 / PCIe
Maxwell
GM200 / PCIe
Pascal
GP100 / PCIe
Pascal
GP100 / SXM2
Stream Processors 2880 2 * 2496 3072 3584 3584
Base Clock 745 MHz 562 MHz 948 MHz 1126 MHz 1328 MHz
FP16 TFLOPs[1] 4.29 8.74 6.84 18.68 21.2
FP32 TFLOPs[1] 4.29 8.74 6.84 9.34 10.6
FP64 TFLOPs[1] 1.43 2.91 0.21 4.67 5.3
Memory Interface 384-bit GDDR5 384-bit GDDR5 384-bit GDDR5
3072-bit HBM2
(12GB)
4096-bit HBM2
(16GB)
4096-bit HBM2
Memory Bandwidth 288 GB/s 480 GB/s 288 GB/s
549 GB/s (12GB)
732 GB/s (16GB)
732 GB/s
Memory Size Up to 12 GB Up to 24 GB Up to 24 GB 12 GB or 16 GB 16 GB
L2 Cache Size 1536 KB 1536 KB 3072 KB 4096 KB 4096 KB
TDP 235 Watts 300 Watts 250 Watts 250 Watts 300 Watts
Manufacturing Process 28-nm 28-nm 28-nm 16-nm (FinFET) 16-nm (FinFET)
NVIDIA Tesla GPU 모델 비교
Source https://devblogs.nvidia.com/parallelforall/inside-pascal/
http://www.anandtech.com/show/8729/nvidia-launches-tesla-k80-gk210-gpu
http://www.anandtech.com/show/10222/nvidia-announces-tesla-p100-accelerator-pascal-power-for-hpc
[1] The GFLOPS in this chart are based on GPU Boost Clocks.
14. IBM 과 NVIDIA 가 제안하는
딥러닝 플랫폼
CUDA
samples
Measurement
Firestone
K80 * 2
(GK210 * 4)
Minsky
P100 * 4
(GP100 * 4)
GPU
boost
Minsky/
Firestone
ratio
Simple-
MultiCopy
Memcpy host to device (GB/s) 7.918 32.772 no 414%
Memcpy device to host (GB/s) 7.915 33.415 no 422%
Kernel (GB/s) 270.349 1338.152 no 495%
Fully serialized execution (GB/s) 6.898 29.483 no 427%
Overlapped using 4 streams (GB/s) 14.102 60.872 no 432%
simpleP2P
cudaMemcpy between
GPU0 and GPU1 (GB/s)
7.400 32.9 no 445%
BlackScholes
BlackScholesGPU() time (msec) 0.446 0.161 yes 36%
Effective memory bandwidth (GB/s) 179.407 497.027 yes 277%
Throughput (GOptions/s) 17.941 49.703 yes 277%
K80 w/ PCIe vs. P100 w/ NVLink : CUDA sample programs
15. IBM 과 NVIDIA 가 제안하는
딥러닝 플랫폼
0
20
40
60
80
100
120
140
x86 with 4x M40 /
PCIe
POWER8 with 4x Tesla
P100 / NVLink
Training time (minutes): AlexNet and
Caffe to top-1, 50% Accuracy
(Lower is better)
0:00
1:12
2:24
3:36
4:48
6:00
7:12
8:24
x86 with 8x M40 / PCIe POWER8 with 4x Tesla
P100 / NVLink
BVLC Caffe vs IBM Caffe / VGGNet
Time to Top-1 50% accuracy:
(Lower is better)
24% Faster2.2x Faster
IBM S822LC
20-cores 2.86GHz 512GB memory / 4 NVIDIA Tesla P100 GPUs / Ubuntu 16.04 / CUDA 8.0.44 / cuDNN 5.1 / IBM Caffe 1.0.0-rc3 / Imagenet Data
Intel Broadwell E5-2640v4
20-core 2.6 GHz 512GB memory / 8 NVIDIA TeslaM40 GPUs / Ubuntu 16.04 / CUDA 8.0.44 / cuDNN 5.1 / BVLC Caffe 1.0.0-rc3 / Imagenet Data
Deep Learning 성능 벤치마크 : Caffe Alexnet / VGGNet training
16. IBM 과 NVIDIA 가 제안하는
딥러닝 플랫폼
Source : https://developer.nvidia.com/cuda-release-candidate-download Source : http://openpowerfoundation.org/blogs/openpower-deep-learning-distribution/
POWER8의 주요 Deep Learning framework 지원 (PowerAI toolkit)
Caffe, Tensorflow, Theano, Torch 등 주요 프레임워크를 PPA repository로 제공
이들 framework은 이미 ppc64le 지원을 github에 commit되어 source로부터의 build도 지원
17. IBM 과 NVIDIA 가 제안하는
딥러닝 플랫폼
• IT업계 전반의 폭넓은 혁신 유도
• 현재의 데이타센타 기술의 문제점을 해결하는 보다 나은 대안을
제시
• POWER 기술 관련 생태계 활성화
OpenPOWER Foundation 결성 목적
OpenPOWER Foundation 현황
• 2013년 IBM / Google / Mellanox / NVIDIA / TYAN 5개 회사로 시작
• 2016년 3월 현재 200개 이상으로 확대 및 강화
• 한국에서는 삼성전자 / SK Hynix 2개사가 메모리 분야에서 참여
OpenPOWER와의 협업으로 설계/생산된 새로운 POWER8
오픈 시스템을 위한 OpenPOWER Foundation
2016 4월, OpenPOWER 플래티넘 멤버인 구글의 POWER 아키텍처 서버
개발과 SW 포팅에 대한 공개
POWER 아키텍처 자체의 공개를 통한, Google, IBM, Nvidia, Mellanox 등의 협업
18. IBM 과 NVIDIA 가 제안하는
딥러닝 플랫폼
Compute-centric에서 Data-centric으로의 전환
A data
B data
D data
A data’ B data’
A
data’’ C data’
copy copy
copy
copy
A data
B data
D data
mount
mount
mount
• NFS, Lustre 등의 저성능, 저안정성의 storage
• 고속 I/O를 위해 local SSD에 필요 data만 GPU 서버로
copy 하여 training
• Data copy 및 삭제 등 추가 작업의 부담과 비효율
• 고성능, 고안정성의 enterprise급 공유 filesystem
• 100Gb EDR 등의 고속 네트웍을 통해 copy 없이
data를 여러 노드가 그대로 mount 하여 공유
19. IBM 과 NVIDIA 가 제안하는
딥러닝 플랫폼
8-node GPU cluster for Deep Learning 구성도
Management server
(8-core * 2-socket 256GB RAM)
GPU servers
(각 8-core * 2-socket 256GB RAM, P100 GPU * 4, NVLink)
Admin
network용
1GbE
48-port switch * 1
Interconnect
network용
100Gb EDR IB
36-port switch * 2
공유 파일시스템
Appliance
IBM ESS
IBM S822LC
“Firestone”
Linux 전용 서버
IBM S822LC for
HPC “Minsky”
GPU 전용 서버
용도 모델 대수
관리 서버 S812L 1
스토리지 서버 S822L 2
스토리지 DeepFlash 150 1
IBM ESS의 세부 구성
공유
파일시스템
공유
파일시스템
공유
파일시스템
공유
파일시스템
공유
파일시스템
공유
파일시스템
공유
파일시스템
공유
파일시스템
공유
파일시스템
Image files
All-Flash
스토리지
20. IBM 과 NVIDIA 가 제안하는
딥러닝 플랫폼
IBM Elastic Storage Server(ESS) : Spectrum Scale의 appliance
JBOD Disk Enclosures
NSD File Server 1
NSD File Server 2
FDR IB
10/40 GbE
전용 디스크
컨트롤러
JBOD Disk Enclosures
Storage Server 1
Storage Server 2 GPFS Native RAID
GPFS Native RAID
파일 서버
RAID
+
디스크 관리
성능
비용
H/W RAID S/W RAID
21. IBM 과 NVIDIA 가 제안하는
딥러닝 플랫폼
Docker를 통해 가능한 다양한 환경 제공
# Host 서버에서 NVCC v7.5를 사용
root@minsky:/data# nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2015 NVIDIA Corporation
Built on Tue_Aug_11_14:31:50_CDT_2015
Cuda compilation tools, release 7.5, V7.5.17
# 연구원 A가 CUDA 8.0의 over-subscription 사용을 위해 nvcc v8.0을 요구
# 그러나 다른 연구원들은 여전히 v7.5를 필요 해결책은 ?
root@minsky:/data# docker run --rm bsyu/nvcc:ppc64le-xenial nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Sat_Sep__3_19:09:38_CDT_2016
Cuda compilation tools, release 8.0, V8.0.44
22. IBM 과 NVIDIA 가 제안하는
딥러닝 플랫폼
Why nvidia-docker ?
root@minsky:/data/mydocker# docker run --rm bsyu/p2p:ppc64le-xenial
[./simpleP2P] - Starting...
Checking for multiple GPUs...
CUDA error at simpleP2P.cu:63 code=30(cudaErrorUnknown) "cudaGetDeviceCount(&gpu_n)“
…
root@minsky:/data/mydocker# nvidia-docker run --rm bsyu/p2p:ppc64le-xenial
[./simpleP2P] - Starting...
Checking for multiple GPUs...
CUDA-capable device count: 4
> GPU0 = "Tesla P100-SXM2-16GB" IS capable of Peer-to-Peer (P2P)
> GPU1 = "Tesla P100-SXM2-16GB" IS capable of Peer-to-Peer (P2P)
> GPU2 = "Tesla P100-SXM2-16GB" IS capable of Peer-to-Peer (P2P)
> GPU3 = "Tesla P100-SXM2-16GB" IS capable of Peer-to-Peer (P2P)
…
cudaMemcpyPeer / cudaMemcpy between GPU0 and GPU1: 32.91GB/s
“nvidia-docker is essentially a wrapper around the docker command that
transparently provisions a container with the necessary components to execute code
on the GPU.”
23. IBM 과 NVIDIA 가 제안하는
딥러닝 플랫폼
POWER8 상에서의 nvidia-docker 지원
root@minsky:~# NV_GPU=0,1 nvidia-docker run --rm -v /nvme:/nvme bsyu/caffe:ppc64le-
xenial ./caffe train -gpu all --solver=/nvme/solver.prototxt
Fri Feb 3 15:56:37 2017
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 361.107 Driver Version: 361.107 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|=============================================================================|
| 0 Tesla P100-SXM2... On | 0002:01:00.0 Off | 0 |
| N/A 51C P0 47W / 300W | 15927MiB / 16280MiB | 65% Default |
+-------------------------------+----------------------+----------------------+
| 1 Tesla P100-SXM2... On | 0003:01:00.0 Off | 0 |
| N/A 40C P0 46W / 300W | 15443MiB / 16280MiB | 44% Default |
+-------------------------------+----------------------+----------------------+
| 2 Tesla P100-SXM2... On | 0006:01:00.0 Off | 0 |
| N/A 39C P0 32W / 300W | 0MiB / 16280MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
| 3 Tesla P100-SXM2... On | 0007:01:00.0 Off | 0 |
| N/A 35C P0 30W / 300W | 0MiB / 16280MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 129098 C ./caffe 15909MiB |
| 1 129098 C ./caffe 15425MiB |
+-----------------------------------------------------------------------------+
24. IBM 과 NVIDIA 가 제안하는
딥러닝 플랫폼
Docker Hub에서의 ppc64le images