Skip to content

cross-repo: wire axon-encoder / engram-parser exporters to nir-rs (org interop — not crate 0.5.0) #16

Description

@rmems

Summary

Org interop / adoption (not a nir-rs crate release): wire axon-encoder and engram-parser exporters so to_nir() builds graphs via nir-rs and writes .nir through the shared write path (no ad-hoc HDF5).

Versioning

  • Depend on crate 0.4.x. Completing this issue does not imply tag/publish nir-rs 0.5.0.
  • Crate version = what the library is for any consumer. This ticket = Limen producers adopting it.
  • Library gaps found while exporting → fix in nir-rs as 0.4.y (or a deliberate library minor if the API truly grows for everyone).

Boundary

Producers map domain params → nir_rs::NirGraph; nir-rs owns HDF5. Neither consumer depends on the hdf5 crate.

axon-encoder / engram-parser
        │  to_nir()
        ▼
     nir-rs write → .nir
        │
        ▼
  silicon-bridge (nir-rs read → FPGA)

Dependency

[dependencies]
nir-rs = { git = "https://github.com/Limen-Neural/nir-rs", branch = "main", optional = true }
# Prefer pin by rev/tag once tagged, e.g. tag = "v0.4.0"

[features]
nir = ["dep:nir-rs"]

engram-parser: feature-gate is mandatory to keep zero-dep default.

Encoder API sketch

pub trait ToNir {
    fn to_nir(&self, channels: usize) -> Result<nir_rs::NirGraph, NirExportError>;
}

impl RateEncoder {
    pub fn write_nir(&self, path: impl AsRef<std::path::Path>, channels: usize) -> Result<(), NirExportError> {
        nir_rs::write(path, &self.to_nir(channels)?)
    }
}

Export is a static parameter graph, not a spike stream dump.

engram-parser

to_nir on a conversion helper (not on RawTensor); map weights → Linear/Affine, dynamics → LIF/CubaLIF + Scale (wire names, not marketing aliases).

Ordering

  • Library prerequisites: done (crate 0.2–0.4 on main)
  • Graph unit tests: unblocked
  • Write/load integration: unblocked
  • Primary code paths: axon-encoder + engram-parser repos

Related


Updated 2026-08-06 by Grok Build: Grok 4.5 (medium) (xAI) via GitHub MCP — clarified org interop vs crate semver; library prereqs unblocked.

Metadata

Metadata

Assignees

Type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions