nir


Namenir JSON
Version 1.0.4 PyPI version JSON
download
home_pageNone
SummaryNeuromorphic Intermediate Representation
upload_time2024-04-24 15:31:03
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseNone
keywords neuromorphic intermediate representation
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <picture>
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/neuromorphs/NIR/raw/main/docs/logo_dark.png">
<img alt="NIR Logo" src="https://github.com/neuromorphs/NIR/raw/main/docs/logo_light.png">
</picture>

# NIR - Neuromorphic Intermediate Representation

NIR is a set of computational primitives, shared across different neuromorphic frameworks and technology stacks.
**NIR is currently supported by 7 simulators and 4 hardware platforms**, allowing users to seamlessly move between any of these platforms.
The goal of NIR is to decouple the evolution of neuromorphic hardware and software, ultimately increasing the interoperability between platforms and improving accessibility to neuromorphic technologies.

## Installation
NIR is installable via [pip](https://pypi.org/)
```bash 
pip install nir
```

Check your [local framework](https://nnir.readthedocs.io/en/latest/support.html) for NIR support.

## Usage
> Read more in our [documentation about NIR usage](https://nnir.readthedocs.io/en/latest/usage.html)

To end-users, NIR is just a declarative format that sits between formats and will hopefully be as invisible as possible.
However, it is possible to export Python objects or NIR files.

```python
import nir
# Write to file
nir.write("my_graph.nir", nir_graph) 

# Read file
imported_graph = nir.read("my_graph.nir")
```

## About NIR
> Read more in our [documentation about NIR primitives](https://nnir.readthedocs.io/en/latest/primitives.html)

On top of popular primitives such as convolutional or fully connected/linear computations, we define additional compuational primitives that are specific to neuromorphic computing and hardware implementations thereof. 
Computational units that are not specifically neuromorphic take inspiration from the Pytorch ecosystem in terms of naming and parameters (such as Conv2d that uses groups/strides).


## Frameworks that currently support NIR

| **Framework** | **Write to NIR** | **Read from NIR** | **Examples** |
| --------------- | :--: | :--: | :------: |
| [Lava-DL](https://github.com/lava-nc/lava-dl) | ✓ | ⬚ | [Lava/Loihi examples](https://nnir.readthedocs.io/en/latest/examples/lava/nir-conversion.html) |
| [Nengo](https://nengo.ai) | ✓ | ✓ | [Nengo examples](https://nnir.readthedocs.io/en/latest/examples/nengo/nir-conversion.html) |
| [Norse](https://github.com/norse/norse) | ✓ | ✓ | [Norse examples](https://nnir.readthedocs.io/en/latest/examples/norse/nir-conversion.html) |
| [Rockpool](https://rockpool.ai) ([SynSense Xylo chip](https://www.synsense.ai/products/xylo/)) | ✓ | ✓ | [Rockpool/Xylo examples](https://nnir.readthedocs.io/en/latest/examples/rockpool/nir-conversion.html)
| [Sinabs](https://sinabs.readthedocs.io) ([SynSense Speck chip](https://www.synsense.ai/products/speck-2/)) | ✓ | ✓ | [Sinabs/Speck examples](https://nnir.readthedocs.io/en/latest/examples/sinabs/nir-conversion.html) |
| [snnTorch](https://github.com/jeshraghian/snntorch/) | ✓ | ✓ | [snnTorch examples](https://nnir.readthedocs.io/en/latest/examples/snntorch/nir-conversion.html) |
| [SpiNNaker2](https://spinncloud.com/portfolio/spinnaker2/) | ⬚ | ✓ | [SpiNNaker2 examples](https://nnir.readthedocs.io/en/latest/examples/spinnaker2/import.html) |
| [Spyx](https://github.com/kmheckel/spyx) | ✓ | ✓ | [Spyx examples](https://nnir.readthedocs.io/en/latest/examples/spyx/conversion.html)


## Acknowledgements
This work was originally conceived at the [Telluride Neuromorphic Workshop 2023](tellurideneuromorphic.org) by the authors below (in alphabetical order):
* [Steven Abreu](https://github.com/stevenabreu7)
* [Felix Bauer](https://github.com/bauerfe)
* [Jason Eshraghian](https://github.com/jeshraghian)
* [Matthias Jobst](https://github.com/matjobst)
* [Gregor Lenz](https://github.com/biphasic)
* [Jens Egholm Pedersen](https://github.com/jegp)
* [Sadique Sheik](https://github.com/sheiksadique)
* [Peng Zhou](https://github.com/pengzhouzp)

If you use NIR in your work, please cite the [following arXiv preprint](https://arxiv.org/abs/2311.14641)

```
@inproceedings{NIR2023,
  title={Neuromorphic Intermediate Representation: A Unified Instruction Set for Interoperable Brain-Inspired Computing},
  author={Jens E. Pedersen and Steven Abreu and Matthias Jobst and Gregor Lenz and Vittorio Fra and Felix C. Bauer and Dylan R. Muir and Peng Zhou and Bernhard Vogginger and Kade Heckel and Gianvito Urgese and Sadasivan Shankar and Terrence C. Stewart and Jason K. Eshraghian and Sadique Sheik},
  year={2023},
  doi={https://doi.org/10.48550/arXiv.2311.14641}
  archivePrefix={arXiv},
  primaryClass={cs.NE}
}
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "nir",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "neuromorphic, intermediate, representation",
    "author": null,
    "author_email": "Steven Abreu <s.abreu@rug.nl>, Felix Bauer <felix.bauer@synsense.ai>, Jason Eshraghian <jeshragh@ucsc.edu>, Matthias Jobst <matthias.jobst2@tu-dresden.de>, Gregor Lenz <mail@lenzgregor.com>, Jens Egholm Pedersen <jens@jepedersen.dk>, Sadique Sheik <sadique.sheik@synsense.ai>",
    "download_url": "https://files.pythonhosted.org/packages/e3/17/11f1f042a8b1e9c86773f2f423340bd5388d6498552fe07c0700e3f8c00f/nir-1.0.4.tar.gz",
    "platform": null,
    "description": "<picture>\n<source media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/neuromorphs/NIR/raw/main/docs/logo_dark.png\">\n<img alt=\"NIR Logo\" src=\"https://github.com/neuromorphs/NIR/raw/main/docs/logo_light.png\">\n</picture>\n\n# NIR - Neuromorphic Intermediate Representation\n\nNIR is a set of computational primitives, shared across different neuromorphic frameworks and technology stacks.\n**NIR is currently supported by 7 simulators and 4 hardware platforms**, allowing users to seamlessly move between any of these platforms.\nThe goal of NIR is to decouple the evolution of neuromorphic hardware and software, ultimately increasing the interoperability between platforms and improving accessibility to neuromorphic technologies.\n\n## Installation\nNIR is installable via [pip](https://pypi.org/)\n```bash \npip install nir\n```\n\nCheck your [local framework](https://nnir.readthedocs.io/en/latest/support.html) for NIR support.\n\n## Usage\n> Read more in our [documentation about NIR usage](https://nnir.readthedocs.io/en/latest/usage.html)\n\nTo end-users, NIR is just a declarative format that sits between formats and will hopefully be as invisible as possible.\nHowever, it is possible to export Python objects or NIR files.\n\n```python\nimport nir\n# Write to file\nnir.write(\"my_graph.nir\", nir_graph) \n\n# Read file\nimported_graph = nir.read(\"my_graph.nir\")\n```\n\n## About NIR\n> Read more in our [documentation about NIR primitives](https://nnir.readthedocs.io/en/latest/primitives.html)\n\nOn top of popular primitives such as convolutional or fully connected/linear computations, we define additional compuational primitives that are specific to neuromorphic computing and hardware implementations thereof. \nComputational units that are not specifically neuromorphic take inspiration from the Pytorch ecosystem in terms of naming and parameters (such as Conv2d that uses groups/strides).\n\n\n## Frameworks that currently support NIR\n\n| **Framework** | **Write to NIR** | **Read from NIR** | **Examples** |\n| --------------- | :--: | :--: | :------: |\n| [Lava-DL](https://github.com/lava-nc/lava-dl) | \u2713 | \u2b1a | [Lava/Loihi examples](https://nnir.readthedocs.io/en/latest/examples/lava/nir-conversion.html) |\n| [Nengo](https://nengo.ai) | \u2713 | \u2713 | [Nengo examples](https://nnir.readthedocs.io/en/latest/examples/nengo/nir-conversion.html) |\n| [Norse](https://github.com/norse/norse) | \u2713 | \u2713 | [Norse examples](https://nnir.readthedocs.io/en/latest/examples/norse/nir-conversion.html) |\n| [Rockpool](https://rockpool.ai) ([SynSense Xylo chip](https://www.synsense.ai/products/xylo/)) | \u2713 | \u2713 | [Rockpool/Xylo examples](https://nnir.readthedocs.io/en/latest/examples/rockpool/nir-conversion.html)\n| [Sinabs](https://sinabs.readthedocs.io) ([SynSense Speck chip](https://www.synsense.ai/products/speck-2/)) | \u2713 | \u2713 | [Sinabs/Speck examples](https://nnir.readthedocs.io/en/latest/examples/sinabs/nir-conversion.html) |\n| [snnTorch](https://github.com/jeshraghian/snntorch/) | \u2713 | \u2713 | [snnTorch examples](https://nnir.readthedocs.io/en/latest/examples/snntorch/nir-conversion.html) |\n| [SpiNNaker2](https://spinncloud.com/portfolio/spinnaker2/) | \u2b1a | \u2713 | [SpiNNaker2 examples](https://nnir.readthedocs.io/en/latest/examples/spinnaker2/import.html) |\n| [Spyx](https://github.com/kmheckel/spyx) | \u2713 | \u2713 | [Spyx examples](https://nnir.readthedocs.io/en/latest/examples/spyx/conversion.html)\n\n\n## Acknowledgements\nThis work was originally conceived at the [Telluride Neuromorphic Workshop 2023](tellurideneuromorphic.org) by the authors below (in alphabetical order):\n* [Steven Abreu](https://github.com/stevenabreu7)\n* [Felix Bauer](https://github.com/bauerfe)\n* [Jason Eshraghian](https://github.com/jeshraghian)\n* [Matthias Jobst](https://github.com/matjobst)\n* [Gregor Lenz](https://github.com/biphasic)\n* [Jens Egholm Pedersen](https://github.com/jegp)\n* [Sadique Sheik](https://github.com/sheiksadique)\n* [Peng Zhou](https://github.com/pengzhouzp)\n\nIf you use NIR in your work, please cite the [following arXiv preprint](https://arxiv.org/abs/2311.14641)\n\n```\n@inproceedings{NIR2023,\n  title={Neuromorphic Intermediate Representation: A Unified Instruction Set for Interoperable Brain-Inspired Computing},\n  author={Jens E. Pedersen and Steven Abreu and Matthias Jobst and Gregor Lenz and Vittorio Fra and Felix C. Bauer and Dylan R. Muir and Peng Zhou and Bernhard Vogginger and Kade Heckel and Gianvito Urgese and Sadasivan Shankar and Terrence C. Stewart and Jason K. Eshraghian and Sadique Sheik},\n  year={2023},\n  doi={https://doi.org/10.48550/arXiv.2311.14641}\n  archivePrefix={arXiv},\n  primaryClass={cs.NE}\n}\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Neuromorphic Intermediate Representation",
    "version": "1.0.4",
    "project_urls": {
        "homepage": "https://github.com/neuromorphs/nir"
    },
    "split_keywords": [
        "neuromorphic",
        " intermediate",
        " representation"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "de219ce939c0f046f11686c24f295016e47c328f01090fa638ffd5d72f90911e",
                "md5": "2543b910ac6b71d17c5d4c05b0acb4d3",
                "sha256": "d8bee4e6fc125be9508cd8674ac63e5c1df19885b01f4967c9570e6e77800fa4"
            },
            "downloads": -1,
            "filename": "nir-1.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2543b910ac6b71d17c5d4c05b0acb4d3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 18360,
            "upload_time": "2024-04-24T15:31:02",
            "upload_time_iso_8601": "2024-04-24T15:31:02.286880Z",
            "url": "https://files.pythonhosted.org/packages/de/21/9ce939c0f046f11686c24f295016e47c328f01090fa638ffd5d72f90911e/nir-1.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e31711f1f042a8b1e9c86773f2f423340bd5388d6498552fe07c0700e3f8c00f",
                "md5": "26244f4635b7f71e665329c5c92eca82",
                "sha256": "2f864b089cf1daf4147ab6613f24d515d8181e5479940efedb76faff743ad62c"
            },
            "downloads": -1,
            "filename": "nir-1.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "26244f4635b7f71e665329c5c92eca82",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 24433,
            "upload_time": "2024-04-24T15:31:03",
            "upload_time_iso_8601": "2024-04-24T15:31:03.631766Z",
            "url": "https://files.pythonhosted.org/packages/e3/17/11f1f042a8b1e9c86773f2f423340bd5388d6498552fe07c0700e3f8c00f/nir-1.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-24 15:31:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "neuromorphs",
    "github_project": "nir",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "nir"
}
        
Elapsed time: 4.97082s