Giter VIP home page Giter VIP logo

def's Introduction

DEF: Differential Encoding of Featuremaps for Low Power Convolutional Neural Network Accelerators

DEF is an activity coding scheme that reduces activity along the memory bus for CNN accelerators, reducing dynamic power consumption. This repository contains both software and hardware implementations of the coding scheme, as well as scripts for evaluating DEF against other coding schemes. This work was accepted for ASP-DAC 2021, and the paper can be found here.

Setup

DEF requires the following:

  • python>=3.6
  • chisel3

To setup the python environment, run use the requirements.txt file with pip.

python -m pip install -r requirements 

To install chisel3, follow the steps outlined here.

Simulation

This repo contains software implementation of popular coding schemes alongside DEF. These are used to simulate activity and statistics for streaming featuremaps to/from memory. The following coding schemes implemented are:

ABE Adaptive Bus Encoding
AWR Adaptive Word Re-ordering
BI Bus Invert coding
Huffman Huffman encoding
PBM Probability Based Mapping
RLE Run Length Encoding

To evaluate the coding schemes, you can use the example script, scripts/run_featuremap.py. This runs all coding schemes, generating a report. Example usage is as follows:

python -m scripts.run_featuremap -f {featuremap.h5} -o {output path} -b {bitwidth}

Example featuremap files are found in the featuremaps folder. They contain each featuremap of a given network, for a random batch of input images.

Hardware

A hardware implementation of DEF is found in the hw folder. Use the hw/build_def.sh script to generate verilog files. You will need to give the bitwidth of the featuremap words and the channel dimension of the featuremap.

The verilog files are in hw/impl.

./build_def.sh {channels} {bitwidth}

Citation

If you use DEF in your work, please cite as follows:

@inproceedings{montgomerie-corcoran_def_2021,
	title = {DEF: Differential Encoding of Featuremaps for Low Power Convolutional Neural Network Accelerators},
	booktitle = {2021 26th Asia and South Pacific Design Automation Conference (ASP-DAC)},
	publisher = {ACM},
	author = {Montgomerie-Corcoran, A. and Bouganis, C.},
	year = {2021},
}

Feel free to post an issue if you have any questions or problems!

def's People

Contributors

alexmontgomerie avatar

Watchers

 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.