Numerical Superoptimization for Library Learning
Jonas Regehr, Mitch Briles, Zachary Tatlock, Pavel Panchekha

TL;DR
This paper introduces GrowLibm, a method that leverages numerical superoptimizers to identify valuable new mathematical primitives for floating-point kernels, significantly enhancing speed and accuracy in scientific computing.
Contribution
It repurposes the Herbie superoptimizer to automatically discover and rank new primitives that improve performance and precision in numerical libraries.
Findings
Kernel speed improved by up to 2.2x with new primitives.
Maximum accuracy increased from 56.0% to 93.5%.
Application performance improved by up to 5% with learned primitives.
Abstract
Numerical software depends on fast, accurate implementations of mathematical primitives like sin, exp, and log. Modern superoptimizers can optimize floating-point kernels against a given set of such primitives, but a more fundamental question remains open: which new primitives are worth implementing in the first place? We formulate this as numerical library learning: given a workload of floating-point kernels, identify the mathematical primitives whose expert implementations would most improve speed and accuracy. Our key insight is that numerical superoptimizers already have the machinery well-suited to this problem. Their search procedures happen to enumerate candidate primitives, their equivalence procedures can generalize and deduplicate candidates, and their cost models can estimate counterfactual utility: how much the workload would improve if a given primitive were available.…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsNumerical Methods and Algorithms · Stochastic Gradient Optimization Techniques · Parallel Computing and Optimization Techniques
