This is the implementation of the paper ConfuciuX: Autonomous Hardware Resource Assignment for DNN Accelerators using Reinforcement Learning. ConfuciuX is an autonomous framework for optimizing the HW resources assignment of DNN models on the DNN Accelerators. This repository includes ConfuciuX, a two-stage optimization via designed RL-based and GA-based algorithms, a HW cost evaluation environment with a HW cost model, MAESTRO, embedded, other reinforcement learning-based optimizations supported by stable-baselines, and other conventional optimization methods (e.g., bayesian, annealing).
- Clone Repo
git clone https://github.com/maestro-project/confuciux.git
- Create virtual env
conda create --name confxEnv python=3.6
conda activate confxEnv
- Install requirement
pip install -r requirements.txt
- Download cost model and build symbolic link
python build.py
- Run ConfuciuX
./run_ConfX.sh
- Run other RL algorithms
./run_otherRLs.sh
- Run other optimization methods
./run_otherOpts.sh
- fitness: The fitness objective (latency/ energy)
- df: The dataflow strategy
- model: The model to run (available model in data/model)
- cstr: Constraint (area/ power)
- mul: Resource multiplier. The resource ratio, the design is allowed to use.
- For each targeting model and the action space definition, the system compute the maximum possible area/power. The system under design is only allowed to use mul * power_max or mul * area_max.
- epochs: Number of generation for the optimization
- alg: The algorithm to run
- For ConX, choose from [RL, RL_GA]
- For RL, choose from [PPO2, A2C, ACKTR, SAC, TD3, DDPG]
- For optimization methods, choose from [genetic, random, bayesian, anneal, exhaustive]
- outdir: The output result directory
The user can change to different action space if wanted.
User can defined customized action space in src/utils/get_action_space.py
python main.py --help
- Tutorial of ConfuciuX, in IEEE/ACM International Symposium on Microarchitecture (MICRO), 2020 [video]
- Main paper presentation, in IEEE/ACM International Symposium on Microarchitecture (MICRO), 2020 [video]
- Main paper : ConfuciuX: Autonomous Hardware Resource Assignment for DNN Accelerators using Reinforcement Learning, MICRO, 2020 [paper]
- Sheng-Chun (Felix) Kao
- Geonhwa Jeong
- Tushar Krishna
@inproceedings{confuciux,
author = {Sheng{-}Chun Kao and
Geonhwa Jeong and
Tushar Krishna},
title = {ConfuciuX: Autonomous Hardware Resource Assignment for {DNN} Accelerators
using Reinforcement Learning},
booktitle = {53rd Annual {IEEE/ACM} International Symposium on Microarchitecture,
{MICRO}},
pages = {622--636},
publisher = {{IEEE}},
year = {2020},
}