spynnaker.pyNN.models.abstract_models package¶
Module contents¶
- class spynnaker.pyNN.models.abstract_models.AbstractAcceptsIncomingSynapses¶
Bases:
objectIndicates an application vertex that can be a post-vertex in a PyNN projection.
Note
- abstractmethod clear_connection_cache() None[source]¶
Clear the connection data stored in the vertex so far.
- abstractmethod get_connections_from_machine(app_edge: ProjectionApplicationEdge, synapse_info: SynapseInformation) ConnectionsArray[source]¶
- Parameters:
app_edge – The edge for which the data is being read
synapse_info – The specific projection within the edge
- Returns:
The connections from the machine post-run.
- abstractmethod get_synapse_id_by_target(target: str) int | None[source]¶
- Parameters:
target – The name of the synapse
- Returns:
The ID of the synapse with this name
- abstractmethod set_synapse_dynamics(synapse_dynamics: AbstractSynapseDynamics) None[source]¶
Set the synapse dynamics of this vertex.
- Parameters:
synapse_dynamics
- verify_splitter(splitter: AbstractSpynnakerSplitterDelay) None[source]¶
Check that the splitter implements the API(s) expected by the SynapticMatrices
Any Vertex that implements this API should override ApplicationVertex.splitter method to also call this function.
- Parameters:
splitter – the splitter
- Raises:
PacmanConfigurationException – if the splitter is not an instance of AbstractSpynnakerSplitterDelay
- class spynnaker.pyNN.models.abstract_models.AbstractHasDelayStages¶
Bases:
objectIndicates that this object (an application vertex) has delay stages that are used to increase the space required for bitfields in
spynnaker.pyNN.utilities.bit_field_utilities.get_estimated_sdram_for_bit_field_region()
- class spynnaker.pyNN.models.abstract_models.AbstractMaxSpikes¶
Bases:
objectIndicates a class (a
MachineVertex) that can describe the maximum rate that it sends spikes.The
SynapticManagerassumes that all machine vertexes share the same synapse_information will have the same rates.
- class spynnaker.pyNN.models.abstract_models.AbstractNeuronExpandable¶
Bases:
objectIndicates a class (a
MachineVertex) that has may need to run the neuron expander APLX.- abstractmethod gen_neurons_on_machine() bool[source]¶
True if this vertex should be generated on the machine.
Note
The typical implementation for this method will be to ask the neuron data
- Returns:
True if this vertex can generate its data on machine
- class spynnaker.pyNN.models.abstract_models.AbstractSynapseExpandable¶
Bases:
objectIndicates a class (a
MachineVertex) that has may need to run the synapse expander APLX.Note
This is not implemented by the
DelayExtensionMachineVertex, which needs a different expander APLX- abstract property bit_field_size: int¶
The amount of bit field data to be generated. This is used to calculate the timeout of the execution.
- abstract property connection_generator_region: int¶
The region ID containing the parameters of synaptic expansion.
- abstractmethod gen_on_machine() bool[source]¶
True if the synapses of this vertex should be generated on the machine.
Note
The typical implementation for this method will be to ask the app_vertex’s synapse_manager
- Returns:
True if this vertex can generate its data on machine
- class spynnaker.pyNN.models.abstract_models.ColouredApplicationVertex(label: str | None = None, max_atoms_per_core: int | Tuple[int, ...] | None = None, splitter: AbstractSplitterCommon | None = None)¶
Bases:
ApplicationVertexIndicates an application vertex that implements n_colour_bits.
- Parameters:
label – The optional name of the vertex.
max_atoms_per_core – The max number of atoms that can be placed on a core for each dimension, used in partitioning. If the vertex is n-dimensional, with n > 1, the value must be a tuple with a value for each dimension. If it is single-dimensional the value can be a 1-tuple or an int.
splitter – The splitter object needed for this vertex. Leave as None to delegate the choice of splitter to the selector.
- class spynnaker.pyNN.models.abstract_models.HasShapeKeyFields¶
Bases:
objectIndicates a source that has keys in fields for each dimension of the source.
- abstractmethod get_shape_key_fields(vertex_slice: Slice) List[Tuple[int, int, int, int]][source]¶
- Parameters:
vertex_slice – The slice of the source vertex
- Returns:
Get the fields to be used for each dimension in the shape of the given source vertex slice, as a list of start, size, mask, shift values in the order of the fields.
- class spynnaker.pyNN.models.abstract_models.HasSynapses¶
Bases:
objectAPI for getting connections from the machine.
- abstractmethod get_connections_from_machine(placement: Placement, app_edge: ProjectionApplicationEdge, synapse_info: SynapseInformation) Sequence[NDArray][source]¶
- Parameters:
placement – Where the connection data is on the machine
app_edge – The edge for which the data is being read
synapse_info – The specific projection within the edge
- Returns:
The connections from the machine for this vertex.
- class spynnaker.pyNN.models.abstract_models.ReceivesSynapticInputsOverSDRAM¶
Bases:
AbstractSupportsSDRAMEdgesAn object that receives synaptic inputs over SDRAM.
The number of neurons to be sent per synapse type is rounded up to be a power of 2. A sender must send N_BYTES_PER_INPUT of data for each synapse type for each neuron, formatted as all the data for each neuron for the first synapse type, followed by all the data for each neuron for the second, and so on for each synapse type. Each input is an accumulated weight value for the timestep, scaled with the given weight scales.
- N_BYTES_PER_INPUT = 2¶
- class spynnaker.pyNN.models.abstract_models.SendsSynapticInputsOverSDRAM¶
Bases:
AbstractSupportsSDRAMEdgesAn object that sends synaptic inputs over SDRAM.