AutoPhase: Compiler Phase-Ordering for High Level Synthesis with Deep Reinforcement Learning

  • 2019-01-15 00:13:21
  • Ameer Haj-Ali, Qijing Huang, William Moses, John Xiang, Ion Stoica, Krste Asanovic, John Wawrzynek
  • 9

Abstract

The performance of the code generated by a compiler depends on the order inwhich the optimization passes are applied. In the context of high-levelsynthesis, the quality of the generated circuit relates directly to the codegenerated by the front-end compiler. Unfortunately, choosing a goodorder--often referred to as the phase-ordering problem--is an NP-hard problem.As a result, existing solutions rely on a variety of sub-optimal heuristics. Inthis paper, we evaluate a new technique to address the phase-ordering problem:deep reinforcement learning. To this end, we implement a framework that takesany group of programs and finds a sequence of passes that optimize theperformance of these programs. Without loss of generality, we instantiate thisframework in the context of an LLVM compiler and target multiple High-LevelSynthesis programs. We compare the performance of deep reinforcement learningto state-of-the-art algorithms that address the phase-ordering problem.Overall, our framework runs one to two orders of magnitude faster than thesealgorithms, and achieves a 16% improvement in circuit performance over the -O3compiler flag.

 

Quick Read (beta)

loading the full paper ...