How neuromorphs/nir works
Project type and purpose
• NIR is an open-source Python library providing a unified intermediate representation (IR) for spiking/neuromorphic models.
• Its core goal is to let users “write” a model in one framework, serialize it to a .nir file, and “read” it back into another framework (or the same one) seamlessly.
File structure
• Top-level:
• nir/ – the Python package containing the core IR, nodes, utilities, and serialization logic.
• tests/ – unit tests covering architectures, IR transforms, read/write, and utilities.
• docs/ – Sphinx-based documentation source and built site under docs/neuroir.org/.
• .github/workflows/ – CI pipelines for build, docs deploy, and PyPI release.
• pyproject.toml, dev_requirements.txt, Nix/Flake files – packaging, linting, and reproducible dev environment.
• paper/ – examples, benchmarks, and scripts used for the accompanying scientific paper.
README for additional insights
• NIR exposes two main APIs: nir.write(path, model) and nir.read(path)
• Supports seven simulators and four hardware back-ends via adapter code.
• Documentation covers primitives, usage, and supported platforms.
Elements
• External Frameworks (grouped left)
• NIR API Layer
• IR Core modules
• Serialization module
• NIR file (artifact)
• Development tooling (CI, docs)
• Blue rectangles for NIR internal modules
• Purple rectangles for external frameworks