Search arXivSearch

arXiv · 2609.12307

How to grade the accuracy of the BLAS

Abstract

Motivated by accelerating machine learning (ML), many computer vendors and chip manufacturers are building accelerators for matrix multiplication, which save time and energy by operating in the lower precisions needed for ML. This has in turn motivated many efforts to use these accelerators to provide faster matrix multiplication implementations with the higher precision required by many other linear algebra applications. Motivated by the large design space of algorithms for approximating higher precision, with significant performance/accuracy tradeoffs, we provide a benchmark to "grade the accuracy" of a matrix multiplication implementation (or the BLAS more generally), ranging from an "A" for attaining the classic floating point error bound, to a "C" for attaining a weaker but still useful bound, that is satisfied by Strassen-like algorithms. We also propose "ungameable" tests that vendors or users can run to verify their promised accuracy, and describe how these different grades impact the accuracy of applications like LU, QR, and Cholesky decomposition. Our test code is publicly available at github.com/Reference-LAPACK/grading-the-BLAS for developers and users, and we also plan to publicly release all our test results.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

James Demmel, Greg Henry, Igor Kozachenko, Julien Langou, Xiaoye Sherry Li, Jason Riedy, Jackson Vanover. 2026-09-11. How to grade the accuracy of the BLAS. https://arxiv.org/abs/2609.12307

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

How many continuous measurements are needed to learn a vector?

One can recover vectors from $\mathbb{R}^m$ with arbitrary precision, using only $\lceil \log_2(m)\rceil +1$ continuous measurements that are chosen adaptively. This surprising result is explained and discussed, and we present applications to infinite-dimensional approximation problems.

math.NA

IterativeCUR: Large Rank-Adaptive Approximation From a Small Recycled Sketch

The computation of accurate low-rank matrix approximations is central to improving the scalability of various techniques in machine learning, uncertainty quantification, and control. Traditionally, low-rank approximations are constructed using SVD-based approaches such as truncated SVD or Randomized SVD. Although these SVD approaches---especially Randomized SVD---have proven to be very computationally efficient, other low-rank approximation methods can offer even greater performance. One such approach is the CUR decomposition, which forms a low-rank approximation using direct row and column subsets of a matrix. Because CUR uses direct matrix subsets, it is also often better able to preserve native matrix structures like sparsity or non-negativity than SVD-based approaches and can facilitate data interpretation in many contexts. This paper introduces IterativeCUR, which draws on previous work in randomized numerical linear algebra to build a new algorithm that is highly competitive compared to prior work. IterativeCUR is adaptive in the sense that it takes as an input parameter the desired tolerance $ε$ and outputs (with arbitrarily high probability) an approximation of error bounded by $ε$, rather than requiring an a priori guess of the numerical rank. IterativeCUR typically runs significantly faster than both existing CUR algorithms and techniques such as Randomized SVD. Its asymptotic complexity is $\mathcal{O}(mn + (m+n)r^2)$ for an $m\times n$ matrix of output rank $r$. IterativeCUR relies on a single small sketch from the matrix that is successively downdated as the algorithm proceeds. We demonstrate through extensive experiments that IterativeCUR achieves up to $4\times$ speed-up over state-of-the-art pivoting-on-sketch approaches with no loss of accuracy, and up to $40\times$ speed-up over rank-adaptive randomized SVD approaches.

math.NA

Multigrid with Linear Storage Complexity

As the discretization error for the solution of a partial differential equation (PDE) decreases, the precision required to store the corresponding coefficients naturally increases. Storing the solution's finite element coefficients explicitly requires $\mathcal O(n \log n)$ bits of storage, where $n$ is the number of degrees of freedom (DoFs). This paper presents a full multigrid method to compute the solution in a compressed format that reduces the storage complexity of the solution and intermediate vectors to $\mathcal O(n)$ bits. This reduction allows a matrix-free implementation to solve elliptic PDEs with an overall linear space complexity. For problems limited by the memory capacity of current supercomputers, we expect a memory footprint reduction of about an order of magnitude compared to state-of-the-art mixed-precision methods. We demonstrate the applicability of our algorithm by solving two model problems. Depending on the PDE and polynomial degree, but irrespective of the problem size, the solution vector on the finest grid requires between 4 and 12 bits per DoF, and the residual and correction require 3 to 6 bits each. Additional data is stored on the coarse grids with modestly increasing bit widths toward coarser grids.

math.NA