Skip to content
Proyectos

Acerca de

Un simulador del chip Eyeriss, un acelerador de CNN investigado por el MIT, y el nuevo framework de DNN Hive.

Otros proyectos

Cómo se miden estas cifras

Crecimiento de estrellas medido

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
Recopilando historial

Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.

README.md

Original

Eyeriss Chip simulator

fully powered by Jialinli

What's Eyeriss chip ?

  • Eyeriss is an AI accelerator, researched by Massachusetts Institute of Technology
  • EyerissF is a python-made Eyeriss simulator, aiming to test eyeriss capability.

Vital reference from MIT !

  1. Eyeriss: An Energy-Efficient Reconfigurable Accelerator for Deep Convolutional Neural Networks [ISSCC 2016] here
  2. Eyeriss: An Energy-Efficient Reconfigurable Accelerator for Deep Convolutional Neural Networks slides [ISSCC 2016] here
  3. Hardware Architectures for Deep Neural Networks [ISCA 2017] here
  4. Eyeriss: A Spatial Architecture for Energy-Efficient Dataflow for Convolutional Neural Networks [ISCA 2016] here
  5. DNN Accelerator Architectures slides [ISCA 2017] here

Eyeriss brief introduction

Eyeriss is an accelerator that can deliver state-of-the-art accuracy with minimum energy consumption in the system (including DRAM) in real-time, by using two key methods:

  1. efficient dataflow and supporting hardware (spatial array, memory hierarchy and on-chip network) that minimize data movement by exploiting data reuse and support different shapes;
  2. exploit data statistics to minimize energy through zeros skipping/gating to avoid unnecessary reads and computations; and data compression to reduce off-chip memory bandwidth, which is the most expensive data movement.

How can we modify CNN calculation?

From CNN defined calculation to new CNN Calculation, via new ASIC chip, we found a few processes could be combined or run in parallel.

  • high parallelism

This pic shows the dataflow within the array for filter weights, image values and partial sums. If the filter height (R) equals the number of rows in the array , the logical dataflow would be as follows:

  1. filter weights are fed from the buffer into the left column of the array (one filter row per PE) and the filter weights move from left to right within the array.
  2. image values are fed into the left column and bottom row of the array (one image row per PE) and the image values move up diagonally.
  3. partial sums for each output row move up vertically, and can be read out of the top row at the end of the computational pass. If the partial sums are used in the next pass, they are fed into the bottom row of the array from the buffer at the beginning of the next computational pass.
  • data reuse
    • Convolutional reuse
    • Image reuse
    • Filter reuse

While existing dataflows attempt to maximize certain types of input data reuse or minimize the psum accumulation cost, they fail to take all of them into account at once. This results in inefficiency when the layer shape or hardware resources vary. Therefore, it would be desirable if the dataflow could adapt to different conditions and optimize for all types of data movement energy costs. In this section, we will introduce a novel dataflow, called row stationary (RS) that achieves this goal. The RS dataflow is a key feature of the Eyeriss architecture, which has been implemented in a fabricated chip.

Eyeriss structure

How can I leverage THIS REPOSITORY?

Quick start

Install Python 3 with numpy, matplotlib and Pillow (pip install numpy matplotlib pillow), then run python3 Lenet5_Hive.py from the repository root. It runs Pic/01.png through a LeNet-5 on the simulator and prints the index of the largest output. The weights are untrained random integers made by filterReset.py, so the printed digit is not a real recognition result.

File structure

Hive platform

Hive is a new CNN platform based on Eyeriss chip or EyerissF simulator, which contains basic funxs to establish CNN. (NOT "APACHE HIVE") Eyeriss or EyerissF just only an ASIC chip and python-made simulator and can not achieve any tasks. In order to do pattern recognition tasks, it must have a mature platform to support standard input data. Hive is aiming to transform 3-channel jpg pics to input Eyeriss supported stream and decompress results.

If u wanna use hive to create CNN, u should do following steps:

  1. init EyerissF simulator
from EyerissF import EyerissF
ef = EyerissF()
  1. init Hive
from Hive import Hive
hive = Hive(ef)  # auto mode (default), used in the examples below; for mode="manual" see Lenet5_Hive_Manuel.ipynb

Other funxs from Hive

  1. convolution ( Eyeriss Supported)
# pics and filters are lists of 2-D integer arrays: one pic with several filters, or several pics with one filter
# returns the output maps, compressed
pics = hive.Conv2d(pics, filters, len(pics), len(filters))
  1. Pooling
hive.Pooling(hive.Decompress(pics))
  1. FullConnect
hive.FullConnect(vector,vector2)

contact me

please Email [email protected] or [email protected]

REALLY IMPORTANT

Energy model IS NOT finished YET

last updated

2019 Sep 23rd

future

  1. changing name in case of any misunderstanding with 'Apache Hive'
  2. overriding file constructions to make basic code in src folder
  3. add new functions in energy stream calculation between different storage layers

Explorar proyectos relacionados

Cargando…