Accelerating Accuracy Improvement for Floating Point Programs Via Memory Based Pruning

Anxiang Xiao,Enyi Tang,Xin Chen,Linzhang Wang
DOI: https://doi.org/10.1145/3457913.3457918
2020-01-01
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.
What problem does this paper attempt to address?