memtorch

A Simulation Framework for Memristive Deep Learning Systems

https://github.com/coreylammie/memtorch

Science Score: 64.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 8 DOI reference(s) in README
  • Academic publication links
    Links to: arxiv.org, sciencedirect.com, zenodo.org
  • Committers with academic emails
    2 of 5 committers (40.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.3%) to scientific vocabulary

Keywords

deep-learning memristive-devices memristor pytorch-machine-learning rram rram-modeling simulation-framework

Scientific Fields

Mathematics Computer Science - 37% confidence
Last synced: 4 months ago · JSON representation ·

Repository

A Simulation Framework for Memristive Deep Learning Systems

Basic Info
  • Host: GitHub
  • Owner: coreylammie
  • License: gpl-3.0
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 11.8 MB
Statistics
  • Stars: 160
  • Watchers: 12
  • Forks: 56
  • Open Issues: 17
  • Releases: 7
Topics
deep-learning memristive-devices memristor pytorch-machine-learning rram rram-modeling simulation-framework
Created about 6 years ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog Contributing License Citation

README.md


MemTorch

DOI GitHub Discussions CI codecov Code style: black

MemTorch is a Simulation Framework for Memristive Deep Learning Systems, which integrates directly with the well-known PyTorch Machine Learning (ML) library. MemTorch is formally described in MemTorch: An Open-source Simulation Framework for Memristive Deep Learning Systems, which is openly accessible here.

MemTorch: An Open-source Simulation Framework for Memristive Deep Learning Systems has been published as an Original Software Publication (OSP) in the Neurocomputing journal here. We kindly ask that the following BibTeX entry is used to cite MemTorch, if you use it in your work.

Overview

MemTorch: An Open-source Simulation Framework for Memristive Deep Learning Systems

Corey Lammie, Wei Xiang, Bernabé Linares-Barranco, and Mostafa Rahimi Azghadi

Abstract: Memristive devices have shown great promise to facilitate the acceleration and improve the power efficiency of Deep Learning (DL) systems. Crossbar architectures constructed using these Resistive Random-Access Memory (RRAM) devices can be used to efficiently implement various in-memory computing operations, such as Multiply Accumulate (MAC) and unrolled-convolutions, which are used extensively in Deep Neural Networks (DNNs) and Convolutional Neural Networks (CNNs). However, memristive devices face concerns of aging and non-idealities, which limit the accuracy, reliability, and robustness of Memristive Deep Learning Systems (MDLSs), that should be considered prior to circuit-level realization. This Original Software Publication (OSP) presents MemTorch, an open-source framework for customized large-scale memristive DL simulations, with a refined focus on the co-simulation of device non-idealities. MemTorch also facilitates co-modelling of key crossbar peripheral circuitry. MemTorch adopts a modernized soft-ware engineering methodology and integrates directly with the well-known PyTorch Machine Learning (ML) library.

Installation

MemTorch can be installed from source using python setup.py install:

git clone --recursive https://github.com/coreylammie/MemTorch cd MemTorch python setup.py install

or using pip install ., as follows:

git clone --recursive https://github.com/coreylammie/MemTorch cd MemTorch pip install .

If CUDA is True in setup.py, CUDA Toolkit 10.1 and Microsoft Visual C++ Build Tools are required. If CUDA is False in setup.py, Microsoft Visual C++ Build Tools are required.

Alternatively, MemTorch can be installed using the pip package-management system:

pip install memtorch-cpu # Supports normal operation pip install memtorch # Supports CUDA and normal operation

API & Example Usage

A complete API is avaliable here. To learn how to use MemTorch, and to reproduce results of ‘MemTorch: An Open-source Simulation Framework for Memristive Deep Learning Systems’, we provide numerous tutorials in the form of Jupyter notebooks here.

The best place to get started is here.

Current Issues and Feature Requests

Current issues, feature requests and improvements are welcome, and are tracked using: https://github.com/coreylammie/MemTorch/projects/1.

These should be reported here.

Contributing

Please follow the "fork-and-pull" Git workflow:

  1. Fork the repo on GitHub.
  2. Clone the project to your own machine using git clone --recursive.
  3. Enter Development Mode using python setup.py develop in the cloned repository's directory.
  4. Configure git pre-commit, black, isort, and clang-format using pip install pre-commit black isort && pre-commit install and apt install clang clang-format (for linux) or choco install llvm uncrustify cppcheck (for windows).
  5. Commit changes to your own branch.
  6. Push your work back up to your fork.
  7. Submit a Pull request so that your changes can be reviewed.

Be sure to merge the latest from 'upstream' before making a pull request. This can be accomplished using git rebase master.

Citation

To cite MemTorch: An Open-source Simulation Framework for Memristive Deep Learning Systems, use the following BibTex entry:

@Article{Lammie2022, author = {Corey Lammie and Wei Xiang and Bernabé Linares-Barranco and Mostafa Rahimi Azghadi}, title = {{MemTorch: An Open-source Simulation Framework for Memristive Deep Learning Systems}}, journal = {Neurocomputing}, year = {2022}, issn = {0925-2312}, doi = {https://doi.org/10.1016/j.neucom.2022.02.043}, keywords = {Memristors, RRAM, Non-Ideal Device Characteristics, Deep Learning, Simulation Framework}, url = {https://www.sciencedirect.com/science/article/pii/S0925231222002053}, }

To cite this repository, use the following BibTex entry:

@software{corey_lammie_2020_3760696, author={Corey Lammie and Wei Xiang and Bernab\'e Linares-Barranco and Mostafa Rahimi Azghadi}, title={{coreylammie/MemTorch: Initial Release}}, month=Apr., year={2020}, publisher={Zenodo}, doi={10.5281/zenodo.3760695}, url={https://doi.org/10.5281/zenodo.3760696} }

License

All code is licensed under the GNU General Public License v3.0. Details pertaining to this are available at: https://www.gnu.org/licenses/gpl-3.0.en.html.

Owner

  • Name: Corey Lammie
  • Login: coreylammie
  • Kind: user
  • Location: Zürich Switzerland

Electrical Engineer & Computer Engineering PhD Candidate 👨‍🎓

Citation (citation.bib)

@Article{Lammie2022,
  author   = {Corey Lammie and Wei Xiang and Bernabé Linares-Barranco and Mostafa Rahimi Azghadi},
  title    = {{MemTorch: An Open-source Simulation Framework for Memristive Deep Learning Systems}},
  journal  = {Neurocomputing},
  year     = {2022},
  issn     = {0925-2312},
  doi      = {https://doi.org/10.1016/j.neucom.2022.02.043},
  keywords = {Memristors, RRAM, Non-Ideal Device Characteristics, Deep Learning, Simulation Framework},
  url      = {https://www.sciencedirect.com/science/article/pii/S0925231222002053},
}

GitHub Events

Total
  • Issues event: 6
  • Watch event: 27
  • Issue comment event: 4
  • Pull request event: 1
  • Fork event: 6
Last Year
  • Issues event: 6
  • Watch event: 27
  • Issue comment event: 4
  • Pull request event: 1
  • Fork event: 6

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 66
  • Total Committers: 5
  • Avg Commits per committer: 13.2
  • Development Distribution Score (DDS): 0.076
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Corey Lammie c****e@j****u 61
Victor Yon y****r@g****m 2
Philippe Drolet 8****t 1
Nikhil Garg f****7@g****n 1
Jason Eshraghian 4****n 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 81
  • Total pull requests: 67
  • Average time to close issues: 3 months
  • Average time to close pull requests: about 10 hours
  • Total issue authors: 37
  • Total pull request authors: 6
  • Average comments per issue: 2.44
  • Average comments per pull request: 0.51
  • Merged pull requests: 58
  • Bot issues: 0
  • Bot pull requests: 35
Past Year
  • Issues: 4
  • Pull requests: 0
  • Average time to close issues: 3 months
  • Average time to close pull requests: N/A
  • Issue authors: 4
  • Pull request authors: 0
  • Average comments per issue: 1.25
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • coreylammie (20)
  • matifali (6)
  • Philippe-Drolet (4)
  • 24367452 (2)
  • patrick-chen-98 (2)
  • ameyah (2)
  • Cigarskiiler (1)
  • benyamin-kh (1)
  • Jester-2-6 (1)
  • AmD99 (1)
  • vohuynhquangnguyen (1)
  • smbdoggy83 (1)
  • tnsrb02896 (1)
  • Xiaolili1028 (1)
  • RookieoftheYear (1)
Pull Request Authors
  • github-actions[bot] (25)
  • coreylammie (19)
  • victor-yon (2)
  • jeshraghian (1)
  • ykhosravii (1)
  • Philippe-Drolet (1)
  • P1treGuan (1)
Top Labels
Issue Labels
stale (29) enhancement (16) bug (10)
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 327 last-month
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 2
    (may contain duplicates)
  • Total versions: 34
  • Total maintainers: 1
pypi.org: memtorch

A Simulation Framework for Memristive Deep Learning Systems

  • Versions: 17
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 151 Last month
Rankings
Forks count: 7.1%
Stargazers count: 7.3%
Dependent packages count: 10.1%
Average: 13.1%
Downloads: 19.4%
Dependent repos count: 21.5%
Maintainers (1)
Last synced: 4 months ago
pypi.org: memtorch-cpu

A Simulation Framework for Memristive Deep Learning Systems

  • Versions: 17
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 176 Last month
Rankings
Forks count: 7.1%
Stargazers count: 7.3%
Dependent packages count: 10.1%
Average: 13.1%
Downloads: 19.5%
Dependent repos count: 21.5%
Maintainers (1)
Last synced: 4 months ago

Dependencies

docs/requirements.txt pypi
  • matplotlib *
  • nbsphinx *
  • numpy *
  • pandas *
  • seaborn *
  • sklearn *
  • torch >=1.2.0
  • torchvision *
requirements.txt pypi
  • ipython *
  • matplotlib *
  • numpy *
  • pandas *
  • seaborn *
  • sklearn *
  • torch *
  • torchvision *
setup.py pypi
  • ipython *
  • lmfit *
  • matplotlib *
  • numpy *
  • pandas *
  • scipy *
  • seaborn *
  • sklearn *
  • torch >=1.2.0
  • torchvision *
.github/workflows/build_release.yml actions
  • Jimver/cuda-toolkit v0.2.2 composite
  • actions/checkout v2 composite
  • actions/create-release v1 composite
  • actions/setup-python v2 composite
  • actions/upload-artifact v2 composite
  • csexton/release-asset-action v2 composite
.github/workflows/delete_workflow_runs.yml actions
  • Mattraks/delete-workflow-runs main composite
.github/workflows/push_pull.yml actions
  • DoozyX/clang-format-lint-action v0.12 composite
  • actions/checkout v2 composite
  • actions/checkout master composite
  • actions/setup-python v2 composite
  • actions/setup-python master composite
  • codecov/codecov-action v1 composite
  • peter-evans/create-pull-request v3 composite
  • rickstaa/action-black v1 composite