Using Numba for GPU acceleration of Neutron Beamline Digital Twins
summary
A pure‑Python reimplementation called mcvind.ecc uses Numba to generate CUDA kernels at runtime and runs MCViNE Monte Carlo neutron ray tracing on GPUs, with CI to validate GPU output matches CPU simulations. Simple source+guide+monitor kernels hit ~1700×, homogeneous single‑scatter ~133×, a uranium‑nitride single‑scatter case ~33× and realistic multiple scattering about 10x for multiple scattering, enabling days‑to‑hours turnaround. Uses XML parsers for geometry and scattering, supports float64 signatures, and is being integrated with multi‑GPU and cluster plans.
AI-written summary · about
chapters (13)
- 0:00Introduction to talk
- 1:27Motivation for GPU acceleration
- 3:51Current challenges in McVine
- 5:39Introducing mcvind.ecc package
- 7:03Instrument simulation workflow
- 9:31GPU kernel generation at runtime
- 13:06Sample geometry and ray tracing
- 14:31Scattering physics implementation
- 15:37Validation against CPU results
- 17:23Performance benchmarks and results
- 20:16Advantages of Numba for this project
- 21:18Summary and future plans
- 22:43Q&A session
