spinn_front_end_common.interface.profiling package

Submodules

spinn_front_end_common.interface.profiling.abstract_has_profile_data module

class spinn_front_end_common.interface.profiling.abstract_has_profile_data.AbstractHasProfileData[source]

Bases: object

Indicates an object that can record a profile

get_profile_data(transceiver, placement)[source]

Get the profile data recorded during simulation

Return type:spinn_front_end_common.interface.profiling.profile_data.ProfileData

spinn_front_end_common.interface.profiling.profile_data module

class spinn_front_end_common.interface.profiling.profile_data.ProfileData(tag_labels)[source]

Bases: object

A container for profile data

Parameters:tag_labels (list(str)) – A list of labels indexed by tag id
DURATION = 1
START_TIME = 0
add_data(data)[source]

Add profiling data read from the profile section

Parameters:data (bytearray) – Data read from the profile section on the machine
get_mean_ms(tag)[source]

Get the mean time in milliseconds spent on operations with the given tag

Parameters:tag (str) – The tag to get the mean time for
Return type:float
get_mean_ms_per_ts(tag, run_time_ms, machine_time_step_ms)[source]

Get the mean time in milliseconds spent on operations with the given tag per timestep

Parameters:
  • tag (str) – The tag to get the data for
  • machine_time_step_ms (int) – The time step of the simulation in microseconds
  • run_time_ms (float) – The run time of the simulation in milliseconds
Return type:

float

get_mean_n_calls_per_ts(tag, run_time_ms, machine_time_step_ms)[source]

Get the mean number of times the given tag was recorded per timestep

Parameters:
  • tag (str) – The tag to get the data for
  • machine_time_step_ms (int) – The time step of the simulation in microseconds
  • run_time_ms (float) – The run time of the simulation in milliseconds
Return type:

float

get_n_calls(tag)[source]

Get the number of times the given tag was recorded

Parameters:tag (str) – The tag to get the number of calls of
Return type:int
tags

The tags recorded as labels

Return type:list of str

spinn_front_end_common.interface.profiling.profile_utils module

spinn_front_end_common.interface.profiling.profile_utils.get_profile_region_size(n_samples)[source]

Get the size of the region of the profile data

Parameters:n_samples – number of different samples to record

:return the size in bytes used by the profile region

spinn_front_end_common.interface.profiling.profile_utils.get_profiling_data(profile_region, tag_labels, txrx, placement)[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
  • txrx – transceiver code
  • placement – placement
Returns:

ProfileData

spinn_front_end_common.interface.profiling.profile_utils.reserve_profile_region(spec, region, n_samples)[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 – n elements being sampled
Return type:

None

spinn_front_end_common.interface.profiling.profile_utils.write_profile_region_data(spec, region, n_samples)[source]

Writes the profile region data

Parameters:
  • spec – the dsg specification writer
  • region – region id for the profile data
  • n_samples – n elements being sampled
Return type:

None

Module contents