English

Revealing Floating-Point Accumulation Orders in Software/Hardware Implementations

Numerical Analysis 2025-07-02 v3 Mathematical Software Numerical Analysis Software Engineering

Abstract

Accumulation-based operations, such as summation and matrix multiplication, are fundamental to numerous computational domains. However, their accumulation orders are often undocumented in existing software and hardware implementations, making it difficult for developers to ensure consistent results across systems. To address this issue, we introduce FPRev, a diagnostic tool designed to reveal the accumulation order in the software and hardware implementations through numerical testing. With FPRev, developers can identify and compare accumulation orders, enabling developers to create reproducible software and verify implementation equivalence. FPRev is a testing-based tool that non-intrusively reveals the accumulation order by analyzing the outputs of the tested implementation for distinct specially designed inputs. Employing FPRev, we showcase the accumulation orders of popular libraries (such as NumPy and PyTorch) on CPUs and GPUs (including GPUs with specialized matrix accelerators such as Tensor Cores). We also validate the efficiency of FPRev through extensive experiments. FPRev exhibits a lower time complexity compared to the basic solution. FPRev is open-sourced at https://github.com/peichenxie/FPRev.

Cite

@article{arxiv.2411.00442,
  title  = {Revealing Floating-Point Accumulation Orders in Software/Hardware Implementations},
  author = {Peichen Xie and Yanjie Gao and Yang Wang and Jilong Xue},
  journal= {arXiv preprint arXiv:2411.00442},
  year   = {2025}
}

Comments

Camera-ready for USENIX ATC 2025

R2 v1 2026-06-28T19:44:01.822Z