Learning Compiler Pass Orders using Coreset and Normalized Value Prediction
Youwei Liang, Kevin Stone, Ali Shameli, Chris Cummins, Mostafa Elhoushi, Jiadong Guo, Benoit Steiner, Xiaomeng Yang, Pengtao Xie, Hugh James Leather, Yuandong Tian
摘要
Finding the optimal pass sequence of compilation can lead to a significant reduction in program size and/or improvement in program efficiency. Prior works on compilation pass ordering have two major drawbacks. They either require an excessive budget (in terms of compilation steps) at compile time or fail to generalize to unseen programs. In this paper, for code-size reduction tasks, we propose a novel pipeline to find program-dependent pass sequences within 45 compilation calls. It first identifies a coreset of 50 pass sequences via greedy optimization of a submodular function, and then learns a policy with Graph Neural Network (GNN) to pick the optimal sequence by predicting the normalized values of the pass sequences in the coreset. Despite its simplicity, our pipeline outperforms the default -Oz flag by an average of 4.7% over a large collection (4683) of unseen code repositories from diverse domains across 14 datasets. In comparison, previous approaches like reinforcement learning on the raw pass sequence space may take days to train due to sparse reward, and may not generalize well in held-out ones from different domains. Our results demonstrate that existing human-designed compiler flags can be improved with a simple yet effective technique that transforms the raw action space into a small one with denser rewards.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 3 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- ECCO: Evidence-Driven Causal Reasoning for Compiler Optimization 引用了 Compiler-R1: Towards Agentic Compiler Auto-tuning with Reinforcement Learning
- ECCO: Evidence-Driven Causal Reasoning for Compiler Optimization 引用了 CompilerDream: Learning a Compiler World Model for General Code Optimization
- CompilerDream: Learning a Compiler World Model for General Code Optimization 引用了 ProGraML: A Graph-based Program Representation for Data Flow Analysis and Compiler Optimizations
引用它的顶会 Paper3
- Compiler-R1: Towards Agentic Compiler Auto-tuning with Reinforcement LearningHaolin Pan, Hongyu Lin, Haoran Luo, Yang Liu 等NeurIPS 2025 · 14 次引用
- ECCO: Evidence-Driven Causal Reasoning for Compiler OptimizationHaolin Pan, Lianghong Huang, Dong Jinyuan, Mingjie Xing 等ICML 2026 · 2 次引用
- CompilerDream: Learning a Compiler World Model for General Code OptimizationChaoyi Deng, Jialong Wu, Ningya Feng, Jianmin Wang 等KDD 2025
它引用的 Paper5
- How Attentive are Graph Attention Networks?Shaked Brody, Uri Alon, Eran YahavICLR 2022 · 1,717 次引用
- GraphCodeBERT: Pre-training Code Representations with Data FlowDaya Guo, Shuo Ren, Shuai Lu, Zhangyin Feng 等ICLR 2021 · 1,644 次引用
- CURL: Contrastive Unsupervised Representations for Reinforcement LearningMichael Laskin, Aravind Srinivas, Pieter AbbeelICML 2020 · 1,261 次引用
- ProGraML: A Graph-based Program Representation for Data Flow Analysis and Compiler OptimizationsChris Cummins, Zacharias V. Fisches, Tal Ben-Nun, Torsten Hoefler 等ICML 2021 · 140 次引用
- Transferable Graph Optimizers for ML CompilersYanqi Zhou, Sudip Roy, AmirAli Abdolrashidi, Daniel Wong 等NeurIPS 2020 · 63 次引用
相关 Paper
- Pass-Tuning: Towards Structure-Aware Parameter-Efficient Tuning for Code Representation LearningNuo Chen, Qiushi Sun, Jianing Wang, Xiang Li 等EMNLP Findings 2023 · 8 次引用
- Reinforced Genetic Algorithm Learning for Optimizing Computation GraphsAditya Paliwal, Felix Gimeno, Vinod Nair, Yujia Li 等ICLR 2020 · 70 次引用
- Neural Topological Ordering for Computation GraphsMukul Gagrani, Corrado Rainone, Yang Yang, Harris Teague 等NeurIPS 2022 · 21 次引用
- Graph Learning Assisted Multi-Objective Integer ProgrammingYaoxin Wu, Wen Song, Zhiguang Cao, Jie Zhang 等NeurIPS 2022 · 13 次引用
- Learning Execution through Neural Code fusionZhan Shi, Kevin Swersky, Daniel Tarlow, Parthasarathy Ranganathan 等ICLR 2020 · 32 次引用
