Giter VIP home page Giter VIP logo

ma3mool / goldeneye Goto Github PK

View Code? Open in Web Editor NEW
19.0 3.0 8.0 89 KB

GoldenEye is a functional simulator with fault injection capabilities for common and emerging numerical formats, implemented for the PyTorch deep learning framework.

Home Page: https://goldeneyedocs.readthedocs.io/en/stable/

License: MIT License

Python 87.00% Shell 8.24% C++ 4.60% Dockerfile 0.16%
accuracy deep-learning floating-point goldeneye number-format pytorch quantization reliability resilience adaptive-float

goldeneye's Introduction

Goldeneye

BackgroundUsageCodeAcknowledgementsCitationLicense

Background

GoldenEye is a functional simulator with fault injection capabilities for common and emerging numerical formats, implemented for the PyTorch deep learning framework. GoldenEye provides a unified framework for numerical format evaluation of DNNs, including traditional number systems such as fixed and floating point, as well as recent DNN-inspired formats such as block floating point and AdaptivFloat. Additionally, GoldenEye enables single- and multi- bit flips at various logical and functional points during a value’s lifetime for resiliency analysis, including for the first time attention to numerical values’ hardware metadata. GoldenEye is an easy-to-use, extensible, versatile, and fast tool for dependability research and future DNN accelerator design.

Usage

Take a look at our documentation here.

Installing

Ubuntu with Sudo Privileges

  1. Recursively clone the goldeneye repository.
git clone --recurse-submodules [email protected]:ma3mool/goldeneye.git
  1. Download ninja-build which is needed for qtorch.
sudo apt install ninja-build
  1. Download the other project dependencies. Please make sure you are inside the goldeneye folder when applying this command.
pip install -r requirements.txt
  1. Setup environment variable (replace with the directory where the imagenet dataset is downloaded).
ML_DATASETS=/dir/to/imagenet/

Docker

  1. Recursively clone the goldeneye repository.
git clone --recurse-submodules [email protected]:ma3mool/goldeneye.git
  1. Pull the goldeneye docker image and rename it to simply the next steps
docker pull goldeneyetool/goldeneye:latest
docker image tag goldeneyetool/goldeneye goldeneye
  1. Within the goldeneye folder, run the shell on the pulled docker image. Make sure to replace [/path/to/imagenet] with the actual path to your downloaded imagenet dataset.
cd goldeneye
docker run -ti 
    --mount type=bind,source=`pwd`/src/,target=/src 
    --mount type=bind,source=`pwd`/val/,target=/val 
    --mount type=bind,source=`pwd`/scripts/,target=/scripts 
    --mount type=bind,source=[/path/to/imagenet],target=/datasets/imagenet 
    goldeneye

Testing

pytest val/test_num_sys.py

Code

Structure

The scripts folder includes wrappers around the goldeneye framework to simplify its use. The src folder contains all of the goldeneye core logic such as number system implementation and error injection routines. The val folder is used for unit-testing the code. You can run it using pytest to check that the installation process was successful.

Acknowledgements

  • Tarek Aloui (Harvard)
  • David Brooks (Harvard)
  • Abdulrahman Mahmoud (Harvard)
  • Joshua Park (Harvard)
  • Thierry Tambe (Harvard)
  • Gu-Yeon Wei (Harvard)

Citation

If you use or reference Goldeneye, please cite:

@INPROCEEDINGS{GoldeneyeMahmoudTambeDSN2022,
author={A. {Mahmoud} and T. {Tambe} and T. {Aloui} and D. {Brooks} and G. {Wei}},
booktitle={2022 52nd Annual IEEE/IFIP International Conference on Dependable Systems and Networks (DSN)},
title={GoldenEye:  A Platform for Evaluating Emerging Data Formats in DNN Accelerators},
year={2022},
}

License

MIT License

goldeneye's People

Contributors

jhjpark avatar ma3mool avatar tarekaloui avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

goldeneye's Issues

possible bug in block fp implementation

mant_adj = mant / power_exp_diff

After shifting the mantissa bits in the above line, the values might become < 1. So the exponents after reconstruction are no longer the same (one can check this after extracting the exponents after line 363 of the reconstructed tensor).

You probably need mant_adj[mant_adj < 1.0] = 1.0 after the above line.

No valid requirements.txt

As stated in the title. After I clone the repo and I found that there is only requirements.txt under pytorchfi/. After I install the dependencies in requirements.txt and installed qtorch 0.3.0. The test program give me a huge number of Error messages. My environment is ubuntu 20.04 with a plane conda environment for this repo. The python version is 3.6. Thank you!

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.