This repository collects the code examples used in the 2025 edition of the GPU programming tutorial of the ATLAS Experiment.
The exercises are primarily meant to be run on the NERSC Perlmutter Supercomputer, using its Jupyter notebook interface.
Another option is to make use of CERN's SWAN infrastructure. As long as you have a CERN account, you could open the repository on SWAN using this link.
It is also an excellent option to use the code on a private machine, using VSCode. Without much explanation, you need:
- A RHEL 9 compatible OS (WSL can work very nicely with AlmaLinux9);
- Athena-25.0.29 set up (using AtlasSetup);
- CUDA 12.4+ set up for the runtime environment such that CMake would also correctly find it.
The exercises are documented in individual Python notebooks. Please open these to follow the individual exercises.
- Exercise 1: Set up a simple CUDA algorithm, debug why it's not working, and fix its memory leaks.
- Exercise 2: Work with a "more realistic" Athena algorithm that takes data from, and returns data to an xAOD container.
- Exercise 3: Learn about using "asynchronous" algorithms with Gaudi/Athena for executing CUDA code efficiently in multi-threaded jobs.
- Exercise 4: Learn some basics about using SYCL to run simple kernels on a GPU.