arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2304.06441math.NAcs.ARcs.NAcs.PF
收藏

基于CHEF-FP的快速自动浮点误差分析

Fast And Automatic Floating Point Error Analysis With CHEF-FP

Garima Singh, Baidyanath Kundu, Harshitha Menon, Alexander Penev, David J. Lange, Vassil Vassilev

AI总结:

本文提出CHEF-FP,一种基于自动微分的源代码转换工具,通过向伴随代码注入误差估计代码并利用编译器优化,实现HPC应用中混合精度近似误差的快速自动分析,相比现有工具显著加速。

摘要:

随着摩尔定律逼近极限,研究人员正在探索不同的范式以实现前所未有的性能。近似计算(AC)依靠应用程序能够容忍结果中的一定误差来在精度与性能之间进行权衡,已展现出显著的前景。尽管AC在机器学习等领域取得了成功,但由于对精度的严格要求,它在高性能计算(HPC)中的接受度仍然有限。我们需要工具和技术来识别适合近似的代码区域及其对应用输出质量的影响,以指导开发人员采用选择性近似。为此,我们提出了CHEF-FP,这是一种灵活、可扩展且易于使用的基于自动微分(AD)的源代码转换工具,用于分析HPC应用程序中的近似误差。CHEF-FP使用Clad作为后端,Clad是一种高效的AD工具,作为Clang编译器的插件构建,并基于LLVM编译器基础设施,利用其AD能力来评估C++代码中的近似误差。CHEF-FP在源代码层面工作,将误差估计代码注入到生成的伴随代码中。这使得误差估计代码能够经过编译器优化,从而缩短分析时间并减少内存使用。我们还为基于源代码转换的AD工具提供了理论和架构上的增强,以执行浮点误差分析。本文主要关注分析由混合精度AC技术引入的误差。我们还通过在使用近似函数的代码上评估我们的工具,展示了该工具在估计其他类型误差方面的适用性。此外,我们证明了CHEF-FP由于能够直接在导数源代码中生成并插入近似误差估计代码,在分析时间上相比现有最先进工具取得了加速。

英文摘要:

As we reach the limit of Moore's Law, researchers are exploring different paradigms to achieve unprecedented performance. Approximate Computing (AC), which relies on the ability of applications to tolerate some error in the results to trade-off accuracy for performance, has shown significant promise. Despite the success of AC in domains such as Machine Learning, its acceptance in High-Performance Computing (HPC) is limited due to stringent requirements for accuracy. We need tools and techniques to identify regions of code that are amenable to approximations and their impact on the application output quality to guide developers to employ selective approximation. To this end, we propose CHEF-FP, a flexible, scalable, and easy-to-use source-code transformation tool based on Automatic Differentiation (AD) for analyzing approximation errors in HPC applications. CHEF-FP uses Clad, an efficient AD tool built as a plugin to the Clang compiler and based on the LLVM compiler infrastructure, as a backend and utilizes its AD abilities to evaluate approximation errors in C++ code. CHEF-FP works at the source by injecting error estimation code into the generated adjoints. This enables the error-estimation code to undergo compiler optimizations resulting in improved analysis time and reduced memory usage. We also provide theoretical and architectural augmentations to source code transformation-based AD tools to perform FP error analysis. This paper primarily focuses on analyzing errors introduced by mixed-precision AC techniques. We also show the applicability of our tool in estimating other kinds of errors by evaluating our tool on codes that use approximate functions. Moreover, we demonstrate the speedups CHEF-FP achieved during analysis time compared to the existing state-of-the-art tool due to its ability to generate and insert approximation error estimate code directly into the derivative source.

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

↑