一句话:提出 EFTSanitizer,用无误差变换作为 oracle 快速影子执行,检测并调试数值误差。
浮点运算中单次舍入误差虽有界,但跨操作累积可能导致异常、收敛变慢甚至崩溃,而现有影子执行工具需要 oracle 且速度较慢。本文提出 EFTSanitizer,使用无误差变换(EFT)——用现有硬件浮点操作计算基本操作误差的序列——作为影子执行的 oracle。它提供有向无环图(DAG)展示误差传播,并支持跨函数调用、内存受限的追踪;还支持从动态执行任意点开始的选择性影子执行。实验表明,EFTSanitizer 比 FPSanitizer、Herbgrind 等最先进工具有数量级加速,并发现了新的数值错误。
This paper proposes, EFTSanitizer, a fast shadow execution framework for detecting and debugging numerical errors during late stages of testing especially for long-running applications. Any shadow execution framework needs an oracle to compare against the floating point (FP) execution. This paper makes a case for using error free transformations, which is a sequence of operations to compute the error of a primitive operation with existing hardware supported FP operations, as an oracle for shadow execution. Although the error of a single correctly rounded FP operation is bounded, the accumulation of errors across operations can result in exceptions, slow convergences, and even crashes. To ease the job of debugging such errors, EFTSanitizer provides a directed acyclic graph (DAG) that highlights the propagation of errors, which results in exceptions or crashes. Unlike prior work, DAGs produced by EFTSanitizer include operations that span various function calls while keeping the memory usage bounded. To enable the use of such shadow execution tools with long-running applications, EFTSanitizer also supports starting the shadow execution at an arbitrary point in the dynamic execution, which we call selective shadow execution. EFTSanitizer is an order of magnitude faster than prior state-of-art shadow execution tools such as FPSanitizer and Herbgrind. We have discovered new numerical errors and debugged them using EFTSanitizer.
@article{paperbot1472,
title = {Fast shadow execution for debugging numerical errors using error free transformations},
author = {Sangeeta Chowdhary and Santosh Nagarakatte},
journal = {Proceedings of the ACM on Programming Languages},
volume = {6},
number = {OOPSLA2},
year = {2022},
doi = {10.1145/3563353}
}