Lune

SC2022Top-tier venue

Finding Inputs that Trigger Floating-Point Exceptions in GPUs via Bayesian Optimization

Ignacio Laguna, Ganesh Gopalakrishnan

Abstract

and can be tricky to debug, today developers lack practical solutions to detect or predict floating-point exceptions in GPUs. Most approaches on exception detection rely on hardware register flags [1], [2]; however, NVIDIA GPUs do not provide such register flags and CUDA provides no mechanism to detect such exceptions 1 . Compiler-based solutions, such as [3], require sources and can detect exceptions at runtime, but only for given inputs. Ideally, developers would want to know the inputs that induce exceptions so those inputs can be controlled and explored systematically during testing.

There is prior work on identifying inputs that induce floating-point exceptions in CPU programs [4]. While these methods could (in principle) be implemented on GPU kernels, their drawback is that they use SMT solvers and symbolic execution, which requires analyzing the source code. Unfortunately, practical GPU codes running on NVIDIA GPUs involve using proprietary accelerated libraries, such as cuBLAS, cuFFT, cuSOLVER, CUDA Math Lib, cuTENSOR, cuSPARSE, and cuDNN [5], for which the source code is not publicly available. Even popular machine learning frameworks, such as PyTorch [6], make heavy use of cuBLAS and cuDNN. As a result, methods that require the source code are limited to test accelerated libraries or code that use them.

Our Contributions. This paper presents Xscope 2 , a framework to find inputs that trigger floating-point exceptions in a GPU function f (x), where the function user has limited knowledge of how the function operates. More specifically, the source of f (x) is not available-the function is a black box from the user's perspective-and the user does not know a priori the input bounds that the function expects, i.e., inputs can be any normal floating-point number. Our method relies on using Bayesian optimization (BO) to explore f in a guided manner with the objective of pinpointing extreme cases in f . These extreme cases make f return the result of exceptions to the user, i.e., infinity (positive and negative), underflows (i.e., subnormal numbers), or NaN (not a number). Finally, the user is provided the inputs of f that triggered such exceptions. Developers can also use Xscope to test functions where the code is available and/or input bounds are known, which only 1

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

2 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • pLiner: isolating lines of floating-point code for compiler-induced variability cites Efficient generation of error-inducing floating-point inputs via symbolic execution
  • Design and Evaluation of GPU-FPX: A Low-Overhead tool for Floating-Point Exception Detection in NVIDIA GPUs cites Spying on the Floating Point Behavior of Existing, Unmodified Scientific Applications
  • Characterizing Real-World Bugs in Tile Programs for Automated Bug Detection cites Design and Evaluation of GPU-FPX: A Low-Overhead tool for Floating-Point Exception Detection in NVIDIA GPUs
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers2

  1. Design and Evaluation of GPU-FPX: A Low-Overhead tool for Floating-Point Exception Detection in NVIDIA GPUsXinyi Li, Ignacio Laguna, Bo Fang, Katarzyna Swirydowicz et al.HPDC 2023 · 12 citations
  2. Characterizing Real-World Bugs in Tile Programs for Automated Bug DetectionRavishka Rathnasuriya, Zihe Song, Nidhi Majoju, Tingxi Li et al.ISSTA 2026

Builds on3

  1. Efficient generation of error-inducing floating-point inputs via symbolic executionHui Guo, Cindy Rubio-GonzálezICSE 2020 · 27 citations
  2. Spying on the Floating Point Behavior of Existing, Unmodified Scientific ApplicationsPeter A. Dinda, Alex Bernat, Conor HetlandHPDC 2020 · 20 citations
  3. pLiner: isolating lines of floating-point code for compiler-induced variabilityHui Guo, Ignacio Laguna, Cindy Rubio-GonzálezSC 2020 · 15 citations

Related papers

  1. FPBOXer: Efficient Input-Generation for Targeting Floating-Point Exceptions in GPU ProgramsAnh Tran, Ignacio Laguna, Ganesh GopalakrishnanHPDC 2024 · 3 citations
  2. FloatGuard: Efficient Whole-Program Detection of Floating-Point Exceptions in AMD GPUsDolores Miao, Ignacio Laguna, Cindy Rubio-GonzálezHPDC 2025 · 2 citations
  3. An Investigation on Numerical Bugs in GPU Programs Towards Automated Bug DetectionRavishka Rathnasuriya, Nidhi Majoju, Zihe Song, Wei YangISSTA 2025
  4. Over-Synchronization in GPU ProgramsAjay Nayak, Arkaprava BasuMICRO 2024 · 2 citations
  5. SuperCollider: Scalable and Effective Data Race Detection for CUDAMark Stephenson, Sana Damani, Mohamed Tarek Ibn Ziad, Anis Ladram et al.PLDI 2026
Dusk over the sea between two cliffs drawn in fine vertical lines