{"id":18846752,"url":"https://github.com/coreylammie/memtorch","last_synced_at":"2025-10-25T14:05:51.408Z","repository":{"id":42084218,"uuid":"215175327","full_name":"coreylammie/MemTorch","owner":"coreylammie","description":"A Simulation Framework for Memristive Deep Learning Systems","archived":false,"fork":false,"pushed_at":"2024-05-13T07:46:33.000Z","size":12423,"stargazers_count":148,"open_issues_count":16,"forks_count":52,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-09T21:15:27.482Z","etag":null,"topics":["deep-learning","memristive-devices","memristor","pytorch-machine-learning","rram","rram-modeling","simulation-framework"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coreylammie.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"citation.bib","codeowners":null,"security":null,"support":null}},"created_at":"2019-10-15T01:08:38.000Z","updated_at":"2025-03-22T08:38:41.000Z","dependencies_parsed_at":"2022-08-12T04:50:15.136Z","dependency_job_id":null,"html_url":"https://github.com/coreylammie/MemTorch","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coreylammie%2FMemTorch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coreylammie%2FMemTorch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coreylammie%2FMemTorch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coreylammie%2FMemTorch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coreylammie","download_url":"https://codeload.github.com/coreylammie/MemTorch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248111973,"owners_count":21049578,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deep-learning","memristive-devices","memristor","pytorch-machine-learning","rram","rram-modeling","simulation-framework"],"created_at":"2024-11-08T03:03:44.909Z","updated_at":"2025-10-25T14:05:46.369Z","avatar_url":"https://github.com/coreylammie.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003cbr\u003e\n  \u003cimg src=\"https://github.com/coreylammie/MemTorch/blob/master/logo.svg?raw=True\" alt=\"MemTorch\" width=\"40%\"/\u003e\n  \u003cbr\u003e\n\u003c/h1\u003e\n\n[![](https://img.shields.io/badge/python-3.6+-blue.svg)](https://www.python.org/)\n![](https://img.shields.io/badge/license-GPL-blue.svg)\n![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3760695.svg)\n[![GitHub Discussions](https://img.shields.io/badge/chat-discussions-ff69b4)](https://github.com/coreylammie/MemTorch/discussions/97)\n![](https://readthedocs.org/projects/pip/badge/?version=latest)\n[![CI](https://github.com/coreylammie/MemTorch/actions/workflows/push_pull.yml/badge.svg)](https://github.com/coreylammie/MemTorch/actions/workflows/push_pull.yml)\n[![codecov](https://codecov.io/gh/coreylammie/MemTorch/branch/master/graph/badge.svg)](https://codecov.io/gh/coreylammie/MemTorch)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\nMemTorch 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](https://arxiv.org/abs/2004.10971). \n\n_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](https://doi.org/10.1016/j.neucom.2022.02.043). We kindly ask that the following [BibTeX entry](https://github.com/coreylammie/MemTorch/blob/master/citation.bib?raw=True) is used to cite MemTorch, if you use it in your work.\n\n![Overview](https://github.com/coreylammie/MemTorch/blob/master/overview.svg)\n\n## MemTorch: An Open-source Simulation Framework for Memristive Deep Learning Systems\n\n\u003e Corey Lammie, Wei Xiang, Bernabé Linares-Barranco, and Mostafa Rahimi Azghadi\u003cbr\u003e\n\u003e\n\u003e **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._\n\n## Installation\n\nMemTorch can be installed from source using `python setup.py install`:\n\n```\ngit clone --recursive https://github.com/coreylammie/MemTorch\ncd MemTorch\npython setup.py install\n```\n\nor using `pip install .`, as follows:\n\n```\ngit clone --recursive https://github.com/coreylammie/MemTorch\ncd MemTorch\npip install .\n```\n\n_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._\n\nAlternatively, MemTorch can be installed using the _pip_ package-management system:\n\n```\npip install memtorch-cpu # Supports normal operation\npip install memtorch # Supports CUDA and normal operation\n```\n\n## API \u0026 Example Usage\n\nA complete API is avaliable [here](https://memtorch.readthedocs.io/). 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](https://memtorch.readthedocs.io/en/latest/tutorials.html).\n\nThe best place to get started is [here](https://colab.research.google.com/github/coreylammie/MemTorch/blob/master/memtorch/examples/Tutorial.ipynb).\n\n## Current Issues and Feature Requests\n\nCurrent issues, feature requests and improvements are welcome, and are tracked using: https://github.com/coreylammie/MemTorch/projects/1.\n\nThese should be reported [here](https://github.com/coreylammie/MemTorch/issues).\n\n## Contributing\n\nPlease follow the \"fork-and-pull\" Git workflow:\n\n1.  **Fork** the repo on GitHub.\n2.  **Clone** the project to your own machine using `git clone --recursive`.\n3.  **Enter Development Mode** using `python setup.py develop` in the cloned repository's directory.\n4.  **Configure** `git pre-commit`, `black`, `isort`, and `clang-format` using `pip install pre-commit black isort \u0026\u0026 pre-commit install` and `apt install clang clang-format` (for linux) or `choco install llvm uncrustify cppcheck` (for windows).\n5.  **Commit** changes to your own branch.\n6.  **Push** your work back up to your fork.\n7.  Submit a **Pull request** so that your changes can be reviewed.\n\n_Be sure to merge the latest from 'upstream' before making a pull request_. This can be accomplished using `git rebase master`.\n\n## Citation\n\nTo cite _MemTorch: An Open-source Simulation Framework for Memristive Deep Learning Systems_, use the following BibTex entry:\n\n```\n@Article{Lammie2022,\n  author   = {Corey Lammie and Wei Xiang and Bernabé Linares-Barranco and Mostafa Rahimi Azghadi},\n  title    = {{MemTorch: An Open-source Simulation Framework for Memristive Deep Learning Systems}},\n  journal  = {Neurocomputing},\n  year     = {2022},\n  issn     = {0925-2312},\n  doi      = {https://doi.org/10.1016/j.neucom.2022.02.043},\n  keywords = {Memristors, RRAM, Non-Ideal Device Characteristics, Deep Learning, Simulation Framework},\n  url      = {https://www.sciencedirect.com/science/article/pii/S0925231222002053},\n}\n```\n\nTo cite this repository, use the following BibTex entry:\n\n```\n@software{corey_lammie_2020_3760696,\n  author={Corey Lammie and Wei Xiang and Bernab\\'e Linares-Barranco and Mostafa Rahimi Azghadi},\n  title={{coreylammie/MemTorch: Initial Release}},\n  month=Apr.,\n  year={2020},\n  publisher={Zenodo},\n  doi={10.5281/zenodo.3760695},\n  url={https://doi.org/10.5281/zenodo.3760696}\n}\n```\n\n## License\n\nAll 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.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoreylammie%2Fmemtorch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoreylammie%2Fmemtorch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoreylammie%2Fmemtorch/lists"}