Debugging and detecting numerical errors in computation with posits

Debugging and detecting numerical errors in computation with posits
复制标题

DOI:
10.1145/3385412.3386004
复制
发表时间:
2020-06
期刊:
Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation
影响因子:
--
通讯作者:
Sangeeta Chowdhary;Jay P. Lim;Santosh Nagarakatte
Sangeeta Chowdhary;Jay P. Lim;Santosh Nagarakatte
中科院分区:
其他
文献类型:
--
作者:
Sangeeta Chowdhary;Jay P. Lim;Santosh Nagarakatte

文献摘要

相似文献

Posit是最近提出的浮点表示(FP)的替代方案。它提供锥形精度。给定固定的位数,与FP相比,NLP表示可以为某些数字提供更好的精度,这在许多领域引起了极大的兴趣。作为一种具有锥形精度的表示,它可以为上述黄金区域之外的数字引入高舍入误差。程序员目前缺乏工具来检测和调试错误,而编程与假设。本文介绍了Positiment,一个编译时仪器,执行影子执行高精度值,以检测各种错误的计算使用posits。为了帮助程序员调试报告的错误,Positron还提供了指令的有向非循环图,这些指令可能是错误的原因。本文的一个贡献是为影子执行设计每个内存位置的元数据,从而能够高效地调试长期运行程序的错误。我们已经使用Positron来检测和调试使用posits编写的各种数值应用程序中的错误。为了证明这些想法甚至适用于FP程序,我们已经为FP程序构建了一个影子执行框架,它比Herbgrind快一个数量级。
Posit is a recently proposed alternative to the floating point representation (FP). It provides tapered accuracy. Given a fixed number of bits, the posit representation can provide better precision for some numbers compared to FP, which has generated significant interest in numerous domains. Being a representation with tapered accuracy, it can introduce high rounding errors for numbers outside the above golden zone. Programmers currently lack tools to detect and debug errors while programming with posits. This paper presents PositDebug, a compile-time instrumentation that performs shadow execution with high precision values to detect various errors in computation using posits. To assist the programmer in debugging the reported error, PositDebug also provides directed acyclic graphs of instructions, which are likely responsible for the error. A contribution of this paper is the design of the metadata per memory location for shadow execution that enables productive debugging of errors with long-running programs. We have used PositDebug to detect and debug errors in various numerical applications written using posits. To demonstrate that these ideas are applicable even for FP programs, we have built a shadow execution framework for FP programs that is an order of magnitude faster than Herbgrind.