Skip to content

AppVertexRoutingInfo.n_bits_atoms issues #626

Description

@Christian-B

The method AppVertexRoutingInfo.n_bits_atoms issues
is actually used as a machine shift.
Shift to remove atom key

ref: https://github.com/SpiNNakerManchester/sPyNNaker/blob/e3aa95fdf0619e46e9fda729c409db0f981ff745/spynnaker/pyNN/models/common/local_only_2d_common.py#L118

ref:
https://github.com/SpiNNakerManchester/sPyNNaker/blob/e3aa95fdf0619e46e9fda729c409db0f981ff745/spynnaker/pyNN/models/neuron/synaptic_matrices.py#L457

ref:
https://github.com/SpiNNakerManchester/BitBrainDemo/blob/94557494e5e87513d9482b992abd6898e692aaef/bit_brain/spinnaker/sbc_machine_vertex.py#L159

ref:
https://github.com/SpiNNakerManchester/TSPonSpiNNaker/blob/510a4286f3ff7fd118f423fa161963678f3140a2/tsp_spinnaker/models/tsp_gatherer_machine_vertex.py#L210

For none fixed keys this is fine as the Allocator has clear zones.

For most fixed keys the current (pre #625) is fine.

uses the stored value
n_bits_atoms = self.__atom_bits_per_app_part[vertex, part_id]

this is set in


max_keys = max(max_keys, m_vtx.get_n_keys_for_partition(identifier))
atom_bits = allocator_bits_needed(max_keys)

This works if when the fixed keys are cleanly split with the atom keys in the least significant bits

But in one know case this is not respected. SPIFRetinaDevice
https://github.com/SpiNNakerManchester/sPyNNaker/blob/e3aa95fdf0619e46e9fda729c409db0f981ff745/spynnaker/pyNN/external_devices_models/spif_retina_device.py#L162

The danger with the per #625 solution is that is will either shift out bits that are not atom or not shift out atom bits.

Solutions included.

  • Force SPIFRetinaDevice to use a Shiftable Machine mask (No zeros bits between or after leading 1 bits)
  • Instead of n_bit_atoms use a machine_shift method which will fail for a SPIFRetinaDevice
  • Change the uses to use mask rather than shift

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions