SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2003.00671 · 2020

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

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 4 functions out of this paper's own repositories and ran 4 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
ucb-bar/autophase canonical 4 of 4
FunctionStatusWhere it lives
geo_mean Ran ucb-bar/autophase/algos/ga/genetic_search.py
code served (permissive licence) · get_code("87ed76cbc43f3e24")
get_lookup_rank Ran ucb-bar/autophase/algos/greedy/greedy_search.py
code served (permissive licence) · get_code("022799cabc9e5194")
int2base Ran ucb-bar/autophase/algos/bruteforce/bruteforce_search.py
code served (permissive licence) · get_code("f53ef0fb78d206b5")
rollout Ran ucb-bar/autophase/algos/rl/policies.py
code served (permissive licence) · get_code("0c166888d916644a")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

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.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2003.00671")
get_code_for_paper("2003.00671")
have("2003.00671")

Connect an agent — have() is free.