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.

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.

Pass 01

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.

Pass 02

Temporal op fusion

Fuses consecutive temporal convolutions sharing the same spike-time window into a single fused kernel. Reduces dispatch overhead and memory bandwidth.

Pass 03

Rate normalization

Normalizes inter-layer spike rates to prevent bursting at layer boundaries. Applies layer-wise scale factors derived from calibration statistics.

Pass 04

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.

Pass 05

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.

Pass 06

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.