一句话:提出 Isaria 框架,从 ISA 规格自动合成重写规则,用等式饱和自动生成高性能向量化 DSP 编译器。
嵌入式 DSP 应用高度依赖向量化执行以取得最佳功耗性能折中,但为每个 DSP 架构或应用特定的 ISA 定制手写高性能向量化编译器是一项庞大且易错的投入。本文提出 Isaria:它从 ISA 规格中自动合成可靠(sound)的重写规则,而非人工编写;随后基于等式饱和(equality saturation)搜索向量化后的 DSP 代码,并自动发现规则中的阶段结构以提升编译性能,同时在编译期调度规则应用并剪枝搜索的中间状态。作者用 Isaria 为某工业级 DSP 架构生成编译器,所得 kernel 相比现有 DSP 库最高加速 6.9×,并与专家手工构建的编译器结果相当;此外 Isaria 还能通过自动生成高质量向量化编译器,加速对新 ISA 定制的探索。
Embedded applications extract the best power-performance trade-off from digital signal processors (DSPs) by making extensive use of vectorized execution. Rather than handwriting the many customized kernels these applications use, DSP engineers rely on auto-vectorizing compilers to quickly produce effective code. Building these compilers is a large and error-prone investment, and each new DSP architecture or application-specific ISA customization must repeat this effort to derive a new high-performance compiler. We present Isaria, a framework for automatically generating vectorizing compilers for DSP architectures. Isaria uses equality saturation to search for vectorized DSP code using a system of rewrite rules. Rather than hand-crafting these rules, Isaria automatically synthesizes sound rewrite rules from an ISA specification, discovers phase structure within these rules that improve compilation performance, and schedules their application at compile time while pruning intermediate states of the search. We use Isaria to generate a compiler for an industrial DSP architecture, and show that the resulting kernels outperform existing DSP libraries by up to 6.9× and are competitive with those generated by expert-built compilers. We also demonstrate how Isaria can speed up exploration of new ISA customizations by automatically generating a high-quality vectorizing compiler.