Skip to content

Bind STDP to graph Affine/Linear weights; refresh README training scope - #50

Merged
w4ffl35 merged 1 commit into
masterfrom
fix/nir-stdp-readme
Oct 14, 2026
Merged

w4ffl35 merged 1 commit into
masterfrom
fix/nir-stdp-readme

Conversation

@w4ffl35

@w4ffl35 w4ffl35 commented Oct 14, 2026

Copy link
Copy Markdown
Member

Closes #48. Closes #49.

#48: new stdp_graph.h adapter (nir_stdp_graph_bind/step/free). It snapshots a named Affine/Linear node's [out][in] weights into an owned STDP instance, transposing across the pre-major/out-major layout gap that makes manual get/set wiring silently wrong, and writes every step back through nir_graph_set_weights (biases untouched). Conv2d/Conv1d fail with a named error pending a flattening decision. The header documents the intended on-chip local-learning flow (runtime run -> record pre/post spikes -> step -> checkpoint save).

New test_stdp_graph covers: Affine round-trip with closed-form weight delta plus changed checkpoint bytes, bit-exact equivalence with standalone nir_stdp_step (weights and traces) over 6 spike steps, Linear binding, rejects (unknown/unweighted/Conv2d/NULL/bad-hyperparam), and non-finite spike refusal with unchanged weights.

#49: README Scope marks training IO done (rng.h, encode.h, data.h, checkpoint.h) and Out of scope enumerates the actual remaining gaps with links (#39-#47).

Local verification: full ctest 36/36 in Debug and under ASan/UBSan, warning-clean (-Wall -Wextra -Werror).

…pe (#48, #49)

Add nir_stdp_graph_bind/step/free (stdp_graph.h): snapshots a named node's [out][in] weights into an owned STDP instance, transposing across the pre-major/out-major layout gap, and writes each step back through nir_graph_set_weights. Conv2d/Conv1d fail with a named error pending a flattening decision; the header documents the on-chip local-learning flow.

test_stdp_graph covers the Affine round-trip (weight delta plus changed checkpoint bytes), bit-exact equivalence with standalone nir_stdp_step, Linear binding, rejects, and non-finite spike handling.

README Scope now marks training IO (rng/encode/data/checkpoint) done and Out of scope links the remaining training follow-ups (#39-#47).
@w4ffl35
w4ffl35 merged commit a9e99f4 into master Oct 14, 2026
3 checks passed
@w4ffl35
w4ffl35 deleted the fix/nir-stdp-readme branch October 14, 2026 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant