1 of 8

GPUs

A*

Savior of the Sassy Cow

1

1

1

1

2 of 8

What’s a GPU?

AMD Ryzen 50000

NVIDIA RTX3090

2

2

2

2

3 of 8

What is a GPU?

CMU 15-418/618 Spring 2022

3

3

3

3

4 of 8

What makes them fast?

CMU 15-418/618 Spring 2022

NVIDIA GTX 480

32 threads / warp

48 warps / core

15 cores/gpu

23k Elements / Cycle

Running at 1.2GHz

~6.4 TB/s

4

4

4

4

5 of 8

Why use them?

5

5

5

5

6 of 8

What makes them slow?

6

6

6

6

7 of 8

Tooling

Julia:

  • GPUArrays.jl
  • CUDA.jl
  • Metal.jl

Python:

  • Numba + CUDA
  • Torch / TensorFlow

7

7

7

7

8 of 8

Homework: Intelligently use a GPU in your Work

  • Benchmark performance on the CPU / GPU, what’s your speedup?
  • Have you minimized device to host communications?
  • Profile your code
    • How much time is spent computing?
    • How much time is spent moving data between the host and device?

8

8

8

8