Hide menu

TDDD56 Multicore and GPU programming

Information page for the CPU and GPU lab work and lessons

Lab Series

Please register for the labs via webreg by friday 9/11/2025. Webreg will be opened at course start.

Presence in lab sessions is mandatory. (Special rules apply to Lab 0, see below.)

Lab deadlines

CPU-labs (Labs 1, 2, 3): last CPU lab session of your group, 26/28 nov 2025 (soft deadline), 17 (A) / 18 (B) dec 2025 (hard deadline)
GPU-labs (Labs 4, 5, 6): last GPU lab session of your group (17 (A) / 18 (B) dec 2025)

Slides and general info

Slides of lesson 1. (last updated 2025-11-10)

Slides of lesson 2. (last updated 2024-11-29)

Getting started with tools used in laboratories

Lab 0: Introduction to C and Threads

Lab 0 is mandatory only for students who have not taken a course in concurrent programming and operating systems (or need to brush up C/thread programming skills).
Work in pairs. It needs not be the same lab partner for Lab 0 as for the "real" lab series (lab 1-6) below (as in the webreg registration).

  • BEFORE the lab session (i.e., before wednesday in the first week), work through this introductory slide set. It focuses on those C constructs that are often perceived as difficult for programmers trained in Python or Java, such as pointers, type casts, storage classes, and memory management.
    Lab 0 also gives an introduction to multithreaded programming with Pthreads.
    There is no examination/demonstration for Lab 0.

  • Lab 0 instructions (PDF). (No code skeleton)
    [Helper function for computing time spans]

  • After the lab session: Continue on your own, focusing on Tasks 1 and 2.
    NB no supervision of Lab 0 is given after the scheduled Lab 0 session.

Lab work

[Helper function for computing time spans]

Lab1: The Mandelbrot set and load balancing

Parallelize a generator of visual representation of the Mandelbrot set, fractals, observe load-balancing issues and implement a solution to them.

[source files] (Last updated 2018-11-12)

[instructions] (Last updated 2025-11-10)

 

Lab 2: Parallel Sorting

[source files] (Last updated 2025-11-13)

[instructions] (Last updated 2025-11-13)

Lab3: High-level parallel programming

Try out high-level parallel programming with the data-parallel SkePU skeleton programming framework. Use the skeletons to implement image filters, including a median blur filter.

[source files] (Last updated 2025-11-19)

[instructions] (Last updated 2025-11-19)

[SkePU user guide] (2025)

[slides] (2025)

Lab 4: CUDA 1

Lab material (from ISY)

Lab 5: CUDA 2

Lab material (from ISY)

Lab 6: OpenCL

Lab material (from ISY)

Page responsible: Christoph W Kessler
Last updated: 2025-11-25