Skip to content

Commit

Permalink
Fix to ignore chip power monitor core
Browse files Browse the repository at this point in the history
  • Loading branch information
rowleya committed Nov 5, 2024
1 parent 09d10b1 commit c2debd5
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,16 @@
from spinn_machine import Machine
from spinn_machine.version.abstract_version import (
AbstractVersion, ChipActiveTime, RouterPackets)
from spinnman.model.enums.executable_type import ExecutableType
from spinn_front_end_common.data import FecDataView
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 PROVENANCE_TIME_KEY
from spinnman.model.enums.executable_type import ExecutableType
.chip_power_monitor_machine_vertex import (
PROVENANCE_TIME_KEY, ChipPowerMonitorMachineVertex)

#: milliseconds per second
_MS_PER_SECOND: Final = 1000.0
Expand Down Expand Up @@ -101,9 +102,12 @@ def compute_energy_used(

if active_only:
chips_used = set()
n_cores = 0
for pl in FecDataView.iterate_placemements():
if pl.vertex.get_binary_start_type() != ExecutableType.SYSTEM:
if (pl.vertex.get_binary_start_type() != ExecutableType.SYSTEM and
not isinstance(pl.vertex, ChipPowerMonitorMachineVertex)):
chips_used.add((pl.x, pl.y))
n_cores += 1
n_chips = len(chips_used)
n_frames = 0
n_boards = 0
Expand Down

0 comments on commit c2debd5

Please sign in to comment.