GPU programming

Netherlands eScience Center

April 18 - 19, 2023

9:30 - 17:00 CEST

Instructors: Alessio Sclocco, Hanno Spreeuw

Helpers: Giulia Crocioni, Laura Ootes

Some adblockers block the registration window. If you do not see the registration box below, please check your adblocker settings.

General Information

The eScience Center offers a range of free workshops and training courses, open to all researchers affiliated with Dutch research organizations. We organize workshops covering digital skills needed to put reproducible research into practice. These include online collaboration, reproducible code and good programming practices. We also offer more advanced workshops such as GPU Programming, Parallel Programming and Deep Learning.

From deep learning to high-performance computing, Graphics Processing Units (GPUs) are nowadays an important tool for scholars and research software engineers alike. Parallel in nature, they offer incredible computing capabilities that just a few years ago were only available in supercomputers. While using GPUs to accelerate computation becomes easier year after year, obtaining high performance from these devices still requires some knowledge of how they work, and the programming model on which they are based.

In this workshop we will provide the learners with the fundamental knowledge that they need to start their journey into the world of programming GPUs. After a brief introduction to the specificities of GPUs, and how they differ from traditional processors, participants will experience various ways of using them with Python. They will get familiar with libraries such as CuPy and Numba to accelerate Python code, and have first-hand experience in writing small CUDA programs that can run directly on the GPU.

Who: 

The participant should:

  • be familiar with Python
  • be comfortable working in Jupyter
  • have the ability to read and understand C code

Preferred:

  • knowledge of NumPy
  • familiarity with high-performance computing concepts

Where: Science Park 402, 1098 XH Amsterdam. Get directions with OpenStreetMap or Google Maps.

When: April 18 - 19, 2023, 9:30 - 17:00 CEST.

Requirements: Participants must bring a laptop with a Mac, Linux, or Windows operating system (not a tablet, Chromebook, etc.) that they have administrative privileges on. They should have a few specific software packages installed (listed below).

Accessibility: We are committed to making this workshop accessible to everybody. The workshop organizers have checked that:

Materials will be provided in advance of the workshop and large-print handouts are available if needed by notifying the organizers in advance. If we can help making learning easier for you (e.g. sign-language interpreters, lactation facilities) please get in touch (using contact details below) and we will attempt to provide them.

Contact: Please email or training@esciencecenter.nl for more information.


Code of Conduct

Participants are expected to follow these guidelines:

Syllabus

Schedule

Day 1

09:30 Welcome and icebreaker
09:45 Introduction
10:00 Convolve an image with a kernel on a GPU using CuPy
10:30 Coffee break
10:45 Running CPU/GPU agnostic code using CuPy
11:15 Coffee break
11:30 Image processing example with CuPy
12:00 Lunch break
13:00 Image processing example with CuPy
14:00 Coffee break
14:15 Run your Python code on a GPU using Numba
15:00 Coffee break
15:15 Run your Python code on a GPU using Numba
16:15 Wrap-up
16:30 END

Day 2

09:30 Welcome and icebreaker
10:00 Introduction to CUDA
10:30 Coffee break
10:45 CUDA memories and their use
11:15 Coffee break
11:30 CUDA memories and their use
12:00 Lunch break
13:00 Data sharing and synchronization
14:00 Coffee break
14:15 Data sharing and synchronization
15:00 Coffee break
15:15 Concurrent access to the GPU
16:15 Wrap-up
16:30 END

All times in the schedule are in the CEST timezone.


Setup

To participate in this workshop, you will need access to software as described below. In addition, you will need an up-to-date web browser.

We maintain a list of common issues that occur during installation as a reference for instructors that may be useful on the Configuration Problems and Solutions wiki page.

Software setup

We will teach GPU programming using the Jupyter Notebook, a programming environment that runs in a web browser. For this to work you will need a reasonably up-to-date browser. The current versions of the Chrome, Safari and Firefox browsers are all supported (some older browsers, including Internet Explorer version 9 and below, are not).

In particular, for this workshop we are using the infrastructure of JupyterHub for Education kindly provided by SURF in the framework of the EuroCC project. Google Colab may be used as an alternative.