• Stars
    star
    124
  • Rank 288,207 (Top 6 %)
  • Language
    Python
  • License
    MIT License
  • Created over 5 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Accelergy is an energy estimation infrastructure for accelerator energy estimations

Accelergy infrastructure (version 0.4)

An infrastructure for architecture-level energy/area estimations of accelerator designs. Project website: http://accelergy.mit.edu

Contributor Covenant Open Source Love png1

Update v0.4

  • New plug-in interface
  • Arithmetic parsing supports full-fledged Python code
  • New logging system
  • Tests
  • Bug fixes

Update v0.3

  • Addition of area reference table generation
  • Updated command line flags
  • The ERT and energy_estimation output format has been updated.

Get started

  • Infrastructure tested on RedHat Linux, Ubuntu, MacOS

Install the package

   <pip_exec> install .
   # note:<pip_exec> is different for different python versions, e.g., pip3      
  • Please make sure your python bin, e.g.,~/.local/bin , is appropriately added to $PATH
  • A new command: accelergy should be available in your python bin
  • accelergy -h shows the help message for the command

Run an example evaluation

Area and Energy Estimations

Accelergy is capable of generating energy and area estimations of various accelerator designs. The following example command generates the energy and area estimation of the design and saves the outputs in the ../output folder.

cd examples/hierarchy/input
accelergy -o ../output/ *.yaml components/*.yaml -v 1

Input flags

Accelergy accepts several optional flags:

  • -o or --output : specifies the output directory. Default is current directory
  • -p or --precision : specifies the precision of the calculated ERTs and estimations. Default is 3.
  • -f or --output_files: specifies a list of desired output files. Default is ['all']. Options include: flattened_arch, ERT, ERT_summary, ART, ART_summary, energy_estimation.
  • -v or --verbose: once set to 1, it allows Accelergy to output the more detailed descriptions of the desired outputs.

Input files

There are three types of input files:

  • architecture description (unique)
    artchitecture_description:  # required top-key
      version: 0.4              # required version number
      subtree:                  # required architecture tree root
        ...
  • compound component class description (can be composed of multiple files)
    compound_components: # required top-key
      version: 0.4       # required version number
      classes:           # required list identifier
        - name: ...      # various compound component classes specified as a list
        ...
  • action counts (can be composed of multiple files)
    compound_components: # required top-key
      version: 0.4       # required version number
      subtree:           # required architecture tree root
        - name: ...      # various action counts specified as a list
        ...

Accelergy parses the input files and decide what operations to perform:

  • Providing all three types of inputs will allow Accelergy to generate the ERTs/ARTs for the components in the design, and perform energy estimations using the workload-generated action counts.

  • Providing just the architecture description and compound component class description allows Accelergy to generate the ERTs/ARTs for the components in the design.

  • Providing the generated ERTs and the action counts allows Accelergy to directly generate energy estimations if the components in the design.

File Structure

  • accelergy : package source
  • share: contains directories for default primitive component libraries and dummy estimation pug-ins
  • examples: example designs and action counts for Accelergy to evaluate
  • test: tests

Documentation

accelergy_config.yaml

accelergy-config.yaml is the required config file for Accelergy to:

  • locate its estimator plug-ins
  • locate its primitive components

At the beginning of accelergy run, Accelergy will automatically search for accelergy_config.yaml first at ./ and then at $HOME/.config/accelergy/ the file will be loaded if found, otherwise, Accelergy will create a default accelergy_config.yaml at $HOME/.config/accelergy/, which points to the root directories of the default estimator plug-in directory and primitive component library directory.

Primitive component library files need be end with .lib.yaml for Accelergy to locate it. find correspondence.

API for Estimation Plug-ins

  • Users need to specify the root directory in config file in the format below. Accelergy does a recursive search to locate the estimator plug-ins according to the provided root directories
estimator_plug_ins:
  - root0
  - root1
  • .estimator.yaml file needs to be specified for Accelergy to locate the estimator, and the file should have the following format
  version: <version_number> 
  estimator_plug_in_name:
    module:  <wrapper file name>
    class:   <class to be imported>
    parameter: <initialization values>  #optional, only specified if the estimator plug-in needs input for __init__()
    
  • A python module is required to be present in the same folder as the .estimator.yaml file
    • The python file should contain a class as specified in .estimator.yaml
    • There are two required class functions, i.e., the interface function calls. Accelergy specifically calls these two functions to check if the estimator plug-in can be used for a specific primitive component
      • primitive_action_supported(self, interface)

        • parameters: interface is a dictionary that contains the following four keys:
          • class_name, type string
          • attributes, type dictionary {attribute_name: attribute_value}
          • action_name, type string
          • arguments, type dictionary {argument_name: argument_value}
            • None if the action does not need arguments
        • return: integer accuracy if supported (0 is not supported)
      • estimate_energy(self, interface)

        • parameters: same interface
        • return: the energy/action value
    • Accelergy is unaware of the other functions that are implemented in this module

More Repositories

1

timeloop-accelergy-exercises

Exercises for exploring the Fibertree, Timeloop and Accelergy tools
Jupyter Notebook
82
star
2

accelergy-timeloop-infrastructure

Linux docker for the DNN accelerator exploration infrastructure composed of Accelergy and Timeloop
Dockerfile
44
star
3

micro22-sparseloop-artifact

MICRO22 artifact evaluation for Sparseloop
Jupyter Notebook
36
star
4

timeloop-accelergy-tutorial

Docker container with tools for the Timeloop/Accelergy tutorial
Shell
23
star
5

processing-in-memory-design

23
star
6

pytorch2timeloop-converter

Python
9
star
7

timeloop-python

Python wrapper for the timeloop project.
Python
7
star
8

accelergy-cacti-plug-in

standalone cacti estimator plug-in for accelergy
Python
7
star
9

timeloop-accelergy-pytorch

Docker for running jupyter notebooks with timeloop, accelergy and pytorch
Dockerfile
5
star
10

accelergy-neurosim-plug-in

C++
4
star
11

baseline-designs

A collection of Baseline designs for evaluation with Timeloop and Accelergy
Jupyter Notebook
3
star
12

accelergy-table-based-plug-ins

An entry point for creating various table-based plug-ins for the Accelergy estimation framework
Python
3
star
13

accelergy-plug-in-template

An skeleton template as a starting point for constructing an Accelergy plug-in
3
star
14

gem5-accelergy-connector

Python
2
star
15

accelergy-library-plug-in

A library of components from published works
Python
2
star
16

accelergy-adc-plug-in

Python
2
star
17

accelergy-mcpat-plug-in

Python
2
star
18

timeloopfe

A Python front-end interface to the Timeloop infrastructure
Python
1
star
19

accelergy-nvmexplorer-plug-in

1
star