NIR - Neuromorphic Intermediate Representation

NIR Logo

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.


NIR is installable via pip

pip install nir

Check your local framework for NIR support.


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 ="my_graph.nir")

About NIR#

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#


This work was originally conceived at the Telluride Neuromorphic Workshop 2023 by the authors below (in alphabetical order):

If you use NIR in your work, please cite the following arXiv preprint

  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},