AutoPhase: Juggling HLS Phase Orderings in Random Forests with Deep Reinforcement Learning
Qijing Huang, Ameer Haj-Ali, William Moses, John Xiang, Ion Stoica,, Krste Asanovic, John Wawrzynek

TL;DR
AutoPhase employs deep reinforcement learning to optimize compiler pass sequences, significantly improving code performance and generalizing well across diverse programs by intelligently reducing the search space.
Contribution
This paper introduces AutoPhase, a novel framework that applies deep reinforcement learning to the phase-ordering problem in compilers, leveraging random forests for efficient search space reduction.
Findings
AutoPhase improves circuit performance by 28% over -O3.
It achieves competitive results with fewer samples than existing methods.
AutoPhase generalizes effectively to real benchmarks and numerous random programs.
Abstract
The performance of the code a compiler generates depends on the order in which it applies the optimization passes. Choosing a good order--often referred to as the phase-ordering problem, is an NP-hard problem. As a result, existing solutions rely on a variety of heuristics. In this paper, we evaluate a new technique to address the phase-ordering problem: deep reinforcement learning. To this end, we implement AutoPhase: a framework that takes a program and uses deep reinforcement learning to find a sequence of compilation passes that minimizes its execution time. Without loss of generality, we construct this framework in the context of the LLVM compiler toolchain and target high-level synthesis programs. We use random forests to quantify the correlation between the effectiveness of a given pass and the program's features. This helps us reduce the search space by avoiding phase orderings…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsReinforcement Learning in Robotics · Neural Networks and Applications · Model Reduction and Neural Networks
