paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Fast Instruction Selection for Fast Digital Signal Processing

为快速数字信号处理而进行的快速指令选择
ASPLOS Proceedings of the 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 42023匹配度 2/10 · 论文研究定点 DSP 编译中的指令选择与项重写系统,属于传统编译优化,不涉及 LLM/Agent,也未应用于 ML 系统或 Agentic 程序,且关注定点而非浮点程序分析,与用户核心研究方向(PL+AI、浮点程序分析与 LLM 交叉、贝叶斯程序分析)无明显交集。引用 5 inbox
Alexander J Root, Maaz Bin Safeer Ahmad, Dillon Sharlet, Andrew Adams, Shoaib Kamil, Jonathan Ragan-Kelley
crossref: 2026-09-12

AI 速览

一句话:提出 Pitchfork:以可移植定点中间表示 FPIR 配合项重写系统自动识别并生成 DSP 专用定点指令,最高获得 2.44 倍加速。

现代向量处理器为定点数字信号处理提供了大量专用指令,涵盖多种舍入、饱和与类型转换模式,且往往是多个原语操作的融合。这使程序员难以用类 C 的可移植代码精确对应某条指令,编译器也难以自动识别这些惯用法。本文提出 Pitchfork:定义可移植的定点中间表示 FPIR 来刻画定点代码中的常见惯用法;借助由人工编写与自动合成并经验证的规则所组成的项重写系统,将整数运算自动提升为 FPIR,再通过一组目标相关的项重写系统下降到具体定点指令。在 Halide 的多个基准上,与基于 LLVM 的标准编译流程相比,可移植定点信号处理代码的运行时间几何平均加速分别为 x86+AVX2 上 1.31 倍、ARM Neon 上 1.82 倍、Hexagon HVX 上 2.44 倍,同时编译时间持平或更优。

问题
定点 DSP 专用向量指令(含舍入、饱和、类型转换与融合形式)极多,程序员难以写出恰好对应某条指令的可移植代码,编译器也难以自动识别可用的指令。
方法
Pitchfork 定义可移植定点 IR(FPIR)刻画常见定点惯用法,用人工与自动合成并经验证的项重写系统将整数运算提升为 FPIR,再用目标相关项重写系统下降到目标专用定点指令。
评估
在 Halide 的一组定点信号处理基准上与标准 LLVM 编译流程对比运行时间与编译时间:x86+AVX2 几何平均加速 1.31 倍,ARM Neon 1.82 倍,Hexagon HVX 2.44 倍,编译时间持平或更优。
原文摘要(Abstract)

Modern vector processors support a wide variety of instructions for fixed-point digital signal processing. These instructions support a proliferation of rounding, saturating, and type conversion modes, and are often fused combinations of more primitive operations. While these are common idioms in fixed-point signal processing, it is difficult to use these operations in portable code. It is challenging for programmers to write down portable integer arithmetic in a C-like language that corresponds exactly to one of these instructions, and even more challenging for compilers to recognize when these instructions can be used. Our system, Pitchfork, defines a portable fixed-point intermediate representation, FPIR, that captures common idioms in fixed-point code. FPIR can be used directly by programmers experienced with fixed-point, or Pitchfork can automatically lift from integer operations into FPIR using a term-rewriting system (TRS) composed of verified manual and automatically-synthesized rules. Pitchfork then lowers from FPIR into target-specific fixed-point instructions using a set of target-specific TRSs. We show that this approach improves runtime performance of portably-written fixed-point signal processing code in Halide, across a range of benchmarks, by geomean 1.31x on x86 with AVX2, 1.82x on ARM Neon, and 2.44x on Hexagon HVX compared to a standard LLVM-based compiler flow, while maintaining or improving existing compile times.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot10113,
  title = {Fast Instruction Selection for Fast Digital Signal Processing},
  author = {Alexander J Root and Maaz Bin Safeer Ahmad and Dillon Sharlet and Andrew Adams and Shoaib Kamil and Jonathan Ragan-Kelley},
  booktitle = {ASPLOS},
  year = {2023},
  doi = {10.1145/3623278.3624768}
}