Skip to content

Gabriel-in-Toronto/autophase

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AutoPhase: Compiler Phase-Ordering for HLS with Deep Reinforcement Learning

AutoPhase is a framework that uses deep reinforcement learning (RL) to optimize the order of the passes that increase the performance of the programs by minimizing the clock cycle count. For more details, please see:

AutoPhase takes a program as an input and compiles into LLVM IR. The neural network agent takes as input the features of the program (using IR Feature Extractor), clock cycle count (using Clock-cycle Profiler), and histogram of previously applied passes. Then it outputs the prediction of the best next optimization pass to apply, which is used to generate a new LLVM IR.

Installation

AutoPhase depends on the following open-source tools, LegUp (HLS compiler), and Ray (RL framework). Dependencies:

Please refer to (patch/README.md) to install the LLVM patches.

We also compare RL against:

  • Insertion-based greedy search / beam search (algos/greedy/greedy_search.py)
  • DEAP (pip install deap)
  • OpenTuner (pip install opentuner)

Run AutoPhase

git clone https://github.com/ucb-bar/autophase.git 
export LEGUP_PATH=$(realpath "/path/to/legup-4.0")
export AUTOPHASE_PATH=$(realpath "/path/to/autophase")
cd autophase/gym-hls/
pip install -e .
cd ../algos/rl
python ppo_ray.py

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 83.3%
  • C++ 16.5%
  • Shell 0.2%