Git Product home page Git Product logo

accelergy's Introduction

Accelergy (v4: CiMLoop)

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

Examples: https://github.com/Accelergy-Project/timeloop-accelergy-exercises

Contributor Covenant Open Source Love png1

Update v0.4 (CiMLoop)

  • New plug-in interface
  • New arithmetic parsing system
  • 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

See the creating-plug-ins tutorial in the exercises repository.

Citation

Please cite the following:

  • Y. N. Wu, J. S. Emer, and V. Sze, “Accelergy: An architecture-level energy estimation methodology for accelerator designs,” in 2019 IEEE/ACM International Conference on Computer-Aided Design (ICCAD), 2019, pp. 1–8.
  • T. Andrulis, J. S. Emer, and V. Sze, “CiMLoop: A flexible, accurate, and fast compute-in-memory modeling tool,” in 2024 IEEE International Symposium on Performance Analysis of Systems and Software (ISPASS), 2024.

Or use the following BibTeX:

@inproceedings{accelergy,
  author      = {Wu, Yannan Nellie and Emer, Joel S and Sze, Vivienne},
  booktitle   = {2019 IEEE/ACM International Conference on Computer-Aided Design (ICCAD)},
  title       = {Accelergy: An architecture-level energy estimation methodology for accelerator designs},
  year        = {2019},
}
@inproceedings{cimloop,
  author      = {Andrulis, Tanner and Emer, Joel S. and Sze, Vivienne},
  booktitle   = {2024 IEEE International Symposium on Performance Analysis of Systems and Software (ISPASS)}, 
  title       = {{CiMLoop}: A Flexible, Accurate, and Fast Compute-In-Memory Modeling Tool}, 
  year        = {2024},
}

accelergy's People

Contributors

frwang96 avatar nellie-wu avatar poant avatar swimmingsage avatar tandruli avatar tanner-andrulis avatar vmiheer avatar wsw9 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

accelergy's Issues

Quadratic interpolation function

I wonder what equation are you using to do the quad interpolation @ helper_functions.py Line 23?!
The equation does not seem right to me!

DRAM energy in cacti_wrapper.py

The cacti_wrapper.py has references for DRAM energies of LPDDR and GDDR5. For LPDDR4, it is listed as "public data" and no references for rest of the memory types. Is it possible to get the references from where the energy formulas for LPDDR4, DDR3 and HBM2 were derived from?

Thank you

how do i get to action_counts info?

To use accelergy, action_count.yaml is required. Is there a way to automatically extract this?
In the example it has already been applied as a file.
But in the general case, I think it should be automatically extracted.
(I wonder if it was written by hand)

Missing primitive component class

Fresh install no longer works.

AssertionError: No primitive component class found, please check if the paths in config file are correct

Support of Eyeriss-V2 architecture

Hi,
Thanks for releasing such useful tools.
But it seems that the simple Mesh XY-NOC cannot support the implementation of the EyerissV2 architecture.
Could you add the Eyeriss-V2 architecture definition?

Thanks.

A Qeustion about Idle energy consumption equation

I've read the accelergy cacti energy calculation equation in accelergy-cacti-plug-in/cacti_wrapper.py

In line 224-227, the actual idle energy (the total leakage energy consumption) is obtained by parsing the cacti output.
In this equation, is there any reason for multiplying 'Random cycle time'?

224 standby_power_in_w = float(row[cacti_entry]) * 10 ** -3 # mW -> W
225 idle_energy_per_bank_in_j = standby_power_in_w * float(row[' Random cycle time (ns)']) * 10 ** -9
226 idle_energy_per_bank_in_pj = idle_energy_per_bank_in_j * 10 ** 12
227 energy = idle_energy_per_bank_in_pj * n_banks

Accuracy for table-based plugin not updating

In timeloop-accelergy/accelergy-timeloop-infrastructure/src/accelergy-table-based-plug-ins/set_of_table_templates/test.table.yaml I have changed the accuracy to 80 so these values get precedence but even after running pip install . in accelergy-table-based-plug-ins directory (tried running pip install . in accelergy directory too) the value in accelergy log is not changing.
Am i missing a step here?

2023-11-17 00:49:38 DEBUG Why plug-ins did not estimate:
2023-11-17 00:49:38 DEBUG | Aladdin_table with accuracy 70% estimating accuracy: No messages found.
2023-11-17 00:49:38 DEBUG | dummy_table with accuracy 1% estimating accuracy: No messages found.
2023-11-17 00:49:38 DEBUG | table-based-plug-ins with accuracy 0% estimating accuracy: Accuracy is 0%. Not supported.
2023-11-17 00:49:38 DEBUG | CACTI with accuracy 0% estimating accuracy: Class name wire not supported. Supported classes: ['SRAM', 'cache', 'DRAM']

Wire energy

Hello,

First of all contratulations for your work. I think the community really lacked this kind of framework so far.

I have been looking up accelergy and also its integration with CACTI or ALADIN. However, none of them report the energy consumed by a wire. I have seen one number in the table-based template, but it looks a random number to provide the user the capacity to change it.

My question is, do you know any source to get the energy consumption of a wire given a certain length?

Thank you very much

Outdated Example

The reference output and v 0.4 Accelergy are not similar. Could you please update the examples in this repository to match the v 0.4 version style? I haven't been able to find any specific resources for the new syntax and a more detailed change list. It would be greatly appreciated if you could add them.

Query on using Timeloop and Accelergy

Hi,

Just wanted to check in if there's a way for us to load the weight of pre-trained models onto one of the yaml files and use them to perform the necessary analysis on the architecture and mapping?

If yes, could you please redirect me to the relevant documents?

Thanks!

How to define a large SRAM?

I need to define a large SRAM of 512 MB for my design. I was copying the example of simple_weight_stationary architecture where there is a 128kB SRAM. Then I set "n_instances" to 4098 to make the total SRAM size to 512 MB. However, this leads to a huge leakage energy and I'm observing that only one instance is being used always even though the required data size (inputs, outputs, and weights) is much bigger than 128kB.

Could you kindly suggest the best way to define such SRAMs?

Not able to install

Hi,

I am not able to install accelergy following the instructions in the readme. I have installed all the dependencies but I am stuck after that. I tried python setup.py but it asks for some command, which I am unsure of.

Can you please guide me?

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.