AutoPhase: Juggling HLS Phase Orderings in Random Forests with Deep Reinforcement Learning

03/02/2020
by   Qijing Huang, et al.
0

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 that are unlikely to improve the performance of a given program. We compare the performance of AutoPhase to state-of-the-art algorithms that address the phase-ordering problem. In our evaluation, we show that AutoPhase improves circuit performance by 28 results compared to the state-of-the-art solutions, while requiring fewer samples. Furthermore, unlike existing state-of-the-art solutions, our deep reinforcement learning solution shows promising result in generalizing to real benchmarks and 12,874 different randomly generated programs, after training on a hundred randomly generated programs.

READ FULL TEXT
research
01/15/2019

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

The performance of the code generated by a compiler depends on the order...
research
08/20/2020

Static Neural Compiler Optimization via Deep Reinforcement Learning

The phase-ordering problem of modern compilers has received a lot of att...
research
03/02/2021

Dual Reinforcement-Based Specification Generation for Image De-Rendering

Advances in deep learning have led to promising progress in inferring gr...
research
08/28/2023

Target-independent XLA optimization using Reinforcement Learning

An important challenge in Machine Learning compilers like XLA is multi-p...
research
07/18/2022

MLGOPerf: An ML Guided Inliner to Optimize Performance

For the past 25 years, we have witnessed an extensive application of Mac...
research
03/08/2023

MCTS-GEB: Monte Carlo Tree Search is a Good E-graph Builder

Rewrite systems [6, 10, 12] have been widely employing equality saturati...
research
05/06/2020

A Collaborative Filtering Approah for the Automatic Tuning of Compiler Optimisations

Selecting the right compiler optimisations has a severe impact on progra...

Please sign up or login with your details

Forgot password? Click here to reset