[论文解读] In-Situ Assessment of Device-Side Compute Work for Dynamic Load Balancing in a GPU-Accelerated PIC Code
本论文通过引入基于GPU时钟计时器的实时、低开销设备端计算工作量测量方法,为WarpX粒子-网格代码提出了GPU优化的原位动态负载均衡。该方法在6144块GPU上实现了理论最大加速比的62–74%(在6块GPU上达到88%),显著优于静态负载均衡和基线不平衡运行,在激光离子加速模拟中相比无负载均衡实现了3.8倍的加速比。
Maintaining computational load balance is important to the performant behavior of codes which operate under a distributed computing model. This is especially true for GPU architectures, which can suffer from memory oversubscription if improperly load balanced. We present enhancements to traditional load balancing approaches and explicitly target GPU architectures, exploring the resulting performance. A key component of our enhancements is the introduction of several GPU-amenable strategies for assessing compute work. These strategies are implemented and benchmarked to find the most optimal data collection methodology for in-situ assessment of GPU compute work. For the fully kinetic particle-in-cell code WarpX, which supports MPI+CUDA parallelism, we investigate the performance of the improved dynamic load balancing via a strong scaling-based performance model and show that, for a laser-ion acceleration test problem run with up to 6144 GPUs on Summit, the enhanced dynamic load balancing achieves from 62%--74% (88% when running on 6 GPUs) of the theoretically predicted maximum speedup; for the 96-GPU case, we find that dynamic load balancing improves performance relative to baselines without load balancing (3.8x speedup) and with static load balancing (1.2x speedup). Our results provide important insights into dynamic load balancing and performance assessment, and are particularly relevant in the context of distributed memory applications ran on GPUs.
研究动机与目标
- 解决由于高度移动粒子导致的负载不平衡,从而在GPU加速的分布式内存粒子-网格代码中引发的性能下降问题。
- 开发针对GPU的、原位的运行时测量技术,以极低的性能开销测量计算工作量。
- 改进WarpX中的动态负载均衡,以提升大规模GPU集群上的强可扩展性和弱可扩展性性能。
- 评估不同成本评估策略(启发式方法、GPU时钟、CUPTI)对负载均衡效率和性能的影响。
- 证明在真实等离子体物理模拟中,动态负载均衡对于高效利用大规模下有限的GPU内存至关重要。
提出的方法
- 实现原位、内核级的GPU时钟计时,以测量子域计算工作的实际内核执行时间,最大限度降低开销。
- 提出一种与厂商无关的运行时测量策略,使用GPU硬件时钟而非CUPTI等性能分析API。
- 将测量得到的计算成本集成到基于AMReX块结构化网格框架的动态负载均衡框架中。
- 应用如0-1背包算法和空间填充曲线(SFC)等负载均衡策略,根据测量到的计算成本在GPU之间重新分配工作。
- 利用强可扩展性性能建模预测理论最大加速比,并与实际观测到的性能提升进行比较。
- 在不同配置下进行基准测试:粒子数、每块GPU的盒子大小、负载均衡频率以及成本函数选择。
实验结果
研究问题
- RQ1与基于CUPTI的计时相比,基于GPU时钟的原位计算工作量测量在准确性和性能开销方面表现如何?
- RQ2在WarpX中,不同的成本分配策略(启发式方法与实际内核计时)对动态负载均衡性能有何影响?
- RQ3动态负载均衡在GPU加速的PIC模拟中,对强可扩展性和弱可扩展性性能的提升程度如何?
- RQ4负载均衡算法的选择(0-1背包算法与SFC)对性能和负载均衡效率有何影响?
- RQ5在大规模GPU模拟中,需要将负载不平衡降低到何种程度,才能实现接近理论最大加速比?
主要发现
- 实际应用中,基于GPU时钟的原位计算工作量测量带来的负载均衡开销可忽略不计,而基于CUPTI的方法则显著增加了运行时成本。
- 在Summit上针对激光离子加速测试案例使用6144块GPU时,动态负载均衡实现了理论最大加速比的62–74%,在6块GPU上效率达到88%。
- 与无负载均衡的基线相比,动态负载均衡在96块GPU情况下实现了3.8倍的加速比,相比静态负载均衡也实现了1.2倍的加速比。
- 基于强可扩展性的性能模型证实,负载不平衡是主要瓶颈,动态负载均衡对于在大规模下实现高效率至关重要。
- 在大规模模拟中,动态负载均衡对于高效利用分布式、本地受限的GPU内存而言,已成为事实上的必要条件。
- 结果表明,若将通信成本纳入负载均衡过程,有望进一步缩小实际性能与理论性能极限之间的差距。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。