Target-Aware Implementation of Real Expressions
Brett Saiki, Jackson Brough, Jonas Regehr, Jesús Ponce, Varun Pradeep, Aditya Akhileshwaran, Zachary Tatlock, Pavel Panchekha
Abstract
New low-precision accelerators, vector instruction sets, and library functions make maximizing accuracy and performance of numerical code increasingly challenging. Two lines of work-traditional compilers and numerical compilersattack this problem from opposite directions. Traditional compiler backends optimize for specific target environments but are limited in their ability to balance performance and accuracy. Numerical compilers trade off accuracy and performance, or even improve both, but ignore the target environment. We join aspects of both to produce Chassis, a target-aware numerical compiler.
Chassis compiles mathematical expressions to operators from a target description, which lists the real expressions each operator approximates and estimates its cost and accuracy. Chassis then uses an iterative improvement loop to optimize for speed and accuracy. Specifically, a new instruction selection modulo equivalence algorithm efficiently searches for faster target-specific programs, while a new cost-opportunity heuristic supports iterative improvement. We demonstrate Chassis' capabilities on 9 different targets, including hardware ISAs, math libraries, and programming languages. Chassis finds better accuracy and performance trade-offs than both Clang (by 3.5×) or Herbie (by up to 2.0×) by leveraging low-precision accelerators, accuracyoptimized numerical helper functions, and library subcomponents.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 3666c16f-2b02-4e86-86eb-9f835f6853afCited by top-tier papers1
Ask how each one uses itBuilds on8
- egg: Fast and extensible equality saturationMax Willsey, Chandrakana Nandi, Yisu Remy Wang, Oliver Flatt et al.POPL 2021 · 170 citations
- Scalable yet rigorous floating-point error analysisArnab Das, Ian Briggs, Ganesh Gopalakrishnan, Sriram Krishnamoorthy et al.SC 2020 · 36 citations
- Rewrite rule inference using equality saturationChandrakana Nandi, Max Willsey, Amy Zhu, Yisu Remy Wang et al.OOPSLA 2021 · 35 citations
- Debugging and detecting numerical errors in computation with positsSangeeta Chowdhary, Jay P. Lim, Santosh NagarakattePLDI 2020 · 26 citations
- Equality Saturation Theory Exploration à la CarteAnjali Pal, Brett Saiki, Ryan Tjoa, Cynthia Richey et al.OOPSLA 2023 · 11 citations
Related papers
- Enabling accuracy-aware Quantum compilers using symbolic resource estimationGiulia Meuli, Mathias Soeken, Martin Roetteler, Thomas HänerOOPSLA 2020 · 10 citations
- Fast Instruction Selection for Fast Digital Signal ProcessingAlexander J. Root, Maaz Bin Safeer Ahmad, Dillon Sharlet, Andrew Adams et al.ASPLOS 2023 · 7 citations
- Bind the gap: compiling real software to hardware FFT acceleratorsJackson Woodruff, Jordi Armengol-Estapé, Sam Ainsworth, Michael F. P. O'BoylePLDI 2022 · 14 citations
- Chimera: An Analytical Optimizing Framework for Effective Compute-intensive Operators FusionSize Zheng, Siyuan Chen, Peidi Song, Renze Chen et al.HPCA 2023 · 46 citations
- Vector instruction selection for digital signal processors using program synthesisMaaz Bin Safeer Ahmad, Alexander J. Root, Andrew Adams, Shoaib Kamil et al.ASPLOS 2022 · 13 citations
