Skoči na vsebino

EuroCC and SLING

Programming Graphics processing units12

Patricio Bulić, University of Ljubljana, Faculty of Computer and Information Sciences

Content

Graphics Processing Units (GPUs) are nowadays an essential tool for scholars and engineers when they are faced with high computing requirements. Nevertheless, obtaining high performance from these devices requires knowledge of how they work and the programming model they are based on.

In this workshop, we will learn the fundamentals needed to start the journey into the world of GPU programming. Using the CUDA Toolkit, we will accelerate the C applications by offloading the computationally intensive portions of the code to GPUs. Throughout the workshop, we will combine the theoretical explanations and many hands-on exercises to familiarize the attendees with the GPU programming concepts.

Schedule

On the first day we will start with the GPU hardware design and how it differs from the design of traditional computers in terms of processing and memory. We will consider advantages and hazards of the offload model and become familiar with the GPU programming model using CUDA Toolkit to run our first program.

On the second day we will work on many practical examples. We will start learning the important concepts by optimizing simple algorithms and in the end use the gained knowledge in optimization of an image processing algorithm.

Prerequisites

  • Knowledge of SSH client and SLURM middleware. See the contents of the workshop Fundamentals of Supercomputing (currently only in Slovene)
  • Knowledge of programming, desirable knowledge of the C programming language

Acquired knowledge

After the course, you will:

  • understand how a heterogeneous computer system with GPUs works,
  • write GPU-accelerated CUDA C applications,
  • expose and express data and instruction-level parallelism using CUDA,
  • utilize CUDA managed memory and optimize memory migration.

Program code

The program code used during the course is available at https://repo.sling.si/dsluga/programming-cuda.

You can download it to the cluster with the command

$ git clone https://repo.sling.si/dsluga/programming-cuda.git

  1. The material is published under license CC BY-NC-SA 4.0

  2. The workshop is prepared by SLING - Slovenian National Competence Centre for Supercomputing under the auspices of the EuroCC project. EuroCC and SLING