一句话:提出首个自动检测 GPU 应用中浮点异常的工具 FPChecker,通过编译器插桩在运行时报告异常位置。
浮点算术广泛用于科学计算、机器学习、图形学和金融等领域,而这些应用正迅速采用 GPU 加速。但 GPU 对浮点异常检测的支持有限,妨碍了可靠 GPU 应用的开发。本文提出 FPChecker,这是首个自动检测 GPU 应用中浮点异常的工具。FPChecker 利用 clang/LLVM 编译器对 GPU kernel 进行插桩,在运行时检测异常;一旦检测到异常,便向程序员报告异常发生的代码位置及其他有用信息,程序员可据此修改算法或输入来避免异常。作者介绍了 FPChecker 的设计,评估了工具开销,并通过真实案例识别出一个隐藏异常。结果表明其减速适中,代码已作为开源软件公开。
Floating-point arithmetic is widely used in applications from several fields including scientific computing, machine learning, graphics, and finance. Many of these applications are rapidly adopting the use of GPUs to speedup computations. GPUs, however, have limited support to detect floating-point exceptions, which hinders the development of reliable applications in GPU-based systems. We present FPCHECKER, the first tool to automatically detect floating-point exceptions in GPU applications. FPCHECKER uses the clang/LLVM compiler to instrument GPU kernels and to detect exceptions at runtime. Once an exception is detected, it reports to the programmer the code location of the exception as well as other useful information. The programmer can then use this report to avoid the exception, e.g., by modifying the application algorithm or changing the input. We present the design of FPCHECKER, an evaluation of the overhead of the tool, and a real-world case scenario on which the tool is used to identify a hidden exception. The slowdown of FPCHECKER is moderate and the code is publicly available as open source.