GPU Programming basics - PhD course
Registro lezioni 2017
24 Gennaio 2017 - 3 ore:
Introduction to GPU h/w and CUDA programming
- GPU architecture
- comparison w.r.t CPU architecture
- SIMT
- What is CUDA
- Hello World in CUDA
- CUDA Memory organization: introduction
- Threads organization and setup
- Exercises:
- summing vectors
- matrix multiplication
- Grids, blocks and threads
- thread scheduling
- Threads and divergence
Slides:
Examplesi:
25 Gennaio 2017 - 3 ore:
Good practices in blocks and threads organization
- Good practices in blocks and threads organization
- 2D CUDA kernels
- 3D CUDA kernels
- CUDA memory hierarchy
- shared, device and constant memory
Efficient CUDA programming
- tiling: introduction
- tiling: how to
- synchronization barriers
- phase-based processing
- border checking
Lucidi:
Esercizi:
- Modificare il codice di esempio di moltiplicazione tra matrici implementando il tiling
Possibile soluzione:
26 Gennaio 2017 - 3 ore:
Performance considerations
- DRAM burst
- memory coalescing
GPU programming techniques
- atomic instructions
- privatization
- example: histogram computation
- Parallel patterns: convolution
- 1D convolution
- how to use constant memory
- tiling
- 2D convolution
- 2D convolution tiling
- Tiling performance evaluation
Lucidi:
Esercizi:
- -
Possibile soluzione:
27 Gennaio 2017 - 4 ore: lab.
Esercitazione di laboratorio: convoluzione 2D di immagini
- -
Lucidi:
Esercizi:
Possibile soluzione: