Mar 6 – 9, 2023
Europe/Zurich timezone

Multiplatform Programming with Python

Mar 8, 2023, 9:00 AM
31/3-004 - IT Amphitheatre (CERN)

31/3-004 - IT Amphitheatre


Show room on map
Lecture Performance tuning and accelerated computing


Peter Kicsiny (EPFL)


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