Accelerating Accuracy Improvement for Floating Point Programs via Memory Based Pruning

Anxiang Xiao, Enyi Tang, Xin Chen, Linzhang Wang
{"title":"Accelerating Accuracy Improvement for Floating Point Programs via Memory Based Pruning","authors":"Anxiang Xiao, Enyi Tang, Xin Chen, Linzhang Wang","doi":"10.1145/3457913.3457918","DOIUrl":null,"url":null,"abstract":"Floating point programs are widely used in science and engineering. These programs approximate real arithmetic with floating point arithmetic, which introduces rounding errors and leads to inaccurate results. In life-critical software systems, inaccuracy can lead to catastrophes. To avoid these tragedies, program rewriting techniques have been proposed to automatically improve accuracy for floating point programs. Unfortunately, efficiency can be the bottleneck of such techniques due to the lack of effective pruning strategy. We introduce a heuristic pruning strategy called Memory Based Pruning to accelerate these rewrite-based approaches. The heuristic comes from an observation that floating point programs with similar computation steps usually suffer from similar inaccuracy problems, therefore they can be improved by the same or similar rewriting rules. With Memory Based Pruning, rewriting rules used in accuracy improvement are memorized in a knowledge memory. While improving accuracy for similar programs, these rules can help to guide the search and prune away probably useless rewriting rules. Consequently, a large amount of rule examinations can be avoided and the improving efficiency is significantly promoted. Based on the above approach, we have implemented a tool called HMBP and evaluated it on FPBench. In the evaluation, we compare the efficiency of HMBP and the well-known accuracy-improving tool Herbie. The results show that HMBP is 2.32x faster than Herbie in average. For the best case, the speedup is up to 29.64x.","PeriodicalId":194449,"journal":{"name":"Proceedings of the 12th Asia-Pacific Symposium on Internetware","volume":"7 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2020-11-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 12th Asia-Pacific Symposium on Internetware","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3457913.3457918","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

Floating point programs are widely used in science and engineering. These programs approximate real arithmetic with floating point arithmetic, which introduces rounding errors and leads to inaccurate results. In life-critical software systems, inaccuracy can lead to catastrophes. To avoid these tragedies, program rewriting techniques have been proposed to automatically improve accuracy for floating point programs. Unfortunately, efficiency can be the bottleneck of such techniques due to the lack of effective pruning strategy. We introduce a heuristic pruning strategy called Memory Based Pruning to accelerate these rewrite-based approaches. The heuristic comes from an observation that floating point programs with similar computation steps usually suffer from similar inaccuracy problems, therefore they can be improved by the same or similar rewriting rules. With Memory Based Pruning, rewriting rules used in accuracy improvement are memorized in a knowledge memory. While improving accuracy for similar programs, these rules can help to guide the search and prune away probably useless rewriting rules. Consequently, a large amount of rule examinations can be avoided and the improving efficiency is significantly promoted. Based on the above approach, we have implemented a tool called HMBP and evaluated it on FPBench. In the evaluation, we compare the efficiency of HMBP and the well-known accuracy-improving tool Herbie. The results show that HMBP is 2.32x faster than Herbie in average. For the best case, the speedup is up to 29.64x.
通过基于内存的剪枝加速浮点程序的精度改进
浮点程序在科学和工程中有着广泛的应用。这些程序用浮点运算近似真实的算术,这会引入舍入误差并导致不准确的结果。在生命攸关的软件系统中,不准确可能导致灾难。为了避免这些悲剧,人们提出了程序重写技术来自动提高浮点程序的精度。不幸的是,由于缺乏有效的修剪策略,效率可能成为此类技术的瓶颈。我们引入了一种启发式剪枝策略,称为基于记忆的剪枝,以加速这些基于重写的方法。启发式来自于一个观察,即具有类似计算步骤的浮点程序通常会遇到类似的不准确性问题,因此可以通过相同或类似的重写规则来改进它们。利用基于记忆的剪枝技术,将用于提高精度的改写规则存储在知识存储器中。在提高类似程序的准确性的同时,这些规则可以帮助指导搜索并删除可能无用的重写规则。从而避免了大量的规则检验,大大提高了改进效率。基于上述方法,我们实现了一个名为HMBP的工具,并在FPBench上对其进行了评估。在评价中,我们比较了HMBP和著名的精度提高工具Herbie的效率。结果表明,HMBP比Herbie平均快2.32倍。在最好的情况下,加速可达29.64倍。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信