AutoPass: 基于证据指导的LLM编译器性能调优框架

AutoPass: Evidence-Guided LLM Agents for Compiler Performance Tuning

精选理由

AutoPass 把 LLM 变成编译器调优助手,不用训练就能在 x86 和 ARM 上跑出比 -O3 还快的速度,实测有 4-11% 的加速。

AI 摘要

AutoPass 是一个多智能体框架,利用编译器和运行时证据引导 LLM 生成编译器优化决策。它在 LLVM 编译器上实现,在 x86-64 和 ARM64 系统上测试,分别比 LLVM -O3 实现了 1.043x 和 1.117x 的几何平均加速。AutoPass 无需离线训练或微调,可直接应用于新基准和平台。

原文 · arXiv cs.AI

AutoPass: Evidence-Guided LLM Agents for Compiler Performance Tuning

Large Language Models (LLMs) show promise for code compilation tasks, but applying them to runtime performance tuning is difficult due to complex microarchitectural effects and noisy runtime measurements. We present AutoPass, a multi-agent framework for compiler performance tuning that uses compiler and runtime evidence to guide LLM-generated optimization decisions. Rather than treating the compiler as a black box like prior auto-tuning schemes, AutoPass opens up the compiler to the LLM, enabling it to query compiler-internal optimization states and analyze the intermediate representation to orchestrate compiler options. The search process iteratively refines optimization configurations using measured runtime feedback to diagnose regressions and guide latency-improving edits. AutoPass operates in an inference-only, training-free setting and requires no offline training or task-specific fine-tuning, making it readily applicable to new benchmarks and platforms. We implement AutoPass on the LLVM compiler and evaluate it on server-grade x86-64 and embedded ARM64 systems. AutoPass outperforms expert-tuned heuristics and classical autotuning methods, achieving geometric-mean speedups of 1.043x and 1.117x over LLVM -O3 on x86-64 and ARM64, respectively.