GRACE:面向编译器自动调优的集群特定序列复用方法
GRACE: Cluster-Specific Sequence Reuse for Compiler Auto-Tuning
AI总结:
GRACE是编译器自动调优框架,通过构建集群特定序列核心集平衡优化质量与成本,在代码尺寸、执行效率优化上较LLVM基准选项实现显著性能提升且调优开销低
摘要:
编译器自动调优旨在突破固定编译器启发式规则的限制,提升优化质量,但现有方法常面临有效性与可部署性的权衡问题。迭代编译可发现针对特定程序的高效优化序列,不过其搜索成本过高,难以实际复用;基于学习的方法降低了调优开销,但其有效性取决于优化知识对未见过程序的迁移效果。近期基于核心集(coreset)的方法改善了这一权衡,但这类方法通常要么仍依赖较大的测试阶段搜索,要么假设单个全局核心集可良好服务所有程序。本文提出GRACE,一种基于「集群特定序列复用」的编译器自动调优框架。GRACE通过结合全局优化通道协同分析、优化响应引导的程序组织以及集群特定进化搜索,为每组相似程序构建小型可复用序列核心集。部署阶段,它在目标程序上评估小型核心集,并可在受限搜索空间内执行轻量优化,开销可控。我们使用LLVM 10.0.0和LLVM 18.1.6在7个基准数据集上评估GRACE:针对代码尺寸优化,GRACE相较`opt -Oz`平均减少LLVM IR指令数9.92%和10.30%,且部署阶段每个程序调优时间不足1秒;面向执行导向目标,GRACE相较`opt -O3`平均减少估计周期数26.84%和27.54%,在可运行的cBench和polybench程序上也实现了可测量的端到端加速。这些结果表明,离线构建的集群特定序列核心集在优化质量与成本间实现了实用平衡。
英文摘要:
Compiler auto-tuning aims to improve optimization quality beyond fixed compiler heuristics, but existing approaches often face a trade-off between effectiveness and deployability. Iterative compilation can discover strong program-specific optimization sequences, yet its search cost is often prohibitive for practical reuse. Learning-based methods reduce tuning overhead, but their effectiveness depends on how well optimization knowledge transfers to unseen programs. Recent coreset-based methods improve this trade-off, but they typically either still rely on relatively large test-time search or assume that a single global coreset can serve all programs well. We present GRACE, a compiler auto-tuning framework based on \emph{cluster-specific sequence reuse}. GRACE constructs a small reusable sequence coreset for each group of similar programs by combining global pass synergy analysis, optimization-response-guided program organization, and cluster-specific evolutionary search. At deployment time, it evaluates a small coreset on the target program and optionally performs lightweight refinement within a restricted search space, yielding bounded overhead. We evaluate GRACE on seven benchmark datasets using LLVM 10.0.0 and LLVM 18.1.6. For code-size optimization, GRACE reduces LLVM IR instruction count by 9.92\% and 10.30\% on average relative to \texttt{opt -Oz}, while requiring less than 1\,s tuning time per program at deployment. Under an execution-oriented objective, GRACE reduces estimated cycle counts by 26.84\% and 27.54\% on average relative to \texttt{opt -O3}, and also yields measurable end-to-end speedups on runnable cBench and polybench programs. These results suggest that offline-constructed, cluster-specific sequence coresets provide a practical balance between optimization quality and cost.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。