一句话:提出目标感知数值编译器 Chassis,将数学表达式编译为目标算子并迭代优化精度与速度。
新低精度加速器、向量指令集和库函数使数值代码的精度与性能优化愈发困难。传统编译器后端针对特定目标优化但难以平衡精度与性能,数值编译器则忽略目标环境。本文提出 Chassis,一个目标感知的数值编译器:它根据目标描述将数学表达式编译为目标算子,目标描述给出每个算子近似的实数表达式及其代价与精度估计;随后用迭代改进循环优化速度和精度,其中模等价指令选择算法高效搜索更快的目标相关程序,代价-机会启发式支持迭代改进。作者在 9 个目标(硬件 ISA、数学库、编程语言)上评估,Chassis 相比 Clang 取得 3.5 倍、相比 Herbie 最高 2.0 倍的精度与性能权衡提升。
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 compilers---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.5×) or Herbie (by up to 2.0×) by leveraging low-precision accelerators, accuracy-optimized numerical helper functions, and library subcomponents.
DOI 原文 · arXiv · PDF(开放获取) · DBLP
@inproceedings{SaikiBRPPATP25,
title = {Target-Aware Implementation of Real Expressions},
author = {Brett Saiki and Jackson Brough and Jonas Regehr and Jesus Ponce and Varun Pradeep and Aditya Akhileshwaran and Zachary Tatlock and Pavel Panchekha},
booktitle = {ASPLOS},
year = {2025},
doi = {10.1145/3669940.3707277}
}