arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2503.02134cs.MScs.DC
收藏

在谱元素代码中启用混合精度

Enabling mixed-precision in spectral element codes

Yanxiang Chen, Pablo de Oliveira Castro, Paolo Bientinesi, Niclas Jansson, Roman Iakymchuk

AI总结:

提出基于计算机算术工具和roofline模型的方法,在Nekbone和neko CFD应用中实现混合精度,显著降低求解时间与能耗并保持精度。

摘要:

混合精度计算有望显著降低百亿亿次级计算的成本,但确定何时以及如何在程序中实现它可能具有挑战性。在本文中,我们提出了一种在计算机算术工具、roofline模型和计算机算术技术的帮助下启用混合精度的方法。作为案例研究,我们考虑了Nekbone(CFD求解器Nek5000的迷你应用)和现代neko CFD应用。借助Verificarlo工具和计算机算术技术,我们引入了一种策略来解决Nekbone中预处理共轭梯度法的停滞问题,并应用这些见解来实现neko的混合精度版本。我们通过在精度、求解时间和能耗维度上结合指标来评估这些代码的混合精度版本。值得注意的是,在MareNostrum 5上,Nekbone的混合精度将求解时间减少约1.12倍,能耗减少2.43倍,而在真实世界的neko应用中,时间和能耗的增益均高达1.3倍,且精度与双精度结果相匹配。

英文摘要:

Mixed-precision computing has the potential to significantly reduce the cost of exascale computations, but determining when and how to implement it in programs can be challenging. In this article, we propose a methodology for enabling mixed-precision with the help of computer arithmetic tools, roofline model, and computer arithmetic techniques. As case studies, we consider Nekbone, a mini-application for the Computational Fluid Dynamics (CFD) solver Nek5000, and a modern Neko CFD application. With the help of the Verificarlo tool and computer arithmetic techniques, we introduce a strategy to address stagnation issues in the preconditioned Conjugate Gradient method in Nekbone and apply these insights to implement a mixed-precision version of Neko. We evaluate the derived mixed-precision versions of these codes by combining metrics in three dimensions: accuracy, time-to-solution, and energy-to-solution. Notably, mixed-precision in Nekbone reduces time-to-solution by roughly 1.62x and energy-to-solution by 2.43x on MareNostrum 5, while in the real-world Neko application, the gain is up to 1.3x in both time and energy, with the accuracy that matches double-precision results.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑