25
Mark Harris, November 16, 2015 HPC with the NVIDIA Accelerated Computing Toolkit

HPC with the NVIDIA Accelerated Computing Toolkitimages.nvidia.com/events/sc15/pdfs/SC5110-hpc-nvidia...this is a "generic” version of LULESH with no architecture-specific tuning.”

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: HPC with the NVIDIA Accelerated Computing Toolkitimages.nvidia.com/events/sc15/pdfs/SC5110-hpc-nvidia...this is a "generic” version of LULESH with no architecture-specific tuning.”

Mark Harris, November 16, 2015

HPC with the NVIDIA Accelerated Computing Toolkit

Page 2: HPC with the NVIDIA Accelerated Computing Toolkitimages.nvidia.com/events/sc15/pdfs/SC5110-hpc-nvidia...this is a "generic” version of LULESH with no architecture-specific tuning.”

2

0

25

50

75

100

125

2013 2014 2015

Accelerators Surge in World’s Top Supercomputers

100+ accelerated systems now on Top500 list

1/3 of total FLOPS powered by accelerators

NVIDIA Tesla GPUs sweep 23 of 24 new

accelerated supercomputers

Tesla supercomputers growing at 50% CAGR

over past five years

Top500: # of Accelerated Supercomputers

Page 3: HPC with the NVIDIA Accelerated Computing Toolkitimages.nvidia.com/events/sc15/pdfs/SC5110-hpc-nvidia...this is a "generic” version of LULESH with no architecture-specific tuning.”

3 NVIDIA CONFIDENTIAL. DO NOT DISTRIBUTE.

70% OF TOP HPC APPS NOW ACCELERATED

KEY MATERIALS APP NOW ACCELERATED

Typically Consumes

10-25%

of HPC System

INTERSECT360 SURVEY OF TOP APPS

Top 10 HPC Apps 90%

Accelerated

Top 50 HPC Apps 70%

Accelerated

1 Dual K80 Server 1.3x

4 Dual CPU Servers 1.0x

Intersect360, Nov 2015 “HPC Application Support for GPU Computing” Dual-socket Xeon E5-2690 v2 3GHz, Dual Tesla K80, FDR InfiniBand Dataset: NiAl-MD Blocked Davidson

Page 4: HPC with the NVIDIA Accelerated Computing Toolkitimages.nvidia.com/events/sc15/pdfs/SC5110-hpc-nvidia...this is a "generic” version of LULESH with no architecture-specific tuning.”

4

Accelerated Computing Available Everywhere

Supercomputer Workstation - Notebook Datacenter - Cloud Embedded - Automotive

NVIDIA Accelerated Computing Toolkit

Page 5: HPC with the NVIDIA Accelerated Computing Toolkitimages.nvidia.com/events/sc15/pdfs/SC5110-hpc-nvidia...this is a "generic” version of LULESH with no architecture-specific tuning.”

5

NVIDIA Accelerated Computing Toolkit Everything You Need to Accelerate Your Applications

developer.nvidia.com

Libraries Language Solutions

Tools System Interfaces Training

FFT BLAS DNN

NSight

C++ OpenACC

C/C++ Fortran OpenACC FFTW BLAS

GPUDirect Unified Memory NSight IDE Visual Profiler Hands-on Labs Docs & Samples

DNN

Page 6: HPC with the NVIDIA Accelerated Computing Toolkitimages.nvidia.com/events/sc15/pdfs/SC5110-hpc-nvidia...this is a "generic” version of LULESH with no architecture-specific tuning.”

6

Get Started Quickly

OpenACC Toolkit

Simple way to accelerate

scientific code

developer.nvidia.com/openacc

Machine Learning Tools

Design, Train and Deploy Deep

Neural Networks

developer.nvidia.com/deep-learning

CUDA Toolkit

High-Performance C/C++

Applications

developer.nvidia.com/cuda-toolkit

Page 7: HPC with the NVIDIA Accelerated Computing Toolkitimages.nvidia.com/events/sc15/pdfs/SC5110-hpc-nvidia...this is a "generic” version of LULESH with no architecture-specific tuning.”

7

Why is Machine Learning Hot Now?

Big Data Availability GPU Acceleration New Techniques

350 millions images uploaded per day

2.5 Petabytes of customer data hourly

300 hours of video uploaded every minute

Page 8: HPC with the NVIDIA Accelerated Computing Toolkitimages.nvidia.com/events/sc15/pdfs/SC5110-hpc-nvidia...this is a "generic” version of LULESH with no architecture-specific tuning.”

8

cuDNN Deep Learning Primitives

Igniting

Artificial Intelligence

Drop-in Acceleration for major

Deep Learning frameworks:

Caffe, Theano, Torch

Up to 2x faster on AlexNet than

baseline Caffe GPU

implementation

NVIDIA GPU

cuDNN

Frameworks

Applications

0

20

40

60

80

cuDNN 1 cuDNN 2 cuDNN 3

Millions of images trained per day

0.0x

0.5x

1.0x

1.5x

2.0x

2.5x

Alexnet OverFeat VGG

Train up to 2X faster than cuDNN 2

Page 9: HPC with the NVIDIA Accelerated Computing Toolkitimages.nvidia.com/events/sc15/pdfs/SC5110-hpc-nvidia...this is a "generic” version of LULESH with no architecture-specific tuning.”

9 NVIDIA CONFIDENTIAL. DO NOT DISTRIBUTE.

Tesla M40 World’s Fastest Accelerator for Deep Learning

Caffe Benchmark: AlexNet training throughput based on 20 iterations, CPU: E5-2680v3 @ 2.70GHz. 64GB System Memory, CentOS 6.2

0 1 2 3 4 5 6 7 8 9 10 11

Tesla M40

CPU

Reduce Training Time from 10 Days to 1 Day

# of Days

8x Faster Caffe Performance

CUDA Cores 3072

Peak SP 7 TFLOPS

GDDR5 Memory 12 GB

Bandwidth 288 GB/s

Power 250W

Page 10: HPC with the NVIDIA Accelerated Computing Toolkitimages.nvidia.com/events/sc15/pdfs/SC5110-hpc-nvidia...this is a "generic” version of LULESH with no architecture-specific tuning.”

11

NVIDIA® DIGITSTM

Data Scientists and Researchers:

Quickly design the best deep neural network (DNN) for your data

Visually monitor DNN training quality in real-time

Manage training of many DNNs in parallel on multi-GPU systems

Interactive Deep Learning GPU Training System

developer.nvidia.com/digits

Page 11: HPC with the NVIDIA Accelerated Computing Toolkitimages.nvidia.com/events/sc15/pdfs/SC5110-hpc-nvidia...this is a "generic” version of LULESH with no architecture-specific tuning.”

12

OpenACC Simple | Powerful | Portable

Fueling the Next Wave of

Scientific Discoveries in HPC

University of Illinois PowerGrid- MRI Reconstruction

70x Speed-Up

2 Days of Effort

http://www.cray.com/sites/default/files/resources/OpenACC_213462.12_OpenACC_Cosmo_CS_FNL.pdf

http://www.hpcwire.com/off-the-wire/first-round-of-2015-hackathons-gets-underway

http://on-demand.gputechconf.com/gtc/2015/presentation/S5297-Hisashi-Yashiro.pdf

http://www.openacc.org/content/experiences-porting-molecular-dynamics-code-gpus-cray-xk7

RIKEN Japan NICAM- Climate Modeling

7-8x Speed-Up

5% of Code Modified

main() { <serial code> #pragma acc kernels //automatically run on GPU

{ <parallel code> } }

0x

2x

4x

6x

8x

10x

12x

miniGhost(Mantevo)

NEMO (Climate &Ocean)

CLOVERLEAF(Physics)

Spe

ed

up

vs.

Sin

gle

CP

U T

hre

ad CPU: MPI + OpenMP

CPU: MPI + OpenACC

CPU + GPU: MPI + OpenACC

Performance Portability with PGI

359.miniGhost: CPU: Intel Xeon E5-2698 v3, 2 sockets, 32-cores total, GPU: Tesla K80 (single GPU) NEMO: Each socket CPU: Intel Xeon E5-‐2698 v3, 16 cores; GPU: NVIDIA K80 both GPUs CLOVERLEAF: CPU: Dual socket Intel Xeon CPU E5-2690 v2, 20 cores total, GPU: Tesla K80 both GPUs

30x

Page 12: HPC with the NVIDIA Accelerated Computing Toolkitimages.nvidia.com/events/sc15/pdfs/SC5110-hpc-nvidia...this is a "generic” version of LULESH with no architecture-specific tuning.”

13

Janus Juul Eriksen, PhD Fellow

qLEAP Center for Theoretical Chemistry, Aarhus University

“ OpenACC makes GPU computing approachable for

domain scientists. Initial OpenACC implementation

required only minor effort, and more importantly,

no modifications of our existing CPU implementation.

Lines of Code

Modified

# of Weeks

Required

# of Codes to

Maintain

<100 Lines 1 Week 1 Source

Big Performance

0.0x

4.0x

8.0x

12.0x

Alanine-113 Atoms

Alanine-223 Atoms

Alanine-333 Atoms

Speedup v

s CPU

Minimal Effort

LS-DALTON CCSD(T) Module Benchmarked on Titan Supercomputer (AMD CPU vs Tesla K20X)

LS-DALTON Large-scale Application for Calculating High-accuracy

Molecular Energies

Page 13: HPC with the NVIDIA Accelerated Computing Toolkitimages.nvidia.com/events/sc15/pdfs/SC5110-hpc-nvidia...this is a "generic” version of LULESH with no architecture-specific tuning.”

14

The NVIDIA OpenACC Toolkit Free Toolkit Offers Simple & Powerful Path to Accelerated Computing

Download at developer.nvidia.com/openacc

PGI Compiler Free OpenACC compiler for academia

NVProf Profiler Easily find where to add compiler directives

Code Samples Learn from examples of real-world algorithms

Documentation Quick start guide, Best practices, Forums

Page 14: HPC with the NVIDIA Accelerated Computing Toolkitimages.nvidia.com/events/sc15/pdfs/SC5110-hpc-nvidia...this is a "generic” version of LULESH with no architecture-specific tuning.”

15

__global__ void xyzw_frequency(int *count, char *text, int n) { const char letters[] { 'x','y','z','w' }; count_if(count, text, n, [&](char c) { for (const auto x : letters) if (c == x) return true; return false; }); }

CUDA Toolkit Flexibility – High Performance

DEVELOPER TOOLS PARALLEL C++ LIBRARIES

Drop-In Acceleration

Parallel Algorithms and

Custom Parallel C++

Pinpoint Bugs and

Performance Opportunities

Download at developer.nvidia.com/cuda-toolkit

Page 15: HPC with the NVIDIA Accelerated Computing Toolkitimages.nvidia.com/events/sc15/pdfs/SC5110-hpc-nvidia...this is a "generic” version of LULESH with no architecture-specific tuning.”

16

BLAS BLAS

GPU Accelerated Libraries Drop-in Acceleration for Your Applications

Linear Algebra

& Numerical

Parallel

Algorithms

Signal Processing FFT, Image & Video

NVIDIA

Math Lib

NVIDIA NPP NVENC

Video Encode

GPU AI –

Path Finding

BLAS cuBLAS cuSparse cuSOLVER

BLAS AmgX

cuFFT

cuRAND

BLAS

Machine

Learning

developer.nvidia.com/gpu-accelerated-libraries

Page 16: HPC with the NVIDIA Accelerated Computing Toolkitimages.nvidia.com/events/sc15/pdfs/SC5110-hpc-nvidia...this is a "generic” version of LULESH with no architecture-specific tuning.”

17

Developer Tools Pinpoint Performance Bottlenecks and Hard-to-Find Bugs

NVIDIA Visual Profiler Analyze GPU Performance

CUDA-GDB Standard Linux Debugger

CUDA-MEMCHECK Find memory errors, leaks and race conditions

Develop, Debug, & Profile in Eclipse or Visual Studio

Page 17: HPC with the NVIDIA Accelerated Computing Toolkitimages.nvidia.com/events/sc15/pdfs/SC5110-hpc-nvidia...this is a "generic” version of LULESH with no architecture-specific tuning.”

18

Your Next Steps

Free Hands-On Self-Paced Labs in the NVIDIA Booth

Sign up for credit for on-line labs

Free In-Depth On-Line Courses

Deep Learning: developer.nvidia.com/deep-learning-courses

OpenACC: developer.nvidia.com/openacc-course

Learn from hundreds of experts at GTC 2016

All about Accelerated Computing: developer.nvidia.com

Many Learning Opportunities

APRIL 4-7, 2016 SILICON VALLEY

Page 18: HPC with the NVIDIA Accelerated Computing Toolkitimages.nvidia.com/events/sc15/pdfs/SC5110-hpc-nvidia...this is a "generic” version of LULESH with no architecture-specific tuning.”

19

Backup

Page 19: HPC with the NVIDIA Accelerated Computing Toolkitimages.nvidia.com/events/sc15/pdfs/SC5110-hpc-nvidia...this is a "generic” version of LULESH with no architecture-specific tuning.”

20 NVIDIA CONFIDENTIAL. DO NOT DISTRIBUTE.

// generate 32M random numbers on host thrust::host_vector<int> h_vec(32 << 20); thrust::generate(h_vec.begin(), h_vec.end(), rand); // transfer data to device (GPU) thrust::device_vector<int> d_vec = h_vec; // sort data on device thrust::sort(d_vec.begin(), d_vec.end()); // transfer data back to host thrust::copy(d_vec.begin(), d_vec.end(), h_vec.begin());

THRUST: Productive Parallel C++

Resembles C++ STL

Included in CUDA Toolkit

Productive High-level API

CPU/GPU Performance portability

CUDA, OpenMP, and TBB backends

Flexible, extensible

High-level parallel algorithms

Page 20: HPC with the NVIDIA Accelerated Computing Toolkitimages.nvidia.com/events/sc15/pdfs/SC5110-hpc-nvidia...this is a "generic” version of LULESH with no architecture-specific tuning.”

21

C++11 in CUDA

Count the number of occurrences of letters x, y, z and w in text

“C++11 Feels like a new language” – Bjarne Stroustrup

__global__ void xyzw_frequency(int *count, char *text, int n) { const char letters[] { 'x','y','z','w' }; count_if(count, text, n, [&](char c) { for (const auto x : letters) if (c == x) return true; return false; }); }

Read 3288846 bytes from "warandpeace.txt" counted 107310 instances of 'x', 'y', 'z', or 'w' in "warandpeace.txt"

Output:

Lambda

Function

Initializer List

Range-based

For Loop

Automatic type

deduction

Page 21: HPC with the NVIDIA Accelerated Computing Toolkitimages.nvidia.com/events/sc15/pdfs/SC5110-hpc-nvidia...this is a "generic” version of LULESH with no architecture-specific tuning.”

22

Parallel STL: Algorithms + Policies Higher-level abstractions for ease of use and performance portability

int main() { size_t n = 1 << 16; std::vector<float> x(n, 1), y(n, 2), z(n); float a = 13; auto I = interval(0, n); std::for_each(std::par, std::begin(I), std::end(I), [&](int i) { z[i] = a * x[i] + y[i]; }); return 0; }

On track for C++17 Standard Includes algorithms such as for_each, reduce, transform, inclusive_scan … Execution policies: std::seq std::par std::par_vec

Page 22: HPC with the NVIDIA Accelerated Computing Toolkitimages.nvidia.com/events/sc15/pdfs/SC5110-hpc-nvidia...this is a "generic” version of LULESH with no architecture-specific tuning.”

23

Instruction-Level Profiling

New in CUDA 7.5 Visual Profiler

Highlights hot spots in code, helping you target bottlenecks

Quickly locate expensive code lines

Detailed per-line stall analysis helps you understand underlying limiters

Pinpoint Performance Problems

Page 23: HPC with the NVIDIA Accelerated Computing Toolkitimages.nvidia.com/events/sc15/pdfs/SC5110-hpc-nvidia...this is a "generic” version of LULESH with no architecture-specific tuning.”

24

Unified Memory Dramatically Lower Developer Effort

System Memory

Past Developer View

GPU Memory

Developer View With Unified Memory

Unified Memory

Page 24: HPC with the NVIDIA Accelerated Computing Toolkitimages.nvidia.com/events/sc15/pdfs/SC5110-hpc-nvidia...this is a "generic” version of LULESH with no architecture-specific tuning.”

25 NVIDIA CONFIDENTIAL. DO NOT DISTRIBUTE.

Simplified Memory Management Code

void sortfile(FILE *fp, int N) { char *data; data = (char *)malloc(N); fread(data, 1, N, fp); qsort(data, N, 1, compare); use_data(data); free(data); }

void sortfile(FILE *fp, int N) { char *data; cudaMallocManaged(&data, N); fread(data, 1, N, fp); qsort<<<...>>>(data,N,1,compare); cudaDeviceSynchronize(); use_data(data); cudaFree(data); }

CPU Code CUDA 6 Code with Unified Memory

Page 25: HPC with the NVIDIA Accelerated Computing Toolkitimages.nvidia.com/events/sc15/pdfs/SC5110-hpc-nvidia...this is a "generic” version of LULESH with no architecture-specific tuning.”

26

Great Performance with Unified Memory

RAJA uses Unified Memory for heterogeneous array allocations

Parallel forall loops run on CPU or GPU

“Excellent performance considering this is a "generic” version of LULESH

with no architecture-specific tuning.”

- Jeff Keasler, LLNL

RAJA: Portable Parallel C++ Framework

1.5x

1.9x 2.0x

0

2

4

6

8

10

12

14

16

18

20

45^3 100^3 150^3

CPU: 10-core Haswell

GPU: Tesla K40

Million e

lem

ents

per

second

Mesh size GPU: NVIDIA Tesla K40, CPU: Intel Haswell E5-2650 v3 @ 2.30GHz, single socket 10-core

LULESH Throughput