Code Monkey home page Code Monkey logo

confuciux's Introduction

ConfuciuX

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).

ConfuciuX_Framework

Setup

  • 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

  • Run ConfuciuX
./run_ConfX.sh
  • Run other RL algorithms
./run_otherRLs.sh
  • Run other optimization methods
./run_otherOpts.sh

Parameter

  • 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

Action space

The user can change to different action space if wanted.

User can defined customized action space in src/utils/get_action_space.py

To find out all the options
python main.py --help

Resources

  • 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]

Contributor

  • Sheng-Chun (Felix) Kao
  • Geonhwa Jeong
  • Tushar Krishna

Citation

@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},
}

confuciux's People

Contributors

felix0901 avatar tushar-krishna avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.