Skip to content

cross-repo: wire silicon-bridge NIR I/O to depend on nir-rs (org interop — not crate 0.5.0) #15

Description

@rmems

Summary

Org interop / adoption (not a nir-rs crate release): silicon-bridge depends on nir-rs for IR parse/serialize; keep FPGA mapping (Q8.8, .mem) local.

Versioning

  • Depend on crate 0.4.x (git/path or future crates.io). Completing this issue does not mean publish or tag nir-rs 0.5.0.
  • Crate semver moves only when nir-rs public API/behavior changes for all users. This ticket is consumer wiring in silicon-bridge.
  • If wiring surfaces a library bug/gap, open a nir-rs fix → typically 0.4.y patch, not a new minor solely for Limen.

Boundary

nir-rs owns silicon-bridge owns
Typed graph + 17 nodes Q8.8 fixed-point
HDF5 .nir read/write .mem / Vivado params
Round-trip IR fidelity Map NirGraph → thresholds/weights/decay
Spec / version / errors Unsupported-node policy for FPGA

Do not add hdf5 to silicon-bridge or duplicate the 17-node decoder.

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"]

Adapter sketch

impl FpgaParameterExporter {
    pub fn from_nir(graph: &nir_rs::NirGraph) -> Result<Self, MapError>;
}

Ordering

  • Library prerequisites: done (crate 0.2 graph, 0.3 I/O, 0.4 DX on main)
  • In-memory mapping tests: unblocked
  • End-to-end .nir.mem: unblocked (nir_rs::read / write available)
  • Primary code path: silicon-bridge repo, not new features in nir-rs

LIM-772 migration

Reassign HDF5 AC to nir-rs; keep Q8.8/.mem/FPGA mapping on silicon-bridge. AC becomes “loads via nir_rs::read”.

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

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions