![NIR Logo](https://github.com/neuromorphs/NIR/raw/main/docs/logo_light.png)
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.
NIR is installable via pip
pip install nir
Check your local framework for NIR support.
Read more in our documentation about NIR usage
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.
import nir
# Write to file
nir.write("my_graph.nir", nir_graph)
# Read file
imported_graph = nir.read("my_graph.nir")
Read more in our documentation about NIR primitives
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).
Framework | Write to NIR | Read from NIR | Examples |
---|---|---|---|
Lava-DL | ✓ | ⬚ | Lava/Loihi examples |
Nengo | ✓ | ✓ | Nengo examples |
Norse | ✓ | ✓ | Norse examples |
Rockpool (SynSense Xylo chip) | ✓ | ✓ | Rockpool/Xylo examples |
Sinabs (SynSense Speck chip) | ✓ | ✓ | Sinabs/Speck examples |
snnTorch | ✓ | ✓ | snnTorch examples |
SpiNNaker2 | ⬚ | ✓ | SpiNNaker2 examples |
Spyx | ⬚ | ✓ | Spyx examples |
This work was originally conceived at the Telluride Neuromorphic Workshop 2023 by the authors below (in alphabetical order):
- Steven Abreu
- Felix Bauer
- Jason Eshraghian
- Matthias Jobst
- Gregor Lenz
- Jens Egholm Pedersen
- Sadique Sheik
- Peng Zhou
If you use NIR in your work, please cite the following arXiv preprint
@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}
}