Overview
A THRINDEX backend is a Rust struct that implements theBackend trait from thrindex-backend-api. Once registered, it can be used with thx.compile(target=name) and thrindex run --target name.
To earn the THRINDEX Certified [v0] badge, the backend must pass the conformance harness against CONFORMANCE_ENVELOPE_V0 on the frozen 120-sample fixture set.
Step 1: Implement the Backend trait
run_batch contract:
- Input:
inputs[s][t][n]— samples, timestept, neuronn. Values are 0.0 or 1.0 (binary spike). - Output:
result[s][t][n]— same indexing. Values must be exactly 0.0 or 1.0. - Output shape:
result[s]must be[T, N_out]whereTandN_outcome from the artifact, not from the input.
Step 2: Declare the Capability
TheCapability struct tells the compiler what the backend can do:
Step 3: Register the backend
In Python:Step 4: Run the conformance suite
e2ebd845. If your backend does not have access to the full fixture set, start with --n-samples 10 for debugging (this produces a structural demo, not a certification run).
Step 5: Interpret the report
Common failure modes
T_max too high: a small number of samples produce neurons with large spike-count divergence. Typically a fixed-point overflow or a rounding boundary in the accumulator. Check for saturation in the multiply-accumulate path. P_pred too low: the backend makes wrong classification decisions even when T_mean is acceptable. This usually indicates a systematic bias in one weight or one neuron that dominates the argmax. Enable verbose logging on failing samples to identify the pattern. E0206: yourrun_batch returns the wrong output shape. Check that you are using T and N_out from the artifact, not from the input tensor shape.
Maintenance
A backend must be re-certified when:CONFORMANCE_ENVELOPE_V0is superseded by a new version- The backend’s firmware or driver changes in a way that affects computation
- The reference model used in the fixture set changes