Coleman Kendrick - Using Numba for GPU acceleration of Neutron Beamline Digital Twins | SciPy 2023

"Learn how to accelerate your neutron beamline digital twins on NVIDIA CUDA GPUs using Numba, a Python library, and achieve speedups of up to 1,300 times compared to CPU-only simulations."

Key takeaways
  • Numba can provide significant speedups for scientific simulations on NVIDIA CUDA GPUs
  • It’s possible to implement a neural beamline simulation on the GPU using Numba
  • The speaker’s team achieved a speedup of 1,300 times using Numba compared to CPU-only simulations
  • Numba is easy to use for GPU acceleration with minimal code changes required
  • One potential challenge with using Numba is supporting conditional statements, which can be difficult to optimize for on the GPU
  • The speaker’s team is working on profiling and analyzing performance to optimize their Numba-based code further
  • The team is also planning to support other STS instruments with Numba acceleration
  • Numba has support for multiple platforms, including AMDs HIP architecture, but the speaker’s team did not end up using it due to lack of demand
  • Numba is constantly being updated and has a growing community
  • The speaker’s team is looking into ways to compare Numba’s performance to other packages like QPy and SciPy.