arXiv:2606.20373cs.SEcs.AI2026-06被引 1

用大模型智能调优编译器,自动提升代码运行速度。

AutoPass: Evidence-Guided LLM Agents for Compiler Performance Tuning

论文配图:AutoPass: Evidence-Guided LLM Agents for Compiler Performance Tuning
图 1 · 摘自论文原文
  • 让大模型直接查看编译器内部状态,动态调整优化选项。
  • 在无训练情况下,分别实现1.043倍和1.117倍的加速效果。
  • 适合需要快速适配新平台的编译器优化场景。

大型语言模型(LLMs)在代码编译任务中展现潜力,但因复杂的微架构效应和噪声运行时测量,难以用于运行时性能调优。我们提出AutoPass,一个基于多智能体的编译器性能调优框架,利用编译器与运行时证据引导大模型生成优化决策。不同于以往将编译器视为黑盒的自动调优方法,AutoPass开放编译器供大模型查询内部优化状态,并分析中间表示以协调编译选项。搜索过程通过测量的运行时反馈迭代优化配置,诊断性能退化并指导降低延迟的修改。AutoPass在仅推理、无需训练或任务特定微调的设置下运行,可直接应用于新基准和平台。我们在LLVM编译器上实现AutoPass,评估其在服务器级x86-64和嵌入式ARM64系统上的表现。结果表明,AutoPass优于专家调优启发式和经典自动调优方法,在x86-64和ARM64上分别实现相对于LLVM -O3的几何平均加速比1.043x和1.117x。

原文摘要 · Abstract (English)

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.

编译优化大模型性能调优LLM

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。