Platform · Compiler
NMC Compiler
Accepts a trained PyTorch model via TorchScript or ONNX export. Runs six optimization passes optimized for spiking workloads. Emits a hardware-targeted .snn binary deployable to any supported neuromorphic target via the Edge Runtime.
$ pip install nmc-cli
Successfully installed nmc-cli 0.9.1
$ nmc compile model.pt \
--target nt3000 --calibrate
→ spike-encoding activations
→ 6/6 passes complete
output: model.snn (87 KB)
Optimization Pipeline
Six passes, one binary
Each optimization pass is independent and observable via --verbose flag. Passes execute sequentially; output of each is the input to the next.
Dead-spike elimination
Removes neurons whose spike rate fell below the calibration floor across the validation set. Reduces binary size and runtime neuron budget without accuracy regression.
Temporal op fusion
Fuses consecutive temporal convolutions sharing the same spike-time window into a single fused kernel. Reduces dispatch overhead and memory bandwidth.
Rate normalization
Normalizes inter-layer spike rates to prevent bursting at layer boundaries. Applies layer-wise scale factors derived from calibration statistics.
Threshold calibration
Computes optimal neuron threshold values per layer using a 512-sample calibration pass. Minimizes accuracy loss from the dense-to-spike encoding transition.
HAL mapping
Translates the optimized graph into target-specific HAL instructions: memory region assignments, spike bus mappings, and power-mode transitions for the selected silicon target.
Binary serialization
Emits the .snn binary with embedded power profile metadata, calibration checksum, and runtime-readable neuron topology header. Produces a self-contained deployable.
Compiler Features
Frontend, backend, and tooling
PyTorch frontend
Accepts TorchScript (.pt) and ONNX (.onnx) exports. Supports standard CNN architectures: ResNet, MobileNet, EfficientNet, and custom sequential models.
Calibration tools
Run nmc calibrate with a representative dataset to tune threshold values before final compilation. Produces a .cal file reusable across target variants.
Accuracy profiling
Post-compilation accuracy report comparing dense vs. spike-coded inference on your validation set. Per-class degradation breakdown. Iterate thresholds without full recompilation.
Python SDK
Programmatic access via import neurmorph. Integrate compilation into your CI/CD pipeline, MLflow tracking, or custom build automation.
Multi-target builds
Compile once to an intermediate representation, then emit multiple target binaries (NT3000, BrainPulse-2, SynCore-V) without re-running optimization passes.
CLI + CI support
Headless operation with JSON progress output. Exits with non-zero on compilation failure. Docker container available for reproducible build environments.
Start compiling in minutes
The Quickstart guide walks through installation, first compilation, and target deployment in under 15 minutes.