Skip to content

Neuron models allocate too much memory for master population tables

The size for the the MPT memory section is calculated in bytes, while the memory handler uses 32-bit words for specifying sizes.

example from the LIF Neuron implementation: https://gitlab.com/spinnaker2/py-spinnaker2/-/blob/main/src/spinnaker2/neuron_models/lif_neuron.py?ref_type=main#L189

        mpt_n_bytes = mpt_length * N_WORDS_MPT_ENTRY * 4

        memory_handler.add_mem_region(
            name=self.regions.MPT.name, index=self.regions.MPT.value, data=None, size=mpt_n_bytes, send=True, read=False
        )

Just removing the * 4 seems to work in my case, but I haven't done any extensive testing.