2. 大量のデータ
Source for Big Data Growth chart: IDC – The Digitization of the World (May 2020) storagenewsletter.com: 64.2ZB of Data Created or Replicated in 2020
科学的データの増大
Fueled by accurate sensors and simulations
393TB
COVID-19 Graph Analytics
287TB/day
ECMWF
16TB/sec
SKA
550TB
NASA Mars Landing Simulation
ビッグデータのさらなる増大
90% of the world’s data in the last 2 years
2010 2015 2020 2025
175
zettabytes
58
zettabytes
64
zettabytes
3. (ちょっと前の話ですが) SC18 Gordon Bell award winner
気候モデル構築へのディープラーニングの適用
• 過去の膨大な観測データと異常気象との関係を、Semantic Segmentation ネットワークで
モデル化に成功 (Tiramisu および DeepLabv3+ の改良版)
• ORNL Summit: 27,360 x V100、CSCS PizDaint: 5,300 x P100 までスケール
T. Kurth, et. al., “Exascale Deep Learning for Climate Analytics”
10. cuFile API の使用例
CUfileDescr_t cf_descr;
status = cuFileDriverOpen(); // initialize
fd = open(TESTFILE, O_RDONLY|O_DIRECT, 0, true); // interop with normal file IO
cf_descr.handle.fd = fd;
status = cuFileHandleRegister(&cf_handle, &cf_descr); // check support for file at this mount
cuda_result = cudaMalloc(&devPtr, size); // user allocates memory
status = cuFileBufRegister(devPtr, size); // initialize and register the buffer
ret = cuFileRead(cf_handle, devPtr, size, 0, 0); // ~pread: file handle, GPU base address, size,
// offset in file, offset in GPU buffer
status = cuFileBufDeregister(devPtr); // Cleanup
cuFileHandleDeregister(cf_handle);
close(fd);
cuFileDriverClose();
/* Launch Cuda Kernels */
11. スマートなパスの選択
• スマートな経路選択
GPU A と GPU B の接続は、PCIe 経由と、NVLink 経由の2通りある。
GDS は高速な経路を自動的に選択。
• 中間バッファを使ったステージング
右の図の NIC -> GPU a -> GPU B の例では、GPU A に中間バッファが
確保され、GPU A または GPU B の DMA エンジンが、GPU A から GPU
B のデータ転送を担当する。
CPU A CPU B
PCIe
Switch
PCIe
Switch
GPU A GPU B
NIC A NIC B
Buf
NVLink
13. ハードウェア、ソフトウェア要件
Supported HW
● GPU
○ Data Center and Quadro (desktop)
cards with compute capability > 6
● NIC
○ ConnectX-5 and ConnectX-6
● CPU
○ x86-64
● NVMe
○ Version 1.1 or greater
● Systems
○ DGX, EGX
● Computational Storage
○ ScaleFlux CSD
SW Requirement
● GPU driver 418.x onwards
● CUDA version 10.1 or above
● MOFED
○ Preferred 5.4 or 5.3 (DKMS support)
● DGX BaseOS 5.0.2 or later
● Linux Kernel
○ 4.15 or later
○ NO kernel > 5.4
○ Note: No support for 5.9 or later
● Linux Distros
○ GDS mode
■ UB 18.04 (4.15.x),20.04 (5.4.x)
■ RHEL (>=8.x)
● compat mode only
■ RHEL 7.9, Debian 10, CentOS 8.3, SLES 15.2,
OpenSUSE (15.2)
14. 現時点での制限事項
▪ Compute Capability 6.0 (Pascal) 以降の、データセンター及びワークステーション (Quadro/RTX) GPU でのみ GDS モードをサ
ポート。それ以外の GPU では互換モードで動作。
▪ Linux 上でのみ動作。Windows は非サポート。
▪ 仮想マシンでのサポートは限定的。
▪ NVIDIA Ampere アーキテクチャの、タイムスライスベースの vGPU のみサポート (MIG ベースの vGPU は非サポート)
▪ A40, A16, A10, A2, RTX A6000, RTX A5000
▪ 詳細はこちら
▪ POWER や Arm アーキテクチャは非サポート。
▪ O_DIRECT を厳密にサポートしたファイルシステムでのみ動作。Not supported on file systems which cannot perform IO
using strict O_DIRECT semantics like compression, checksum, inline IO, buffering to page cache.
▪ NVIDIA (Mellanox) 以外のネットワークアダプタは非サポート。
▪ IOMMU は DGX でのみ部分的にサポート。
23. DeepCam 推論
DALI 1.3: DeepCAM is a component of MLPerf HPC
0
10
20
30
40
8 16 32
NumPy (baseline) DALI + GDS (compat) DALI + GDS
バッチサイズ
有効帯域幅
[GB/s]
Performance benchmarking done with PyTorch DeepCAM using standard GDS configuration in DGX A100,
UB 20.04 MLNX_OFED 5.3 GDS 1.0 DALI 1.3, EXAScaler 5.1.1 , 2.12.3_ddn29.
Application for batch size >= 32 limited by GPU compute throughput
24. PyTorch + DALI + GDS でのトレーニング
~1.17x gain for a single node
25. DALI と GDS
▪ DALI の NumPy Reader が GDS に対応
@pipeline_def(batch_size=batch_size, num_threads=3, device_id=0)
def pipe_gds():
data = fn.readers.numpy(device='gpu', file_root=data_dir, files=files)
return data
p = pipe_gds()
p.build()
pipe_out = p.run()
data_gds = pipe_out[0].as_cpu().as_array() # as_cpu() to copy the data back to CPU memory
print(data_gds.shape)
plot_batch(data_gds)
26. 30
データの準備 / ETL 可視化
分析/機械学習
RAPIDS とは
GPU でデータサイエンスを高速化
cuDF
➢ GPU-accelerated ETL functions
➢ Tracks Pandas and other common
PyData APIs
➢ Dask + UCX integration for scaling
RAPIDS ML
➢ GPU-native cuML library, plus
XGBoost, FIL, HPO, and more
cuGraph
➢ GPU graph analytics, including TSP,
PageRank, and more
cuxfilter
➢ GPU-accelerated cross-filtering
pyViz integration
➢ Plotly Dash, Bokeh, Datashader,
HoloViews, hvPlot
CLX + Morpheus
Cyber log processing + anomaly detection
cuSignal
Signals processing
cuSpatial
Spatial analytics
cuStreamz
Streaming analytics
cuCIM
Computer vision & image processing primitives
node-RAPIDS
Bindings for node.js
Domain-Specific Libraries
...and more!
27. cuDF
Apache Arrow のデータフォーマット
Pandas 的な API
• Unary and Binary Operations
• Joins, Merges
• GroupBys
• Filters
• File readers
• User Defined Functions
• Etc.
GPU データフレーム ライブラリ
28. RAPIDS cuDF と GDS
GDS is also used
by cuCIM as part
of the Clara
Health pipeline
3TB scale
3x DGX A100’s 24
workers
dataset stored in
parquet format
1 DDN Lustre filer
https://github.com/rapidsai/gpu-bdb
30. SPARK 3.0
▪ RAPIDS Accelerator for Apache Spark is a plugin for
accelerating Apache Spark workloads on NVIDIA GPUs
▪ 80% of Fortune 500 use Apache Spark in production
▪ Growing adoption of Spark 3.0
▪ Transparently accelerate Spark dataframe and SQL operations
▪ 3X performance speedup*
3X Faster at 50% the Cost with No Code Changes
Powering Adobe’s
Intelligent Services
platform optimizing
cost savings to 66% of
current CPU systems.
Reduce runtime of
55TB advertising
pipeline with over
2.8T records to
5 hours
Accelerating
production fraud
detection pipeline by
20x at 50% the cost.
* based on the NDS 3TB 105 query benchmark.
31. RAPIDS ACCELERATOR FOR Apache SPARK (PLUGIN)
UCX Libraries
RAPIDS libcudf
(C++ Libraries)
CUDA
JNI bindings
Mapping From Java/Scala to C++
RAPIDS Accelerator
for Spark
分散 Spark アプリケーション
Spark SQL API Spark Shuffle
DataFrame API
if gpu_enabled(operation, data_type)
call-out to RAPIDS
else
execute standard Spark operation
JNI bindings
Mapping From Java/Scala to C++
● シャッフルのカスタム実装
● RDMA と GPU Direct に最適化
Apache Spark コア
32. IoT/M2M大量データ処理にも ~ PG-StromのGPU-Direct SQL機構
オモシロ技術を、カタチにする。
▌GPUって計算のアクセラレータで、I/O中心のワークロードだと役に立たないんでしょ?
そんな風に思っていたことが、自分にもありました・・・。
▌例えば、IoT/M2Mログデータ処理
大量のデータが時々刻々溜まっていく。簡単にTB(テラバイト)を越え、クラウドに持って行くのも、DBにインポートするのも大変。
ログ収集サーバが生成したデータを、使い慣れたSQLを使って、その場で、数十GB/sの速度で実行できるのは…
➔ GPUDirect Storageを使って実装された、PG-StromのGPU-Direct SQL機構
Manufacturing
Home electronics
Mobile
WHERE
JOIN
GROUP BY
PostGIS
JSONB
GPU-Direct SQL
ログ収集
サーバ
DB/GPU
サーバ
DB管理者/ユーザ
BIツール
(可視化)
AL/ML
(異常検知など)
IoT/M2M
デバイス
RoCE対応・高速
ネットワーク
※ 小規模なシステム(~数十TB)なら、PCI-E接続のローカルNVME-SSDを利用して、
一台のサーバでログ収集とデータ分析を兼ねる構成も可能。
33. IoT/M2M大量データ処理にも ~ PG-StromのGPU-Direct SQL機構
オモシロ技術を、カタチにする。
Manufacturing
Home electronics
Mobile
WHERE
JOIN
GROUP BY PostGIS
JSONB
GPU-Direct SQL
ログ収集
サーバ
DB/GPU
サーバ
DB管理者/ユーザ
BIツール
(可視化)
AL/ML
(異常検知など)
IoT/M2M
デバイス
RoCE対応・高速
ネットワーク
※ 小規模なシステム(~数十TB)なら、PCI-E接続のローカルNVME-SSDを利用して、
一台のサーバでログ収集とデータ分析を兼ねる構成も可能。
WHERE
JOIN
GROUP BY
データの流れ
SQL処理
NVME-SSDの普及・低価格化
数十GB/sもの速度で
ストレージからデータを
読み出せるようになる。
従来のSQL処理の前提
CPUやRAMに比べると、
ストレージは”桁違い”に
遅い。
ボトルネック
36. フレームワークと開発ツール
Frameworks, apps
● Visualization, e.g. IndeX
● Health, e.g. cuCIM in CLARA
● Data analytics, e.g. RAPIDS,cuCIM, SPARK, nvTABULAR
● HPC, e.g. molecular modeling, genomics
● DL, e.g. PyTorch,TensorFlow, MxNet (Via DALI)
● Databases, e.g. HeteroDB
Readers
● RAPIDS cuDF, DALI
● HDF5 Serial, LBNL (repo); passed HDF5 regression suite, IOR layered
on HDF5
● OMPIO U Houston; early PHDF5 functionality
● MPI-IO engaging with ANL, others
● ADIOS ORNL
● Zarr prototyped with Pangeo community
Key
NVIDIA functional
NVIDIA WIP/planned
Functional
WIP/planned
38. GDS ファイルシステム パートナー
Partner Company Partner Product GDS version Date
NetApp ONTAP 9.10.1 1.0 and higher TBA
NetApp
ThinkParQ
System Fabrics Works
BeeGFS Tech Preview 1.1 and higher TBA
IBM Spectrum Scale 5.1.2 1.1 and higher Nov 2021
DDN EXAScaler 6.0* 1.1 and higher Nov 2021
VAST Universal Storage 4.1 1.1 and higher Nov 2021
WekaIO WekaFS 3.13 1.0 June 2021
DellEMC PowerScale 9.2.0.0 1.0 Oct 2021
Hitachi Vantara HCSF 1.0 Oct 2021
● Open source Lustre 2.15 can be used to deploy GDS acceleration*
45. DGX A100 のネットワークと GDS
Lower Latencies and Increased CPU Efficiency
North-south storage configuration adapters 4 and 5 used for GDS
DGX A100 での標準的な GDS 構成
Converged east-west configuration adapters 0-3, 6-9 used for GDS
高スループット GDS 構成
※ お問い合わせください
System Memory
CPU
PCIe Switch
GPU
NICs
Storage
2x
200Gb/s
System Memory
CPU
PCIe Switch
GPU
NICs
Storage
8x
200Gb/s
46. コンテナ環境での GPUDirect Storage
▪ コンテナでの GDS 利用には追加の設定が必要
▪ nvidia-fs.ko カーネルモジュール
▪ /dev/nvidia-fs* デバイスファイル
▪ ブロックデバイス検出のため --volume /run/udev オプション
▪ さらに、 --ipc=host も必要
▪ MagumIO のリポジトリにある gds-run-container スクリプトを使うと簡単
https://github.com/NVIDIA/MagnumIO/blob/main/gds/docker/README.md
Filesystem Driver
Application on CPU
cuFile API, libcufile.so
CUDA
Block IO Driver
Storage Driver
nvidia-fs.ko
Proprietary
Distributed
File
System
Virtual File System
Storage DMA Programmed with GPU BAR1 Address
47. 関連情報
▪ GTC22.03: Accelerating Storage IO to GPUs with Magnum IO
https://www.nvidia.com/en-us/on-demand/session/gtcspring22-s41347/
▪ NVIDIA GPUDirect Storage
https://docs.nvidia.com/gpudirect-storage/index.html
▪ NVIDIA Magnum IO Developer Environment
https://catalog.ngc.nvidia.com/orgs/nvidia/teams/magnum-io/containers/magnum-io
▪ NVIDIA Magnum IO GPUDirect Storage Overview Guide
https://docs.nvidia.com/gpudirect-storage/overview-guide/index.html
▪ NVIDIA GPUDirect Storage Installation and Troubleshooting Guide
https://docs.nvidia.com/gpudirect-storage/troubleshooting-guide/index.html
▪ GDS cuFile API Reference
https://docs.nvidia.com/gpudirect-storage/api-reference-guide/index.html
▪ GPUDirect Storage: A Direct Path Between Storage and GPU Memory
https://developer.nvidia.com/blog/gpudirect-storage/
▪ Accelerating IO in the Modern Data Center: Magnum IO Storage Partnerships
https://developer.nvidia.com/blog/accelerating-io-in-the-modern-data-center-magnum-io-storage-partnerships/