CS 380 - GPU and GPGPU Programming

Markus Hadwiger, Peter Rautek, Amani Ageeli

CS 380 GPU and GPGPU Programming

Overview

This course covers the architecture and programming of GPUs (Graphics Processing Units). It covers both the traditional use for rendering graphics, as well as the use of GPUs for general purpose computations (GPGPU), or GPU Computing.

Synopsis

CS 380. GPU and GPGPU Programming (3-0-3) Recommended prerequisites: CS 248, CS 292, CS 282. Architecture and programming of GPUs (Graphics Processing Units). Covers both the traditional use of GPUs for graphics and visualization, as well as their use for general purpose computations (GPGPU). GPU many-core hardware architectures, shading and compute programming languages and APIs, programming vertex, geometry, and fragment shaders, programming with CUDA, Brook, OpenCL, stream computing, approaches to massively parallel computations, memory subsystems and caches, rasterization, texture mapping, linear algebra computations, alternative and future architectures.

Hours and Location

Sunday, 14:30 - 16:00, Room 3128, Bldg. 9.
Wednesday, 14:30 - 16:00, Room 3128, Bldg. 9.

Instructor

Prof. Markus Hadwiger

Contact

Hadwiger

Markus Hadwiger

Rautek

Peter Rautek

Ageeli

Amani Ageeli

Programming assignments

Bitbucket git repository for the programming assignments (Peter needs to give you access via your KAUST email address).

Slides (fall 2022)

Aug 28, 2022 Lecture 1: Introduction, Pt. 1.
Aug 31, 2022 Lecture 2: Introduction, Pt. 2.
Sep 4, 2022 Lecture 3: Introduction, Pt. 3.
Sep 7, 2022 Lecture 4: GPU Architecture, Pt. 1.
Sep 11, 2022 Lecture 5: GPU Architecture, Pt. 2.
Sep 14, 2022 Lecture 6: GPU Architecture, Pt. 3.
Sep 18, 2022 Lecture 7: GPU Architecture, Pt. 4.
Sep 25, 2022 Lecture 8: GPU Architecture, Pt. 5.
Sep 28, 2022 Lecture 9: GPU Architecture, Pt. 6.
Oct 2, 2022 Lecture 10: GPU Architecture, Pt. 7.
Oct 4, 2022 Lecture 11: GPU Architecture, Pt. 8.
Oct 5, 2022 Lecture 12: GPU Compute APIs, Pt. 1.
Oct 9, 2022 Lecture 13: GPU Compute APIs, Pt. 2.
Oct 12, 2022 Lecture 14: GPU Compute APIs, Pt. 3.
Oct 23, 2022 Lecture 15: GPU Compute APIs, Pt. 4; GPU Texturing, Pt. 1.
Oct 30, 2022 Lecture 16: GPU Texturing, Pt. 2.
Nov 1, 2022 Lecture 17: GPU Texturing, Pt. 3.
Nov 2, 2022 Lecture 18: GPU Texturing, Pt. 4.
Nov 6, 2022 Lecture 19: GPU Texturing, Pt. 5.
Nov 9, 2022 Lecture 20: GPU Virtual Texturing, Pt. 2.
Nov 13, 2022 Lecture 21: GPU Virtual Geometry (and GPU Virtual Texturing).
Nov 16, 2022 Lecture 22: Stream Computing and GPGPU; CUDA Memory Pt.1.
Nov 20, 2022 Lecture 23: CUDA Memory Pt.2: Shared Memory.
Nov 22, 2022 Lecture 24: CUDA Memory Pt.3: Shared Memory.
Nov 27, 2022 Lecture 25: CUDA Memory Pt.4.
Nov 29, 2022 Lecture 26: GPU Reduction; GPU Prefix Sum (Pt.1).
Nov 30, 2022 Lecture 27: GPU Prefix Sum (Pt.2); Tensor Core Programming.

Resources

OpenGL 4 shading language cookbook Programming massively parallel processors
For the Graphics part For the GPGPU part

Old Slides

Fall 2021
Aug 30, 2021 Lecture 1: Introduction, Pt. 1.
Sep 1, 2021 Lecture 2: Introduction, Pt. 2.
Sep 6, 2021 Lecture 3: Introduction, Pt. 3.
Sep 8, 2021 Lecture 4: GPU Architecture, Pt. 1.
Sep 13, 2021 Lecture 5: GPU Architecture, Pt. 2.
Sep 15, 2021 Lecture 6: GPU Architecture, Pt. 3.
Sep 20, 2021 Lecture 7: GPU Architecture, Pt. 4.
Sep 27, 2021 Lecture 8: GPU Architecture, Pt. 5.
Sep 29, 2021 Lecture 9: GPU Architecture, Pt. 6.
Oct 4, 2021 Lecture 10: GPU Architecture, Pt. 7.
Oct 6, 2021 Lecture 11: GPU Compute APIs, Pt. 1.
Oct 11, 2021 Lecture 12: GPU Compute APIs, Pt. 2.
Oct 13, 2021 Lecture 13: GPU Compute APIs, Pt. 3.
Oct 20, 2021 Lecture 14: GPU Texturing, Pt. 1.
Oct 25, 2021 Lecture 15: GPU Texturing, Pt. 2.
Nov 1, 2021 Lecture 16: GPU Texturing, Pt. 3.
Nov 3, 2021 Lecture 17: GPU Texturing, Pt. 4, Virtual Texturing, Virtual Geometry.
Nov 8, 2021 Lecture 18: Stream Computing and GPGPU.
Nov 10, 2021 Lecture 19: CUDA Memory, Pt. 1.
Nov 15, 2021 Lecture 20: CUDA Memory, Pt. 2.
Nov 22, 2021 Lecture 21: CUDA Memory, Pt. 3.
Nov 24, 2021 Lecture 22: GPU Parallel Reduction.
Nov 29, 2021 Lecture 23: GPU Parallel Prefix Sum / Scan.
Dec 1, 2021 Lecture 24: Scan Bank Conflicts; CUDA Memory, Pt. 4.
Dec 6, 2021 Lecture 25: CUDA Memory, Pt. 5; Shuffle Instructions; Cooperative Groups.
Dec 8, 2021 Lecture 26: Tensor Core Programming.
Fall 2020
Aug 31, 2020 Lecture 1: Introduction, Pt. 1.
Sep 2, 2020 Lecture 2: Introduction, Pt. 2.
Sep 7, 2020 Lecture 3: GPU Architecture 1.
Sep 9, 2020 Lecture 4: GPU Architecture 2.
Sep 14, 2020 Lecture 5: GPU Architecture 3.
Sep 16, 2020 Lecture 6: GPU Architecture 4.
Sep 21, 2020 Lecture 7: GPU Architecture 5.
Sep 28, 2020 Lecture 8: Quiz #1
Sep 30, 2020 Lecture 9: GPU Architecture 6.
Oct 5, 2020 Lecture 10: GPU Architecture 7.
Oct 7, 2020 Lecture 11: GPU Architecture 8.
Oct 12, 2020 Lecture 12: GPU Compute APIs 1.
Oct 14, 2020 Lecture 13: GPU Compute APIs 2.
Oct 21, 2020 Lecture 14: GPU Compute APIs 3, GPU Texturing 1.
Oct 26, 2020 Lecture 15: GPU Texturing 2.
Oct 28, 2020 Lecture 16: GPU Texturing 3.
Nov 2, 2020 Lecture 17: GPU Texturing 4.
Nov 4, 2020 Lecture 18: GPU Texturing 5.
Nov 9, 2020 Lecture 19: GPU Texturing 6; Stream Computing and GPGPU.
Nov 11, 2020 Lecture 20: CUDA Memory: Shared Memory.
Nov 16, 2020 Lecture 21: CUDA Memory, Pt.2; GPU Reduction.
Nov 18, 2020 Lecture 22: CUDA Memory, Pt. 3.
Nov 23, 2020 Lecture 23: CUDA Memory, Pt. 4.
Nov 25, 2020 Lecture 24: GPU Parallel Prefix Sum / Scan.
Dec 2, 2020 Lecture 25: Parallel Scan Bank Conflicts; Shuffle Instructions.
Dec 7, 2020 Lecture 26: Warp Synchronous Programming; Cooperative Thread Groups; Programming Tensor Cores.
Dec 9, 2020 Lecture 27: CUDA Unified Memory; More on Instruction Level Parallelism.