From 5018f8c8aa89160e65256f575ff309fa510c9077 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Tue, 17 Dec 2024 09:58:58 +0000 Subject: [PATCH 1/3] data loading time even if not using monitors --- .../interface/interface_functions/compute_energy_used.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/spinn_front_end_common/interface/interface_functions/compute_energy_used.py b/spinn_front_end_common/interface/interface_functions/compute_energy_used.py index ee12272e6..cedd7a059 100644 --- a/spinn_front_end_common/interface/interface_functions/compute_energy_used.py +++ b/spinn_front_end_common/interface/interface_functions/compute_energy_used.py @@ -24,8 +24,6 @@ from spinn_front_end_common.interface.provenance import ( GlobalProvenance, ProvenanceReader, TimerCategory, TimerWork) from spinn_front_end_common.utilities.utility_objs import PowerUsed -from spinn_front_end_common.interface.interface_functions\ - .load_data_specification import load_using_advanced_monitors from spinn_front_end_common.utility_models\ .chip_power_monitor_machine_vertex import ( RECORDING_CHANNEL, ChipPowerMonitorMachineVertex) @@ -69,10 +67,8 @@ def compute_energy_used(checkpoint: Optional[int] = None) -> PowerUsed: # Separate out processes that are part of the others but that happen # on the machine, so we can account for active machine, not idle - data_loading_ms = 0 - if load_using_advanced_monitors(): - data_loading_ms = db.get_timer_sum_by_work(TimerWork.LOADING_DATA) - loading_ms -= data_loading_ms + data_loading_ms = db.get_timer_sum_by_work(TimerWork.LOADING_DATA) + loading_ms -= data_loading_ms data_extraction_ms = 0 if get_config_bool("Machine", "enable_advanced_monitor_support"): data_extraction_ms = db.get_timer_sum_by_work( From ebf41351be81c83f74e1b32d6fc38c9740a6aa3b Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Tue, 17 Dec 2024 10:16:09 +0000 Subject: [PATCH 2/3] remove hard coded values --- .../interface_functions/compute_energy_used.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/spinn_front_end_common/interface/interface_functions/compute_energy_used.py b/spinn_front_end_common/interface/interface_functions/compute_energy_used.py index cedd7a059..fb2d7f673 100644 --- a/spinn_front_end_common/interface/interface_functions/compute_energy_used.py +++ b/spinn_front_end_common/interface/interface_functions/compute_energy_used.py @@ -109,14 +109,19 @@ def compute_energy_used(checkpoint: Optional[int] = None) -> PowerUsed: n_active_cores += 1 n_active_chips = len(active_cores) + # TODO confirm Power monitors are not included here + extra_monitors_per_chip = (version.n_scamp_cores + + FecDataView.get_all_monitor_cores() - 1) + extra_monitors_per_board = (version.n_scamp_cores + + FecDataView.get_ethernet_monitor_cores() - 1) run_chip_active_time = _extract_cores_active_time( checkpoint, active_cores, version) load_chip_active_time = _make_extra_monitor_core_use( - data_loading_ms, machine, version.n_scamp_cores + 2, - version.n_scamp_cores + 1) + data_loading_ms, machine, extra_monitors_per_board, + extra_monitors_per_chip) extraction_chip_active_time = _make_extra_monitor_core_use( - data_extraction_ms, machine, version.n_scamp_cores + 2, - version.n_scamp_cores + 1) + data_extraction_ms, machine, extra_monitors_per_board, + extra_monitors_per_chip) run_router_packets = _extract_router_packets("Run", version) load_router_packets = _extract_router_packets("Load", version) From 8e6cea21854c1bffeec9b9bef76d7f98e60fe926 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Tue, 17 Dec 2024 10:32:48 +0000 Subject: [PATCH 3/3] typing fix --- .../reverse_ip_tag_multicast_source_machine_vertex.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spinn_front_end_common/utility_models/reverse_ip_tag_multicast_source_machine_vertex.py b/spinn_front_end_common/utility_models/reverse_ip_tag_multicast_source_machine_vertex.py index d727f80bf..0f81970c2 100644 --- a/spinn_front_end_common/utility_models/reverse_ip_tag_multicast_source_machine_vertex.py +++ b/spinn_front_end_common/utility_models/reverse_ip_tag_multicast_source_machine_vertex.py @@ -255,12 +255,12 @@ def _max_send_buffer_keys_per_timestep( counts = numpy.bincount( numpy.concatenate(send_buffer_times).astype("int")) if len(counts): - return max(counts) + return int(numpy.max(counts)) return 0 if len(send_buffer_times): counts = numpy.bincount(send_buffer_times) if len(counts): - return n_keys * max(counts) + return n_keys * int(numpy.max(counts)) return 0 return 0