Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Saiki, Brett, Brough, Jackson, Regehr, Jonas, Ponce, Jesús, Pradeep, Varun, Akhileshwaran, Aditya, Tatlock, Zachary, Panchekha, Pavel
Format: Preprint
Veröffentlicht: 2024
Schlagworte:
Online-Zugang:https://arxiv.org/abs/2410.14025
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866909373658300416
author Saiki, Brett
Brough, Jackson
Regehr, Jonas
Ponce, Jesús
Pradeep, Varun
Akhileshwaran, Aditya
Tatlock, Zachary
Panchekha, Pavel
author_facet Saiki, Brett
Brough, Jackson
Regehr, Jonas
Ponce, Jesús
Pradeep, Varun
Akhileshwaran, Aditya
Tatlock, Zachary
Panchekha, Pavel
contents New low-precision accelerators, vector instruction sets, and library functions make maximizing accuracy and performance of numerical code increasingly challenging. Two lines of work$\unicode{x2013}$traditional compilers and numerical compilers$\unicode{x2013}$attack 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.5x) or Herbie (by up to 2.0x) by leveraging low-precision accelerators, accuracy-optimized numerical helper functions, and library subcomponents.
format Preprint
id arxiv_https___arxiv_org_abs_2410_14025
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Target-Aware Implementation of Real Expressions
Saiki, Brett
Brough, Jackson
Regehr, Jonas
Ponce, Jesús
Pradeep, Varun
Akhileshwaran, Aditya
Tatlock, Zachary
Panchekha, Pavel
Programming Languages
New low-precision accelerators, vector instruction sets, and library functions make maximizing accuracy and performance of numerical code increasingly challenging. Two lines of work$\unicode{x2013}$traditional compilers and numerical compilers$\unicode{x2013}$attack 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.5x) or Herbie (by up to 2.0x) by leveraging low-precision accelerators, accuracy-optimized numerical helper functions, and library subcomponents.
title Target-Aware Implementation of Real Expressions
topic Programming Languages
url https://arxiv.org/abs/2410.14025