Dates
| weekly | Wednesday | 12:15 - 13:45 | 06.04.2026 - 10.07.2026 | C 12.001 Seminarraum |
Curriculum context
GPU programme with a report (50%)
Resit date: No resit date will be offered to this assessment, because it is didactically inseparably connected with one of the associated courses. A resit will only be possible, if the module is available again.
Organizational information
Registration
Registration ends 07.4.2026 at 23:59 h
Persons
Content
This course is designed to teach students how to leverage the power of Graphics Processing Units (GPUs) through parallel programming. Traditionally, programs utilize the CPU as the primary unit for execution. In this course, students will learn how to run programs on a GPU and observe the significant difference in processing speed. Initially, GPU cards were used exclusively for video rendering and gaming. However, with the advent of GPU programming, we can now make our programs run faster!
C++ programming language will be used for creating GPU programs in this course. The first two modules will provide students with a strong foundation in C++ programming. Then, students will apply their C++ knowledge to work with CUDA and execute programs on a GPU.
At the end of each module, there will be a project designed to reinforce the concepts learned by students. To ensure the course's generality, these projects will focus on image-processing tasks, such as image coloring and blurring. After all, who doesn’t enjoy working with images!
Module 1: C++ Fundamentals
Topics:
* Basic syntax: data types, control flow, functions
* Containers: `std::vector`, `std::map`
* File I/O
* Introduction to OpenCV for image load/display
Project #1:
Build a program for image converter: load a color image,
convert to grayscale, save the result.
-------------------------------------------------------------------------------------------
Module 2: Memory Management
Topics:
* Stack vs. heap memory model
* Dynamic allocation: `new/delete` and `malloc/free`
* Common pitfalls: Memory leaks
Project #2:
Extend Project #1 into a mini “Image Editor” that applies
two operations—grayscale and Gaussian blur—with
user-specified parameters.
-------------------------------------------------------------------------------------------
Module 3: GPU Programming with CUDA
Topics:
* CUDA programming model: kernels, threads, blocks, grids
* Host vs. device memory; data transfers
* Simple reduction operations on GPU
Project #3:
Port your blurring operation to CUDA. Load the image on
the host, copy it to device memory, launch a blur kernel,
copy back, and save. Benchmark CPU vs. GPU runtimes.
-------------------------------------------------------------------------------------------
Module 4: GPU Hardware & Optimization
Topics:
* GPU architecture deep dive: SMs, warps
* Memory hierarchy: shared and global memory
* Coalesced Memory accesses
Project #4:
Students will revisit the previous projects, applying the
knowledge of GPU data communication to further
accelerate program speed.
You will learn a programming language which is an essential skill you have to have nowadays. Moreover, once you learn C++, learning other programming languages will become much easier. Additionally, you will delve into the advanced topic of GPU programming, a key factor behind the rapid advancements in AI applications we see today. Without GPU programming, many of these innovations would not be possible.
Evaluation
Further information on teaching evaluation: https://www.leuphana.de/en/teaching/quality-management/feedback-instruments.html