Making Gravity SWIFTer: GPU offloads for gravity in the SWIFT cosmology code
- 👤 Speaker: Sarah Johnston - Durham University
- 📅 Date & Time: Thursday 12 February 2026, 13:00 - 14:00
- 📍 Venue: Room C, West Hub
Abstract
To fully utilise modern heterogeneous HPC systems and improve power efficiency, large astronomy codes must become GPU compatible. SWIFT is a versatile open-source cosmology code which is used to model a variety of astrophysical scenarios. It utilises task-based parallelism, dividing the workload into independent tasks managed by a scheduler for efficient CPU utilisation, and is highly optimised for use on memory-intensive, CPU -only clusters. A significant portion of SWIFT ’s runtime is dedicated to gravity calculations. However, the repetitive and non-interdependent nature of these interactions makes them ideal candidates for GPU acceleration.
In this talk I will explain how we have built on the existing SWIFT code by replacing CPU -based gravity with new GPU kernels, while minimising changes to the rest of the code. The GPU -accelerated kernels achieve high accuracy, with <1% deviation from the CPU results. However, we are limited by a memory transfer bottleneck in moving data between the CPU and GPU . To mitigate this, we have employed a novel ‘task-bundling’ system which allows us to group tasks in the scheduler to give higher occupancy on the GPU . This provides more work, reducing the overhead from the CPU -GPU memory transfers. To further exploit the GPU , we’re exploring a redistribution of the gravity calculations meaning more interactions can be carried out using direct particle-particle summations, rather than multipole-based approximations, which gives us more accurate results and provides more work for the GPU . Future work will focus on optimising these new GPU implementations to provide an end-to-end speedup in SWIFT on heterogeneous systems.
Series This talk is part of the RSE Seminars series.
Included in Lists
- bld31
- Cambridge Centre for Data-Driven Discovery (C2D3)
- Cambridge talks
- Chris Davis' list
- Interested Talks
- ndk22's list
- ob366-ai4er
- Room C, West Hub
- rp587
- RSE Seminars
- se393's list
- Trust & Technology Initiative - interesting events
- yk449
Note: Ex-directory lists are not shown.
![[Talks.cam]](/static/images/talkslogosmall.gif)

Sarah Johnston - Durham University
Thursday 12 February 2026, 13:00-14:00