spinn_front_end_common.interface.profiling package¶
Submodules¶
spinn_front_end_common.interface.profiling.profile_utils module¶
- spinn_front_end_common.interface.profiling.profile_utils.get_profile_region_size(n_samples: int) int[source]¶
Get the size of the region of the profile data.
- Parameters:
n_samples – number of different samples to record
- Returns:
the size in bytes used by the profile region
- spinn_front_end_common.interface.profiling.profile_utils.get_profiling_data(profile_region: int, tag_labels: Mapping[int, str], placement: Placement) ProfileData[source]¶
Utility function to get profile data from a profile region.
- Parameters:
profile_region – DSG region to get profiling data out of SDRAM
tag_labels – labels for the profiling data
placement – placement
- Returns:
profile data read from the Machine
- spinn_front_end_common.interface.profiling.profile_utils.reserve_profile_region(spec: DataSpecificationGenerator, region: int, n_samples: int) None[source]¶
Reserves the profile region for recording the profile data.
- Parameters:
spec – the DSG specification writer
region – region ID for the profile data
n_samples – number of elements being sampled
- spinn_front_end_common.interface.profiling.profile_utils.write_profile_region_data(spec: DataSpecificationGenerator, region: int, n_samples: int) None[source]¶
Writes the profile region data.
- Parameters:
spec – the DSG specification writer
region – region ID for the profile data
n_samples – number of elements being sampled
Module contents¶
- class spinn_front_end_common.interface.profiling.AbstractHasProfileData¶
Bases:
objectIndicates a
MachineVertexthat can record a profile.- abstractmethod get_profile_data(placement: Placement) ProfileData[source]¶
Get the profile data recorded during simulation.
- Parameters:
placement
- Returns:
profile data read from the Machine
- class spinn_front_end_common.interface.profiling.ProfileData(tag_labels: Mapping[int, str])¶
Bases:
objectA container for profile data.
- Parameters:
tag_labels – A list of labels indexed by tag ID
- DURATION = 1¶
- START_TIME = 0¶
- add_data(data: bytearray) None[source]¶
Add profiling data read from the profile section.
- Parameters:
data – Data read from the profile section on the machine
- get_mean_ms(tag: str) float[source]¶
- Parameters:
tag – The tag to get the mean time for
- Returns:
The mean time in milliseconds spent on operations with the given tag.
- get_mean_ms_per_ts(tag: str) float[source]¶
- Parameters:
tag – The tag to get the data for
- Returns:
The mean time in milliseconds spent on operations with the given tag per timestep.
- get_mean_n_calls_per_ts(tag: str) float[source]¶
- Parameters:
tag – The tag to get the data for
- Returns:
The mean number of times the given tag was recorded per timestep.