spynnaker.pyNN.extra_algorithms package

Module contents

class spynnaker.pyNN.extra_algorithms.AbstractMachineBitFieldRouterCompressor[source]

Bases: object

Algorithm that adds in regeneration of synaptic matrices to bitfield compression to spinn_front_end_common.interface.interface_functions.    MachineBitFieldRouterCompressor

__call__(routing_tables, transceiver, machine, app_id, provenance_file_path, machine_graph, placements, executable_finder, default_report_folder, routing_infos, executable_targets, read_expander_iobuf, provenance_data_objects=None)[source]

entrance for routing table compression with bit field

Parameters:
  • routing_tables (MulticastRoutingTables) – routing tables
  • transceiver (Transceiver) – spinnman instance
  • machine (Machine) – spinnMachine instance
  • app_id (int) – app id of the application
  • provenance_file_path (str) – file path for prov data
  • machine_graph (MachineGraph) – machine graph
  • placements (Placements) – placements on machine
  • executable_finder (ExecutableFinder) – where are binaries are located
  • default_report_folder (str) –
  • routing_infos (RoutingInfo) –
  • read_algorithm_iobuf (bool) – flag saying if read iobuf
  • read_expander_iobuf (bool) – reads the synaptic expander iobuf.
Return type:

list(ProvenanceDataItem)

class spynnaker.pyNN.extra_algorithms.DelaySupportAdder[source]

Bases: object

adds delay extension vertices into the APP graph as needed

Parameters:
  • app_graph (ApplicationGraph) – the app graph
  • user_max_delay (int) – the user defined max delay
Return type:

None

APP_DELAY_PROGRESS_BAR_TEXT = 'Adding delay extensions as required'
DELAYS_NOT_SUPPORTED_SPLITTER = 'The app vertex {} with splitter {} does not support delays and yet requires a delay support for edge {}. Please use a Splitter which does not have accepts_edges_from_delay_vertex turned off.'
END_USER_MAX_DELAY_DEFILING_ERROR_MESSAGE = 'The end user entered a max delay for which the projection breaks'
INVALID_SPLITTER_FOR_DELAYS_ERROR_MSG = 'The app vertex {} with splitter {} does not support delays and yet requires a delay support for edge {}. Please use a Splitter which utilises the AbstractSpynnakerSplitterDelay interface.'
NOT_SUPPORTED_DELAY_ERROR_MSG = 'The maximum delay {} for projection {} is not supported by the splitter {} (max supported delay of the splitter is {} and a delay extension can add {} extra delay). either reduce the delay, or use a splitter which supports a larger delay, or finally implement the code to allow multiple delay extensions. good luck.'
__call__(app_graph, user_max_delay)[source]

adds the delay extensions to the app graph, now that all the splitter objects have been set.

Parameters:
  • app_graph (ApplicationGraph) – the app graph
  • user_max_delay (int) – the user defined max delay
spynnaker.pyNN.extra_algorithms.finish_connection_holders(application_graph)[source]

Finishes the connection holders after data has been generated within them, allowing any waiting callbacks to be called.

Parameters:application_graph (ApplicationGraph) –
class spynnaker.pyNN.extra_algorithms.GraphEdgeWeightUpdater[source]

Bases: object

Updates the weights of all edges.

__call__(machine_graph)[source]
Parameters:machine_graph (MachineGraph) – the machine_graph whose edges are to be updated
class spynnaker.pyNN.extra_algorithms.OnChipBitFieldGenerator[source]

Bases: object

Executes bitfield and routing table entries for atom based routing.

__call__(placements, app_graph, executable_finder, provenance_file_path, transceiver, default_report_folder, machine_graph, routing_infos)[source]

Loads and runs the bit field generator on chip.

Parameters:
  • placements (Placements) – placements
  • app_graph (ApplicationGraph) – the app graph
  • executable_finder (ExecutableFinder) – the executable finder
  • provenance_file_path (str) – the path to where provenance data items are written
  • transceiver (Transceiver) – the SpiNNMan instance
  • default_report_folder (str) – the file path for reports
  • machine_graph (MachineGraph) – the machine graph
  • routing_infos (RoutingInfo) – the key to edge map
class spynnaker.pyNN.extra_algorithms.RedundantPacketCountReport[source]

Bases: object

__call__(provenance_items, report_default_directory)[source]
Parameters:
class spynnaker.pyNN.extra_algorithms.SpYNNakerConnectionHolderGenerator[source]

Bases: object

Sets up connection holders for reports to use.

__call__(application_graph)[source]
Parameters:application_graph (ApplicationGraph) – app graph
Returns:the set of connection holders for after DSG generation
Return type:dict(tuple(ProjectionApplicationEdge, SynapseInformation), ConnectionHolder)
class spynnaker.pyNN.extra_algorithms.SpynnakerDataSpecificationWriter[source]

Bases: spinn_front_end_common.interface.interface_functions.graph_data_specification_writer.GraphDataSpecificationWriter

Executes data specification generation for sPyNNaker

__call__(placements, hostname, report_default_directory, machine, data_n_timesteps)[source]
Parameters:
  • placements (Placements) – placements of machine graph to cores
  • hostname (str) – SpiNNaker machine name
  • report_default_directory (str) – the location where reports are stored
  • machine (Machine) – the python representation of the SpiNNaker machine
  • data_n_timesteps (int) – The number of timesteps for which data space will been reserved
Returns:

DSG targets (map of placement tuple and filename)

Return type:

tuple(DataSpecificationTargets, dict(tuple(int,int,int), int))

Raises:

ConfigurationException – If the DSG asks to use more SDRAM than is available.

class spynnaker.pyNN.extra_algorithms.SpynnakerMachineBitFieldPairRouterCompressor[source]

Bases: spynnaker.pyNN.extra_algorithms.spynnaker_machine_bit_field_router_compressor.AbstractMachineBitFieldRouterCompressor

class spynnaker.pyNN.extra_algorithms.SpynnakerMachineBitFieldUnorderedRouterCompressor[source]

Bases: spynnaker.pyNN.extra_algorithms.spynnaker_machine_bit_field_router_compressor.SpynnakerMachineBitFieldOrderedCoveringCompressor

DEPRACATED use SpynnakerMachineBitFieldOrderedCoveringCompressor

class spynnaker.pyNN.extra_algorithms.SpYNNakerNeuronGraphNetworkSpecificationReport[source]

Bases: object

Produces a report describing the graph created from the neural populations and projections.

__call__(report_folder, application_graph)[source]
Parameters:
  • report_folder (str) – the report folder to put figure into
  • application_graph (ApplicationGraph) – the app graph
class spynnaker.pyNN.extra_algorithms.SpYNNakerSynapticMatrixReport[source]

Bases: object

Generate the synaptic matrices for reporting purposes.

__call__(report_folder, connection_holder, dsg_targets)[source]

Convert synaptic matrix for every application edge.

Parameters:
spynnaker.pyNN.extra_algorithms.synapse_expander(placements, transceiver, provenance_file_path, executable_finder, extract_iobuf)[source]

Run the synapse expander.

Note

Needs to be done after data has been loaded.

Parameters:
  • placements (Placements) – Where all vertices are on the machine.
  • transceiver (Transceiver) – How to talk to the machine.
  • provenance_file_path (str) – Where provenance data should be written.
  • executable_finder (ExecutableFinder) – How to find the synapse expander binaries.
  • extract_iobuf (bool) – flag for extracting iobuf