带空间电荷的粒子加速器模拟中反向模式微分的记忆缩放
The Memory Scaling of Reverse-Mode Differentiation in Particle Accelerator Simulations with Space Charge
AI总结:
研究了基于PyTorch的束流追踪代码Cheetah中空间电荷计算对反向模式自动微分记忆使用的影响,发现记忆使用与宏粒子数、网格数及空间电荷踢数线性增长,可用于评估硬件内存约束下的模拟可行性。
摘要:
最近,粒子加速器可微分模拟代码的发展使得基于梯度的流程成为可能,有望实现对加速器设施的更精细控制和更真实建模。然而,当使用反向模式自动微分时,模拟过程中内存使用持续增加,可能超过可用硬件内存——尤其是在包含昂贵的空间电荷计算时。为了研究可微分模拟的内存需求,我们在Cheetah(一个基于PyTorch、支持反向模式微分的束流追踪代码)中实现了空间电荷。我们发现,反向模式微分的内存使用随宏粒子和网格数量线性增长,并且与模拟中涉及的空间电荷踢数成正比。这种通用缩放可用于评估在给定硬件内存约束下,特定可微分模拟是否可行。
英文摘要:
The recent development of differentiable simulation codes for particle accelerators has enabled gradient-based workflows that promise finer control and more realistic modeling of accelerator facilities. However, when using reverse-mode automatic differentiation, the memory usage continuously increases during the simulation, and can potentially exceed the available hardware memory -- especially when costly space charge computation is included. To study the memory requirements for differentiable simulations, we have implemented space charge in Cheetah, a PyTorch-based beam tracking code that supports reverse-mode differentiation. We find that the memory usage for reverse-mode differentiation grows linearly with the number of macroparticles and cells, and that it is proportional to the number of space charge kicks involved in the simulation. This general scaling can be used to evaluate whether a given differentiable simulation is feasible given hardware memory constraints.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。