【18-c-7】gpuコンピューティングが世界を変える~gpgpuで開発をはじめるために知っておくべき10個のこと...
DESCRIPTION
TRANSCRIPT
Developers Summit 2011
「GPUコンピューティングが世界を変える」GPGPUで開発をはじめるために知っておくべき10個のこと
18-C-7馬路 徹
NVIDIA Japan (エヌビディア ジャパン)
Solution Architect (ソリューション・アーキテクト)
Developers Summit 2011
GPGPUで開発をはじめるために知っておくべき10個のこと
1. GPUの進化
2. GPUコンピューティング・アーキテクチャ
3. コーディング方法
4. GPUコンピューティングによる1-2桁の性能向上
5. GPUはどこにあるか
6. 今日:GPUコンピューティングを学ぶ
7. 明日:GPUコーディングする
8. 明後日:GPUクラウドで動かす
9. 手のひらスーパーコンピューティングを実現するクライアント用チップ
10. 来たるべくパラダイム・シフト
Developers Summit 2011
GPU Unified Shader+ CUDA
2010Fermi3 Billion
Transistors
1. GPU(Graphic Processor Unit)の進化
Developers Summit 2011
最新のグラフィックス・プロセッサ実写のようにリアルな3次元グラフィックスをリアルタイム描画
最小限の頂点データでこれを実現テッセレーション技術はx10~x100 の頂点を生成より少ないデータサイズ、通信帯域で描画可能
From Source TessellationDisplacement
Mapping
Developers Summit 2011
Vertex
Triangle
Pixel
RasterOperation
Memory
固定機能プロセッサから超並列の汎用プロセッサへ
GeForce8シリーズ以降
Developers Summit 2011
2. GPUコンピューティング・アーキテクチャGPUはマルチスレッドを処理する超並列マルチコアプロセッサ
頂点シェーダ、ジオメトリ・シェーダ及びピクセル・シェーダはSP/SMにより実行される
GPUコンピューティング・スレッドもSP/SMにより処理される
Thread Execution Manager
Input Assembler
Host
Parallel DataCache
Global Memory
Load/store
Parallel DataCache
Thread Processors
Parallel DataCache
Parallel DataCache
Thread Processors
Parallel DataCache
Parallel DataCache
Thread Processors
Parallel DataCache
Parallel DataCache
Thread Processors
Parallel DataCache
Parallel DataCache
Thread Processors
Parallel DataCache
Parallel DataCache
Thread Processors
Parallel DataCache
Parallel DataCache
Thread Processors
Parallel DataCache
Parallel DataCache
Thread Processors
頂点シェーダスレッド
ジオメトシェーダスレッド
ピクセルシェーダスレッド
SM(Stream Multiprocessor)
SP(32/64b Stream Processor)
GPUコンピューティングスレッド
Developers Summit 2011
NVIDIA GPUのコア数の変遷
2
1
4
8
16
32
64
128
256
512
1024
480
240216128112
128
64
32
16
8+166+16
5+12
3+42+21+4
6+165+12
4+83+4
1+2
3+8
3+2
1+2
GeForce3
2+4
0+21+4
DirectX 10DirectX 8 DirectX 9 DirectX 9c
Programmable Shader
プログラマブル・シェーダー数
Vertex Shader + Pixel Shader
Unified Shader
Unified Shader / CUDA
・ 縦軸はプシェーダの数を示しており、性能を示すものではない。
・ ここでは代表的な製品のみを表示している。
GeForce4
GeForce5
GeForce6
GeForce7
128
96
32
16
8
GeForce8
GeForce9
GeForce200
GeForce400
GeForce500
2001
DirectX 11
TESLA ARCHITECTURE
2002 2003 2004-5 2006-7 2008 2008 2009 2010 2010-11
480336288192144
96
48
480384288192
96
512
FERMI ARCHITECTURE
KeplerMaxwell
48
Developers Summit 2011
GPUの飛躍的な性能向上
GeForce6800 Ultra
7800 GTX
7900 GTX
8800 Ultra
GTX285
9800 GTX+
浮動小数点演算性能
GFL
OP
S (3
2b S
ingl
e P
reci
sion
)
OVER 1-TFLOPS(一昔のスーパーコンピュータ並み)
0
200
400
600
800
1000
1200
1400
1600
1800
2004 2005 2006 2007 2008 2009 2010
CPU
GeForce
GTX580
Developers Summit 2011
GPUコンピューティング・システム
4 cores
CPU90 GFLOPS SP
GPU1580 GFLOPS SP
CPUと協調してGPUの圧倒的なパワーを活用
Developers Summit 2011
3.コーディング方法最初に「C with CUDA Extension」を開発
__global__ void saxpy_parallel(int n, float alpha, float *x, float *y){
int i = blockIdx.x * blockDim.x + threadIdx.x;if (i < n) y[i] = alpha * x[i] + y[i];
}// Invoke parallel saxpy() kernel (256 threads per block)int nblocks = (n + 255)/256;saxpy_parallel <<< nblocks, 256 >>>(n, 2.0, x, y);
CUDAコード
標準Cコード
void saxpy_serial(int n, float alpha, float *x, float *y){
for (int i=0; i<n; ++i)y[i] = alpha * x[i] + y[i];
}// Invoke serial saxpy() kernelsaxpy_serial(n, 2.0, x, y);
CPUからコールしGPUで実行する関数
グローバル・スレッドIDをそのままインデックスに活用
グリッド、ブロックの次元記載
Developers Summit 2011
多様なコーディング方法を提供
GPU コンピューティング・アプリ
NVIDIA GPUwith the CUDA Parallel Computing Architecture
C OpenCLtm Direct Compute
FORTRAN Java and PythonWith CUDA
ExtensionsOver 60,000 developersRunning in Production since July 2007 SDK + Lib’s + Visual Profiler and debugger
1st GPU demoShipped 1st
OpenCL Beta DriverStrategic developers using NV SW today
1st GPU demoShipped 1st driver to Microsoft’s Win7 developersSupports all CUDA-Architecture GPU’s
SW supplied by:• The Portland
Group• NCSA release
Compute KernelsDriver API Bindings
OpenCL is trademark of Apple Inc. used under license to the Khronos Group Inc.
Developers Summit 2011
コーディングの容易性及び性能向上
コーディングの容易性はコーディング時間で測定 (hours) 性能は達成された浮動小数点処理性能で測定 (gflops)
Source: Nicolas Pinto, MIT
GPU with CUDA
Cell Processor
CPU & SSE-SIMD
High-level algorithm Development tool on CPU
Developers Summit 2011
4.GPUコンピューティングによる1-2桁の性能向上
146X
医療画像ユタ大学
36X
分子動力学イリノイ大学
18X
ビデオトランスコードElemental Tech
50X
MATLAB 演算AccelerEyes
100X
宇宙物理学理研
149X
金融シミュレーションオックスフォード
47X
線形計画法Universidad
Jaime
20X
3D 超音波解析Techniscan
130X
量子化学イリノイ大学
30X
遺伝子配列解析メリーランド大学
Developers Summit 2011
Tianhe-1A Supercomputer breaks World Record with NVIDIA GPU
The Chinese Supercomputer Tianhe-1A achieved 50% higher performance (2.507PFLOPS) than the previous record holder in Top500. ( 28th Oct, 2010 )
7,168 Tesla M2050 GPU along with 14,336 CPUs used. With CPU alone, this performance will demand >50,000 CPUs.
Developers Summit 2011
Three of W/W Top5 Supercomputers using NVIDIA GPU
with NVIDIA GPU
Developers Summit 2011
Top5 Supercomputers with NVIDIA GPU are using less Power
Developers Summit 2011
5.GPUはどこにあるか
Developers Summit 2011
GPUはスマートフォンからスーパコンピューターまで現時点でCUDA実行可能デバイスはPCからスーパーコンピューターまで
Developers Summit 2011
世界に広がる1,000以上のGPUクラスター
Fermi Lab
CSIRO256 GPUs
NCSA384 GPUs
Chinese Academy of Sciences
2000+ GPUs
Daresbury LabPNNL
256 GPUs
National Taiwan Univ
Max Planck Institute
ArgonneLab
Harvard
Oxford
Jefferson LabsGeorgia TechTACC
Delaware
OSC Maryland
Johns Hopkins
WestGrid
StanfordUNC
NERSC
設置予定のシステム
稼働中のシステム
IIT Delhi
CEA
東工大1408 GPU
PekingUniversity
Univ of Science & Tech
TsinghuaUniversity
NCHC
CurtinUniversity
SwinburneUniversity
理研110 GPU
大阪府立大64 GPU
長崎大学256 GPU
KISTI
Anna Univ
IIT Madras
Indian Institute of Science
NIT Calicut
Dept of Space
LRDE
Indian Inst of Tropical
Meteorology
NizhegorodskyUniversity
Kazan Univ
St. Petersburg University
Institute ofPhysics
Aarhus
Norwegian Univ of S & T
Braunschweig
Copenhagen
Oak Ridge
WisconsinVaTechCambridge
Groningen
SNU
Yonsei
Utah
Berkeley
環境研320 GPU
Developers Summit 2011
6.今日:GPUコンピューティングを学ぶ国内外から10冊以上の教材
Developers Summit 2011
www.nvidia.co.jp/cuda
6.今日:GPUコンピューティングを学ぶCUDAに関する特設サイト
CUDA Zoneとは:
開発キット、対応GPU、事例、イベント等の最新情報が掲載
Developers Summit 2011
7.明日:GPUコーディングする
デバッガプロファイラー
cuda-gdbNV Visual Profiler Parallel NsightVisual Studio
AllineaTotalView
MATLABMathematicaNI LabView
pyCUDA
数値演算パッケージ
CC++
FortranOpenCL
DirectComputeJava
Python
GPU コンパイラ
PGI AcceleratorCAPS HMPP
mCUDAOpenMP
並列化コンパイラ
BLASFFT
LAPACKNPP
VideoImagingGPULib
数値計算ライブラリ
OEM、ソリューション パートナー
Developers Summit 2011
8.明後日:GPUクラウドで動かすAmazon EC2 Cluster GPU Instances w/Tesla
Utilizes HVM with IOMMU pass-through.
DomU OS and applications do direct IO with the GPU.
100% of Tesla goodness!
Hardware
Hypervisor
DomU OS
Application
Developers Summit 2011
The Cluster GPU Quadruple XL Instance
HVM hosted 64-bit platform Dual quad-core processors 22GB of memory 10GbE networking Two NVIDIA Tesla m2050 GPUs
$2.10 per hour
Developers Summit 2011
9. 手のひらスーパーコンピューティングを
実現するクライアント用チップ
NVIDIA Tegra
Developers Summit 2011
Tegra1 最適設計された8プロセッサが最小電力で同時並列動作可能
Tegra1
Developers Summit 2011
Tegra2 デュアルCPUコアSoC
8 Dedicated Processors
Highest CPU
Performance
HD 1080p Video
GeForce® Graphics
Ultra Low Power
Developers Summit 2011
Tegra 2 は他スマートフォンSoCを凌駕
CBATegra 2
GLBench 2.0 - EgyptCoremark
Tegra 2
CPU 性能 GPU性能
CBA
Developers Summit 2011
CES2011 Awards - 11 Category
Best Notebook Best Ultraportable Best Tablet Best Smartphone Best Storage Best App/Software Best Camera/Camcoder Best Accesory Best Wireless NW/Home Entert. Best Car Tech Best Enabling Technology
Alienware M17x (NVIDIA GTX460 + Sandy Bridge)
Samsung 9 SeriesMotorola Xoom (Tegra2, Android3.0)Motorola Atrix 4G (Tegra2)Seagate Tiniest GoFlexSplashtop Remote for AndroidSony HDR-TD10Plantronics Voyager PROMonsoon Vulkano FlowParrot Asteroid Card ReceiverNVIDIA Tegra2
NVIDIA and products using NVIDIA devices won four out of 11 Awards in CES2011
From LAPTOP, one of the CES2011 Sponsors
Developers Summit 2011
World Mobile CongressからのホットニュースTegra ロードマップ及び4CPUコア内蔵Tegra KAL-EL発表・実演
Developers Summit 2011
10.来るべきパラダイム・シフトx86 CPU-GPUからARM CPU–GPUへ
Developers Summit 2011
市場はPCからモバイル・コンピューティングへ
Developers Summit 2011
モバイルCPUのARMはx86の出荷数を大きく凌駕
Developers Summit 2011
次期MS WindowsはARMもサポート
x86の一人舞台であったWindowsにもARMが参入
NVIDIA、Qualcom、TIのARM搭載SoCでWindowsデモ
NVIDIA Tegra2ではMS Officeもデモ
Intelx86
QualcomARM
TIARM
NVIDIAARM
on Tegra2(Win + MS Office)
Developers Summit 2011
NVIDIAは次世代ARM Cortex A15ライセンスを入手
NVIDIAはDenver用にARMアーキテクチャ・ライセンスを入手
これによりNVIDIAは独自にARM CPUコアの強化をはかる
NVIDIAはx86に頼ることなく、ラップトップPCからワークステーション、
スーパーコンピュータに至るまで、GPU とARM CPUを一体化した高性能
SoCを製品化
Developers Summit 2011
GPUはエネルギー効率を追求モバイル機器の電池寿命改善~スーパーコンピュータの省エネ
Developers Summit 2011
Thank you for your attention