Mitigating warp divergence in GPU optical photon Monte Carlo: an order of magnitude speedup with Shader Execution Reordering
arXiv:2608.21396
Abstract
In high energy, nuclear, and medical physics, optical photon transport Monte Carlo is a frequent bottleneck in detector simulation. GPU ray tracing accelerates photon propagation, but one thread per photon megakernels suffer from SIMT execution divergence when photon lifetimes vary widely. Short-lived photons leave inactive lanes while a few long-lived photons delay warp completion. We evaluate NVIDIA Shader Execution Reordering (SER) in an OptiX based optical photon transport kernel and use it to regroup surviving photons during propagation. In a 14.7 kton liquid argon time projection chamber benchmark with ~61 million photons from a 2.5 GeV electromagnetic shower, SER capable execution reduces propagation kernel cycles by 16.55(23)x and end-to-end optical simulation time, including transfers and initialization, by 14.72(30)x with bit-identical hit output. We decouple the speed-up into a 3.2x contribution from the launch configuration changes introduced when SER is enabled and a further 5.1x from executing the reorder. Profiling identifies active lane recovery as the dominant mechanism, while branch efficiency and memory bandwidth change little. A volume coherent SER hint enables an analytic navigation fast path in bulk argon, adding a further 1.13x wall-time speedup. Utilizing SER resulted in a ~90% reduction in GPU energy per simulated event.