Skip to content

Commit

Permalink
Merge pull request #1158 from SpiNNakerManchester/split_processors
Browse files Browse the repository at this point in the history
Split processors into monitor and user
  • Loading branch information
rowleya authored Mar 5, 2024
2 parents 93220b5 + 28d1ba7 commit 7304254
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -280,11 +280,9 @@ def store_vertex_labels(self) -> None:
self._set_core_name(
placement.x, placement.y, placement.p, placement.vertex.label)
for chip in FecDataView.get_machine().chips:
for processor in chip.processors:
if processor.is_monitor:
self._set_core_name(
chip.x, chip.y, processor.processor_id,
f"SCAMP(OS)_{chip.x}:{chip.y}")
for p in chip.monitor_processors_ids:
self._set_core_name(
chip.x, chip.y, p, f"SCAMP(OS)_{chip.x}:{chip.y}")

def get_core_name(self, x: int, y: int, p: int) -> Optional[str]:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,8 @@ def _load_executables(self) -> ExecutableTargets:
processor = routing_table.chip.get_first_none_monitor_processor()

# add to the core subsets
if processor:
core_subsets.add_processor(
routing_table.x, routing_table.y, processor.processor_id)
core_subsets.add_processor(
routing_table.x, routing_table.y, processor.processor_id)

# build executable targets
executable_targets = ExecutableTargets()
Expand Down
3 changes: 1 addition & 2 deletions spinn_front_end_common/utilities/emergency_recovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ def _emergency_state_check() -> None:
infos = CPUInfos()
errors: List[Tuple[int, int, int]] = list()
for chip in machine.chips:
for processor in chip.processors:
p = processor.processor_id
for p in chip.all_processor_ids:
try:
txrx.add_cpu_information_from_core(
infos, chip.x, chip.y, p, _bad_states)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ def _write_report(writer: TextIO, machine: Machine, progress_bar: ProgressBar):
f"({x}, {y}, P: {chip.get_physical_core_id(0)})")
n_cores = FecDataView.get_machine_version().max_cores_per_chip
down_procs = set(range(n_cores))
for proc in chip.processors:
down_procs.remove(proc.processor_id)
for p in chip.all_processor_ids:
down_procs.remove(p)
for p in down_procs:
phys_p = chip.get_physical_core_id(p)
core = p
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ def _write_one_chip_application_placement(f: TextIO, chip: Chip):
for placement in FecDataView.iterate_placements_on_core(chip.x, chip.y):
if not written_header:
f.write(f"**** Chip: ({chip.x}, {chip.y})\n")
f.write(f"Application cores: {len(list(chip.processors))}\n")
f.write(f"Application cores: {chip.n_processors}\n")
written_header = True
pro_id = placement.p
vertex = placement.vertex
Expand Down
2 changes: 1 addition & 1 deletion spinn_front_end_common/utilities/utility_calls.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,5 +209,5 @@ def pick_core_for_system_placement(
:return: a core that a system placement could be put on
:rtype: int
"""
cores = [p.processor_id for p in chip.processors if not p.is_monitor]
cores = list(chip.user_processors_ids)
return cores[system_placements.n_placements_on_chip(chip.x, chip.y)]

0 comments on commit 7304254

Please sign in to comment.