6–9 Mar 2023
CERN
Europe/Zurich timezone

Multiplatform Programming with Python

8 Mar 2023, 09:00
1h
31/3-004 - IT Amphitheatre (CERN)

31/3-004 - IT Amphitheatre

CERN

105
Show room on map
Lecture Performance tuning and accelerated computing

Speaker

Peter Kicsiny (EPFL)

Description

In this course the students can learn how to write platform agnostic code using Python (and some C). Some knowledge (~1 year experience) of these two languages is recommended.

The lecture will focus on how Python can easily be combined with C for CPU and GPU programming, by exploiting the advantages of both languages. The goal is to introduce 3 Python libraries that are used at CERN (e.g. in modern multiparticle simulation frameworks): CFFI, CuPy and PyOpenCL. CFFI is a library for Python-C interfacing and CPU kernel execution. CuPy and PyOpenCL are libraries for kernel execution compatible with GPUs. Additionally, there will be a short review of heterogeneous programming and a comparison of the CUDA and OpenCL programming models.

In a subsequent tutorial session the students will be able to play around with these Python libraries.

Primary author

Peter Kicsiny (EPFL)

Presentation materials