Skip to content

Weight Scale Responsibility#1677

Open
rowleya wants to merge 9 commits into
masterfrom
weight_scale_responsibility
Open

Weight Scale Responsibility#1677
rowleya wants to merge 9 commits into
masterfrom
weight_scale_responsibility

Conversation

@rowleya

@rowleya rowleya commented Jul 6, 2026

Copy link
Copy Markdown
Member

Move responsibility for weight scaling to the synapse dynamics object. Although this has little effect on the sPyNNaker code itself, this has been done in recognition that NestML wants to represent weights differently in the synapses and the ring buffers, This is a valid option - the scaling can be done at the time of addition of weights to the ring buffers to allow weights to be represented differently in the synapses.

Note that this also helps with STDP rules where the weight representation might have more fractional bits to allow small updates to occur, even if those updates can't immediately affect the inputs to the ring buffers. Multiple updates however might do so!

Copilot AI review requested due to automatic review settings July 6, 2026 14:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR shifts responsibility for converting user-space synaptic weights into “ring-buffer scaled” machine format from synapse_io into the synapse-dynamics implementations, to better support alternative internal weight representations (e.g., NestML and higher-fractional-bit STDP weight formats).

Changes:

  • Removes weight scaling/unscaling logic from synapse_io and threads ring_buffer_weight_scales into synapse-dynamics encode/decode paths.
  • Updates static and STDP synapse dynamics to pre-scale weights when generating synaptic matrices, and to undo scaling when decoding matrices back to connections.
  • Extends the abstract static/plastic synapse dynamics APIs to accept ring_buffer_weight_scales.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
spynnaker/pyNN/models/neuron/synapse_io.py Removes central weight scaling and forwards ring-buffer weight scales into synapse-dynamics encode/decode.
spynnaker/pyNN/models/neuron/synapse_dynamics/synapse_dynamics_weight_changer.py Applies ring-buffer scaling in weight-changer encoding/decoding logic.
spynnaker/pyNN/models/neuron/synapse_dynamics/synapse_dynamics_stdp.py Applies ring-buffer scaling in STDP matrix generation and attempts to undo scaling on readback.
spynnaker/pyNN/models/neuron/synapse_dynamics/synapse_dynamics_static.py Applies ring-buffer scaling in static matrix generation and attempts to undo scaling on readback.
spynnaker/pyNN/models/neuron/synapse_dynamics/abstract_static_synapse_dynamics.py Extends static synapse dynamics API to accept ring_buffer_weight_scales.
spynnaker/pyNN/models/neuron/synapse_dynamics/abstract_plastic_synapse_dynamics.py Extends plastic synapse dynamics API to accept ring_buffer_weight_scales.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread spynnaker/pyNN/models/neuron/synapse_dynamics/synapse_dynamics_static.py Outdated
Comment thread spynnaker/pyNN/models/neuron/synapse_dynamics/synapse_dynamics_stdp.py Outdated
Comment thread spynnaker/pyNN/models/neuron/synapse_dynamics/synapse_dynamics_weight_changer.py Outdated
Comment thread spynnaker/pyNN/models/neuron/synapse_dynamics/synapse_dynamics_weight_changer.py Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants