spinn_front_end_common.interface.interface_functions package

Submodules

spinn_front_end_common.interface.interface_functions.host_no_bitfield_router_compression module

class spinn_front_end_common.interface.interface_functions.host_no_bitfield_router_compression.Compression(binary_path: str, progress_text: str, result_register: UserRegister)[source]

Bases: object

Compression algorithm implementation that uses a on-chip router compressor in order to parallelise.

Parameters:
  • binary_path – What binary to run

  • progress_text – Text to use in progress bar

  • result_register – number of the user register to check for the result code

compress() None[source]

Apply the on-machine compression algorithm.

Raises:

SpinnFrontEndException – If compression fails

spinn_front_end_common.interface.interface_functions.host_no_bitfield_router_compression.ordered_covering_compression() None[source]

Load routing tables and compress then using the unordered Algorithm.

To the best of our knowledge this is the same algorithm as mundy_on_chip_router_compression(), except this one is still buildable and can be maintained.

Raises:

SpinnFrontEndException – If compression fails

spinn_front_end_common.interface.interface_functions.host_no_bitfield_router_compression.pair_compression() None[source]

Load routing tables and compress then using the Pair Algorithm.

See pacman/operations/router_compressors/pair_compressor.py which is the exact same algorithm implemented in Python.

Raises:

SpinnFrontEndException – If compression fails

Module contents

class spinn_front_end_common.interface.interface_functions.FindApplicationChipsUsed[source]

Bases: object

Builds a set of stats on how many chips were used for application cores.

__call__(placements: Placements) Tuple[int, int, int, float][source]

Finds how many application chips there were and the cost on each chip

Parameters:

placements – placements

Returns:

a tuple with 4 elements.

  1. how many chips were used

  2. the max application cores on any given chip

  3. the lowest number of application cores on any given chip

  4. the average number of application cores on any given chip

spinn_front_end_common.interface.interface_functions.add_command_senders(system_placements: Placements) List[CommandSender][source]

Add command senders

Parameters:

system_placements – Placements to add CommandSender placements to.

Returns:

The command senders that were added

spinn_front_end_common.interface.interface_functions.application_finisher() None[source]

Handles finishing the running of an application, collecting the status of the cores that the application was running on.

Raises:

ExecutableFailedToStopException

spinn_front_end_common.interface.interface_functions.application_runner(runtime: float | None, time_threshold: float | None, run_until_complete: bool, state_condition: Condition) int | None[source]

Ensures all cores are initialised correctly, ran, and completed successfully.

Parameters:
  • runtime

  • time_threshold

  • run_until_complete

  • state_condition

Returns:

The current latest time-step if runtime is None and run_until_complete is False, else None

Raises:

ConfigurationException

spinn_front_end_common.interface.interface_functions.chip_io_buf_clearer() None[source]

Clears the logging output buffer of an application running on a SpiNNaker machine.

spinn_front_end_common.interface.interface_functions.chip_io_buf_extractor() Tuple[Sequence[str], Sequence[str]][source]

Extract the logging output buffers from the machine, and separates lines based on their prefix.

Returns:

error_entries, warn_entries

spinn_front_end_common.interface.interface_functions.chip_provenance_updater(all_core_subsets: CoreSubsets) None[source]

Forces all cores to generate provenance data, and then exit.

Parameters:

all_core_subsets

spinn_front_end_common.interface.interface_functions.chip_runtime_updater(n_sync_steps: int) None[source]

Updates the runtime of an application running on a SpiNNaker machine.

Parameters:

n_sync_steps

spinn_front_end_common.interface.interface_functions.compute_energy_used(checkpoint: int | None = None) PowerUsed[source]

This algorithm does the actual work of computing energy used by a simulation (or other application) running on SpiNNaker.

Parameters:

checkpoint – the time at which to compute execution energy up to

Returns:

Summary object of power used

spinn_front_end_common.interface.interface_functions.create_notification_protocol() NotificationProtocol[source]

Builds the notification protocol for GUI and external device interaction.

Returns:

The newly created protocol.

spinn_front_end_common.interface.interface_functions.database_interface(runtime: float | None) str | None[source]
Parameters:

runtime

Returns:

where the database is located, if one is made

spinn_front_end_common.interface.interface_functions.energy_provenance_reporter(power_used: PowerUsed) None[source]

Converts the power usage information into provenance data.

Parameters:

power_used – The computed basic power consumption information

spinn_front_end_common.interface.interface_functions.graph_binary_gatherer() ExecutableTargets[source]

Extracts binaries to be executed.

Returns:

The Executable targets loaded with the binaries

spinn_front_end_common.interface.interface_functions.graph_data_specification_writer(placement_order: Sequence[Placement] | None = None) str[source]
Parameters:

placement_order – the optional order in which placements should be examined

Returns:

Path to DSG targets database

Raises:

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

spinn_front_end_common.interface.interface_functions.graph_provenance_gatherer() None[source]

Gets provenance information from the graph.

spinn_front_end_common.interface.interface_functions.hbp_allocator(total_run_time: float | None) Tuple[str, str | None, MachineAllocationController][source]

Request a machine from the HBP remote access server that will fit a number of chips.

Parameters:

total_run_time – The total run time to request

Returns:

IP address, BMP details (if any), allocation controller

Raises:

PacmanConfigurationException – If neither n_chips or n_boards provided or if version is incorrect

spinn_front_end_common.interface.interface_functions.insert_chip_power_monitors_to_graphs(placements: Placements) None[source]

Adds chip power monitors into a given graph.

Parameters:

placements

spinn_front_end_common.interface.interface_functions.insert_extra_monitor_vertices_to_graphs(placements: Placements) Tuple[Dict[Chip, DataSpeedUpPacketGatherMachineVertex], Dict[Chip, ExtraMonitorSupportMachineVertex]][source]

Inserts the extra monitor vertices into the graph that correspond to the extra monitor cores required.

Parameters:

placements

Returns:

mapping from Ethernet-enabled chip locations to their gatherer, mapping from all chip locations to their extra monitor

spinn_front_end_common.interface.interface_functions.load_app_images() None[source]

Go through the executable targets and load each binary to everywhere and then send a start request to the cores that actually use it.

spinn_front_end_common.interface.interface_functions.load_application_data_specs() None[source]

Load the data specs for all non-system targets.

spinn_front_end_common.interface.interface_functions.load_fixed_routes() None[source]

Load the set of fixed routes onto a SpiNNaker machine.

spinn_front_end_common.interface.interface_functions.load_sys_images() None[source]

Go through the executable targets and load each binary to everywhere and then send a start request to the cores that actually use it.

spinn_front_end_common.interface.interface_functions.load_system_data_specs() None[source]

Load the data specs for all system targets.

spinn_front_end_common.interface.interface_functions.load_using_advanced_monitors() bool[source]

Check varies config settings and the size to decided to use monitors.

As it takes time to setup and take down the system of advanced monitors, tests show it does not make sense unless there large context

Returns:

True if advanced monitors should be used for data specs

spinn_front_end_common.interface.interface_functions.locate_executable_start_type() Dict[ExecutableType, CoreSubsets][source]

Discovers where applications of particular types need to be launched.

Returns:

Mapping of type to the cores which have that type

spinn_front_end_common.interface.interface_functions.placements_provenance_gatherer(n_placements: int, placements: Iterable[Placement]) None[source]

Gets provenance information from the specified placements.

Parameters:
  • n_placements – Number of placements to gather

  • placements – The placements of the vertices to gather data form. May not be all placements so don’t use View

spinn_front_end_common.interface.interface_functions.profile_data_gatherer() None[source]

Gets all the profiling data recorded by vertices and writes it to files.

spinn_front_end_common.interface.interface_functions.read_routing_tables_from_machine() MulticastRoutingTables[source]

Reads compressed routing tables from a SpiNNaker machine.

Returns:

Routing tables after any compression on the machine

spinn_front_end_common.interface.interface_functions.reload_dsg_regions() None[source]

Reloads DSG regions where needed.

spinn_front_end_common.interface.interface_functions.router_provenance_gatherer(provenance_prefix: str = '') None[source]

Gathers diagnostics from the routers.

Parameters:

provenance_prefix – The prefix to add to the provenance names

spinn_front_end_common.interface.interface_functions.routing_table_loader(router_tables: MulticastRoutingTables) None[source]

Loads routes into initialised routers.

Parameters:

router_tables

spinn_front_end_common.interface.interface_functions.sdram_outgoing_partition_allocator() None[source]

Goes through all vertices to see if sdram has to be allocated.

spinn_front_end_common.interface.interface_functions.spalloc_allocate_job_old() Tuple[str, Dict[Tuple[int, int], str], MachineAllocationController][source]

Request a machine from an old-style spalloc server that will fit the requested number of boards.

Returns:

host, board address map, allocation controller

spinn_front_end_common.interface.interface_functions.split_lpg_vertices(system_placements: Placements) None[source]

Split any LPG vertices found.

Parameters:

system_placements – existing placements to be added to

spinn_front_end_common.interface.interface_functions.system_multicast_routing_generator() Tuple[MulticastRoutingTables, Dict[Tuple[int, int], int], Dict[Tuple[int, int], int]][source]

Generates routing table entries used by the data-in processes with the extra monitor cores.

Returns:

routing tables, destination-to-key map, board-location-to-timeout-key map

spinn_front_end_common.interface.interface_functions.tags_loader() None[source]

Loads tags onto the machine.