spinn_front_end_common.interface package¶
Subpackages¶
- spinn_front_end_common.interface.buffer_management package
- spinn_front_end_common.interface.ds package
- Module contents
DataSpecificationBaseDataSpecificationGeneratorDataSpecificationReloaderDataTypeDataType.FLOAT_32DataType.FLOAT_64DataType.INT16DataType.INT32DataType.INT64DataType.INT8DataType.S015DataType.S031DataType.S063DataType.S07DataType.S1615DataType.S3231DataType.S87DataType.U016DataType.U032DataType.U064DataType.U08DataType.U1616DataType.U3232DataType.U88DataType.UINT16DataType.UINT32DataType.UINT64DataType.UINT8DataType.as_bytes()DataType.check_value()DataType.decode_array()DataType.decode_numpy_array()DataType.encode_as_int()DataType.encode_as_numpy_int()DataType.encode_as_numpy_int_array()DataType.maxDataType.minDataType.numpy_typenameDataType.scaleDataType.sizeDataType.struct_encoding
DsSqlliteDatabaseDsSqlliteDatabase.get_content_sizes()DsSqlliteDatabase.get_core_infos()DsSqlliteDatabase.get_double_region()DsSqlliteDatabase.get_ds_cores()DsSqlliteDatabase.get_info_for_cores()DsSqlliteDatabase.get_max_content_size()DsSqlliteDatabase.get_memory_to_malloc()DsSqlliteDatabase.get_memory_to_write()DsSqlliteDatabase.get_n_ds_cores()DsSqlliteDatabase.get_reference_pointers()DsSqlliteDatabase.get_region_pointer()DsSqlliteDatabase.get_region_pointers_and_content()DsSqlliteDatabase.get_region_size()DsSqlliteDatabase.get_region_sizes()DsSqlliteDatabase.get_regions_content()DsSqlliteDatabase.get_start_address()DsSqlliteDatabase.get_total_regions_size()DsSqlliteDatabase.get_unlinked_references()DsSqlliteDatabase.set_core()DsSqlliteDatabase.set_info()DsSqlliteDatabase.set_memory_region()DsSqlliteDatabase.set_reference()DsSqlliteDatabase.set_region_content()DsSqlliteDatabase.set_region_pointer()DsSqlliteDatabase.set_start_address()DsSqlliteDatabase.write_session_credentials_to_db()
- Module contents
- spinn_front_end_common.interface.interface_functions package
- Submodules
- spinn_front_end_common.interface.interface_functions.host_no_bitfield_router_compression module
- Module contents
FindApplicationChipsUsedadd_command_senders()application_finisher()application_runner()chip_io_buf_clearer()chip_io_buf_extractor()chip_provenance_updater()chip_runtime_updater()compute_energy_used()create_notification_protocol()database_interface()energy_provenance_reporter()graph_binary_gatherer()graph_data_specification_writer()graph_provenance_gatherer()hbp_allocator()insert_chip_power_monitors_to_graphs()insert_extra_monitor_vertices_to_graphs()load_app_images()load_application_data_specs()load_fixed_routes()load_sys_images()load_system_data_specs()load_using_advanced_monitors()locate_executable_start_type()placements_provenance_gatherer()profile_data_gatherer()read_routing_tables_from_machine()reload_dsg_regions()router_provenance_gatherer()routing_table_loader()sdram_outgoing_partition_allocator()spalloc_allocate_job_old()split_lpg_vertices()system_multicast_routing_generator()tags_loader()
- spinn_front_end_common.interface.profiling package
- spinn_front_end_common.interface.provenance package
- Submodules
- spinn_front_end_common.interface.provenance.router_prov_mapper module
- Module contents
AbstractProvidesLocalProvenanceDataAbstractProvidesProvenanceDataFromMachineFecTimerFecTimer.APPLICATION_RUNNERFecTimer.end_category()FecTimer.error()FecTimer.setup()FecTimer.skip()FecTimer.skip_all_cfgs_false()FecTimer.skip_if_cfg_false()FecTimer.skip_if_cfgs_false()FecTimer.skip_if_empty()FecTimer.skip_if_has_not_run()FecTimer.skip_if_virtual_board()FecTimer.start_category()FecTimer.stop_category_timing()
GlobalProvenanceGlobalProvenance.get_category_timer_sum()GlobalProvenance.get_category_timer_sum_by_reset()GlobalProvenance.get_category_timer_sums()GlobalProvenance.get_global_provenace_path()GlobalProvenance.get_run_time_of_buffer_extractor()GlobalProvenance.get_run_times()GlobalProvenance.get_timer_provenance()GlobalProvenance.get_timer_sum_by_algorithm()GlobalProvenance.get_timer_sum_by_category()GlobalProvenance.get_timer_sum_by_category_and_reset()GlobalProvenance.get_timer_sum_by_work()GlobalProvenance.insert_category()GlobalProvenance.insert_category_timing()GlobalProvenance.insert_run_reset_mapping()GlobalProvenance.insert_timing()GlobalProvenance.insert_version()GlobalProvenance.retreive_log_messages()GlobalProvenance.run_query()GlobalProvenance.store_log()
LogStoreDBProvenanceReaderProvenanceWriterProvenanceWriter.insert_board_provenance()ProvenanceWriter.insert_connector()ProvenanceWriter.insert_core()ProvenanceWriter.insert_gatherer()ProvenanceWriter.insert_monitor()ProvenanceWriter.insert_monitor_value()ProvenanceWriter.insert_power()ProvenanceWriter.insert_report()ProvenanceWriter.insert_router()
ProvidesProvenanceDataFromMachineImplProvidesProvenanceDataFromMachineImpl.N_SYSTEM_PROVENANCE_WORDSProvidesProvenanceDataFromMachineImpl.get_provenance_data_from_machine()ProvidesProvenanceDataFromMachineImpl.get_provenance_data_size()ProvidesProvenanceDataFromMachineImpl.parse_extra_provenance_items()ProvidesProvenanceDataFromMachineImpl.parse_system_provenance_items()ProvidesProvenanceDataFromMachineImpl.reserve_provenance_data_region()
TimerCategoryTimerWork
- spinn_front_end_common.interface.simulation package
- spinn_front_end_common.interface.splitter_selectors package
Submodules¶
spinn_front_end_common.interface.abstract_spinnaker_base module¶
main interface for the SpiNNaker tools
- class spinn_front_end_common.interface.abstract_spinnaker_base.AbstractSpinnakerBase(data_writer_cls: Type[FecDataWriter] | None = None)[source]¶
Bases:
ConfigHandlerMain interface into the tools logic flow.
- Parameters:
data_writer_cls – The Global data writer class
- exception_handler(exc_type: Type[BaseException], value: BaseException, traceback_obj: TracebackType | None) None[source]¶
Handler of exceptions.
- Parameters:
exc_type – the type of exception received
value – the value of the exception
traceback_obj – the trace back stuff
- get_machine() Machine[source]¶
Get the Machine. Creating it if necessary.
This method will make sure that any set called before the next run is hard.
If called after a reset it will return a different Machine to the one from the previous run.
- Returns:
The Machine now stored in the DataView
- property get_number_of_available_cores_on_machine: int¶
The number of available cores on the machine after taking into account preallocated resources.
- run(run_time: float | None, sync_time: float = 0) None[source]¶
Run a simulation for a fixed amount of time.
- Parameters:
run_time – the run duration in milliseconds.
sync_time – If not 0, this specifies that the simulation should pause after this duration. The continue_simulation() method must then be called for the simulation to continue.
- run_until_complete(n_steps: int | None = None) None[source]¶
Run a simulation until it completes.
- Parameters:
n_steps – If not None, this specifies that the simulation should be requested to run for the given number of steps. The host will still wait until the simulation itself says it has completed.
- stop_run() None[source]¶
Request that the current infinite run stop.
Note
This will need to be called from another thread as the infinite run call is blocking.
- Raises:
SpiNNUtilsException – If the stop_run was not expected in the current state.
spinn_front_end_common.interface.config_handler module¶
- class spinn_front_end_common.interface.config_handler.ConfigHandler(data_writer_cls: Type[FecDataWriter] | None = None)[source]¶
Bases:
SpiNNManSimulationSuperclass of AbstractSpinnakerBase that handles function only dependent of the configuration and the order its methods are called.
- Parameters:
data_writer_cls – Class of the DataWriter used to store the global data
spinn_front_end_common.interface.config_setup module¶
- spinn_front_end_common.interface.config_setup.add_spinnaker_cfg() None[source]¶
Add the local configuration and all dependent configuration files.
- spinn_front_end_common.interface.config_setup.fec_cfg_paths_skipped() Set[str][source]¶
Set of cfg path that may not be found based on other cfg settings
Assuming mode = Debug
- Returns:
list of cfg path options that point to paths that may not exist
- spinn_front_end_common.interface.config_setup.unittest_setup() None[source]¶
Does all the steps that may be required before a unit test.
Resets the configurations so only the local default configurations are included.
Unsets any previous simulators and temporary directories.
Note
This file should only be called from spinn_front_end_common/tests
spinn_front_end_common.interface.java_caller module¶
- class spinn_front_end_common.interface.java_caller.JavaCaller[source]¶
Bases:
objectSupport class that holds all the stuff for running stuff in Java. This includes the work of preparing data for transmitting to Java and back.
This separates the choices of how to call the Java batch vs streaming, jar locations, parameters, etc. from the rest of the Python code.
Creates a Java caller and checks the user/configuration parameters.
- Raises:
ConfigurationException – if simple parameter checking fails.
- extract_all_data() None[source]¶
Gets all the data from the previously set placements and put these in the previously set database.
- :raises subprocess.CalledProcessError
On failure of the Java code.
- load_app_data_specification(use_monitors: bool) None[source]¶
Writes all the data specifications for application cores, uploading the result to the machine.
Note
May assume that system cores are already loaded and running if use_monitors is set to True.
- Parameters:
use_monitors
- Raises:
subprocess.CalledProcessError – On failure of the Java code.
- load_system_data_specification() None[source]¶
Writes all the data specifications for system cores, uploading the result to the machine.
- Raises:
subprocess.CalledProcessError – On failure of the Java code.
- set_advanced_monitors() None[source]¶
Create information describing what’s going on with the monitor cores.
- set_placements(used_placements: Iterable[Placement]) None[source]¶
Passes in the placements leaving this class to decide pass it to Java.
Currently the extra information extracted is recording region base address but this could change if recording region saved in the database.
Currently this method uses JSON but that may well change to using the database.
- Parameters:
used_placements – Placements that are recording. May not be all placements