AutoPhase: Juggling HLS Phase Orderings in Random Forests with Deep
Reinforcement Learning
- URL: http://arxiv.org/abs/2003.00671v2
- Date: Wed, 4 Mar 2020 19:48:50 GMT
- Title: AutoPhase: Juggling HLS Phase Orderings in Random Forests with Deep
Reinforcement Learning
- Authors: Qijing Huang, Ameer Haj-Ali, William Moses, John Xiang, Ion Stoica,
Krste Asanovic, John Wawrzynek
- Abstract summary: AutoPhase is a framework that takes a program and uses deep reinforcement learning to find a sequence of compilation passes that minimizes its execution time.
We show that AutoPhase improves circuit performance by 28% when compared to using the -O3 compiler flag.
Unlike existing state-of-the-art solutions, our deep reinforcement learning solution shows promising result in generalizing to real benchmarks.
- Score: 17.584552398664737
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- 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 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% when compared to using the -O3 compiler flag, and achieves competitive
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.
Related papers
- Searching Latent Program Spaces [0.0]
We propose an algorithm for program induction that learns a distribution over latent programs in a continuous space, enabling efficient search and test-time adaptation.
We show that can generalize beyond its training distribution and adapt to unseen tasks by utilizing test-time adaptation mechanisms.
arXiv Detail & Related papers (2024-11-13T15:50:32Z) - Accelerating Cutting-Plane Algorithms via Reinforcement Learning
Surrogates [49.84541884653309]
A current standard approach to solving convex discrete optimization problems is the use of cutting-plane algorithms.
Despite the existence of a number of general-purpose cut-generating algorithms, large-scale discrete optimization problems continue to suffer from intractability.
We propose a method for accelerating cutting-plane algorithms via reinforcement learning.
arXiv Detail & Related papers (2023-07-17T20:11:56Z) - Optimizing NOTEARS Objectives via Topological Swaps [41.18829644248979]
In this paper, we develop an effective method for a set of candidate algorithms.
At the inner level, given a subject, we utilize off-the-the-art constraints.
The proposed method significantly improves the score of other algorithms.
arXiv Detail & Related papers (2023-05-26T21:49:37Z) - NAPG: Non-Autoregressive Program Generation for Hybrid Tabular-Textual
Question Answering [52.10214317661547]
Current numerical reasoning methods autoregressively decode program sequences.
The accuracy of program generation drops sharply as the decoding steps unfold due to error propagation.
In this paper, we propose a non-autoregressive program generation framework.
arXiv Detail & Related papers (2022-11-07T11:25:21Z) - Reinforcement Learning for Branch-and-Bound Optimisation using
Retrospective Trajectories [72.15369769265398]
Machine learning has emerged as a promising paradigm for branching.
We propose retro branching; a simple yet effective approach to RL for branching.
We outperform the current state-of-the-art RL branching algorithm by 3-5x and come within 20% of the best IL method's performance on MILPs with 500 constraints and 1000 variables.
arXiv Detail & Related papers (2022-05-28T06:08:07Z) - Will Bilevel Optimizers Benefit from Loops [63.22466953441521]
Two current popular bilevelimats AID-BiO and ITD-BiO naturally involve solving one or two sub-problems.
We first establish unified convergence analysis for both AID-BiO and ITD-BiO that are applicable to all implementation choices of loops.
arXiv Detail & Related papers (2022-05-27T20:28:52Z) - Discovering Non-monotonic Autoregressive Orderings with Variational
Inference [67.27561153666211]
We develop an unsupervised parallelizable learner that discovers high-quality generation orders purely from training data.
We implement the encoder as a Transformer with non-causal attention that outputs permutations in one forward pass.
Empirical results in language modeling tasks demonstrate that our method is context-aware and discovers orderings that are competitive with or even better than fixed orders.
arXiv Detail & Related papers (2021-10-27T16:08:09Z) - Searching for More Efficient Dynamic Programs [61.79535031840558]
We describe a set of program transformations, a simple metric for assessing the efficiency of a transformed program, and a search procedure to improve this metric.
We show that in practice, automated search can find substantial improvements to the initial program.
arXiv Detail & Related papers (2021-09-14T20:52:55Z) - Static Neural Compiler Optimization via Deep Reinforcement Learning [1.458855293397494]
In this paper, we employ a deep reinforcement learning approach to the phase-ordering problem.
Provided with sub-sequences constituting LLVM's O3 sequence, our agent learns to outperform the O3 sequence on the set of source codes used for training.
We believe that the models trained using our approach can be integrated into modern compilers as neural optimization agents.
arXiv Detail & Related papers (2020-08-20T13:16:29Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.