arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2409.15073cs.AR
收藏

探索与利用科学计算中运行时可重构的浮点精度:以求解PDEs为例

Exploring and Exploiting Runtime Reconfigurable Floating Point Precision in Scientific Computing: a Case Study for Solving PDEs

Cong "Callie" Hao

AI总结:

针对科学计算依赖高精度浮点运算导致的高成本问题,提出运行时可重构浮点乘法器R2F2,通过动态调整乘法精度,在16位或更低实现与32位相同的模拟结果,显著降低误差且无延迟开销。

摘要:

科学计算应用(如计算流体力学和气候建模)通常依赖64位双精度浮点运算,这在计算、内存和能耗方面成本极高。尽管机器学习社区已成功利用低精度计算,但由于对数值稳定性的担忧,科学计算仍持谨慎态度。为应对这一长期挑战,我们提出一种在运行时动态调整浮点数据精度的新方法,利用较低位宽维持计算保真度。我们首先对科学模拟期间的数据范围分布进行了深入分析,以识别动态精度调整的机遇与挑战。随后,我们提出一种运行时可重构的柔性浮点乘法器(R2F2),它基于当前操作数自动且动态地调整乘法精度,确保以较低位宽获得准确结果。评估表明,16位R2F2相比标准半精度显著降低了70.2%的误差率,资源开销在减少5%至增加7%之间,且无延迟开销。在两个代表性科学计算应用中,使用16位或更少位宽的R2F2能取得与32位精度相同的模拟结果,而标准半精度则会失败。本研究开创了运行时可重构算术,展现出提升科学计算效率的巨大潜力。代码可在 https://github.com/sharc-lab/R2F2 获取。

英文摘要:

Scientific computing applications, such as computational fluid dynamics and climate modeling, typically rely on 64-bit double-precision floating-point operations, which are extremely costly in terms of computation, memory, and energy. While the machine learning community has successfully utilized low-precision computations, scientific computing remains cautious due to concerns about numerical stability. To tackle this long-standing challenge, we propose a novel approach to dynamically adjust the floating-point data precision at runtime, maintaining computational fidelity using lower bit widths. We first conduct a thorough analysis of data range distributions during scientific simulations to identify opportunities and challenges for dynamic precision adjustment. We then propose a runtime reconfigurable, flexible floating-point multiplier (R2F2), which automatically and dynamically adjusts multiplication precision based on the current operands, ensuring accurate results with lower bit widths. Our evaluation shows that 16-bit R2F2 significantly reduces error rates by 70.2\% compared to standard half-precision, with resource overhead ranging from a 5% reduction to a 7% increase and no latency overhead. In two representative scientific computing applications, R2F2, using 16 or fewer bits, can achieve the same simulation results as 32-bit precision, while standard half precision will fail. This study pioneers runtime reconfigurable arithmetic, demonstrating great potential to enhance scientific computing efficiency. Code available at https://github.com/sharc-lab/R2F2.

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

↑