GPU programming

Netherlands eScience Center

Online

February 08 - 09, 2022

9:00 - 13:00 CET

Instructors: Alessio Sclocco, Hanno Spreeuw, Johan Hidding

Helpers: Victor Azizi

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

General Information

The Digital Skills programme at the Netherlands eScience Center focuses on the foundational digital skills needed to put reproducible research into practice. The workshops we run cover the essentials of version control, online collaboration, reproducible code and good programming practices.

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. The workshop is based on the teaching style of the Carpentries, and learners will follow along while the instructors write the code on screen.

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: This training will take place online. The instructors will provide you with the information you will need to connect to this meeting.

When: February 08 - 09, 2022.

Requirements: Participants must have access to a computer 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 dedicated to providing a positive and accessible learning environment for all. Please notify the instructors in advance of the workshop if you require any accommodations or if there is anything we can do to make this workshop more accessible to you.

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


Code of Conduct

Participants are expected to follow those guidelines:

Syllabus

Schedule

Day 1

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

Day 2

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

All times in the schedule are in the CET 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.

Install the videoconferencing client

If you haven't used Zoom before, go to the official website to download and install the Zoom client for your computer.

Set up your workspace

Like other Carpentries workshops, you will be learning by "coding along" with the Instructors. To do this, you will need to have both the window for the tool you will be learning about (a terminal, RStudio, your web browser, etc..) and the window for the Zoom video conference client open. In order to see both at once, we recommend using one of the following set up options:

This blog post includes detailed information on how to set up your screen to follow along during the workshop.

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.