Skip to content

Commit

Permalink
Merge pull request #394 from SpiNNakerManchester/chip_big
Browse files Browse the repository at this point in the history
Chip simplification
  • Loading branch information
rowleya authored Mar 15, 2024
2 parents 004d2de + f32b7e7 commit bc417d6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
3 changes: 2 additions & 1 deletion spinnman/get_cores_in_run_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ def get_cores_in_run_state(txrx, app_id, print_all_chips):

all_cores = []
for chip in machine.chips:
all_cores.append(CoreSubset(chip.x, chip.y, range(1, 17)))
all_cores.append(CoreSubset(
chip.x, chip.y, chip.placable_processors_ids))

all_cores = CoreSubsets(core_subsets=all_cores)

Expand Down
6 changes: 3 additions & 3 deletions spinnman/processes/application_copy_run_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def _get_next_chips(
on_same_board = _on_same_board(chip, chip_xy)
eth = (chip.nearest_ethernet_x, chip.nearest_ethernet_y)
if (eth not in chips_done or
(chip.x, chip.y) not in chips_done[eth]):
chip not in chips_done[eth]):
if on_same_board or not off_board_copy_done:
next_chips.append(chip)
if not on_same_board:
Expand Down Expand Up @@ -119,7 +119,7 @@ def run(self, size: int, app_id: int, core_subsets: CoreSubsets,
boot_chip = machine.boot_chip
chips_done: Mapping[Tuple[int, int], List[Tuple[int, int]]] = \
defaultdict(list)
chips_done[boot_chip.x, boot_chip.y].append((boot_chip.x, boot_chip.y))
chips_done[boot_chip].append((boot_chip))
parent_chips = _compute_parent_chips(machine)
next_chips = _get_next_chips(chips_done, parent_chips, machine)

Expand All @@ -131,7 +131,7 @@ def run(self, size: int, app_id: int, core_subsets: CoreSubsets,
chip.x, chip.y, cast(int, chip.parent_link), size, app_id,
subset.processor_ids, checksum, wait))
eth = (chip.nearest_ethernet_x, chip.nearest_ethernet_y)
chips_done[eth].append((chip.x, chip.y))
chips_done[eth].append(chip)
self._finish()
self.check_for_error()
next_chips = _get_next_chips(chips_done, parent_chips, machine)
5 changes: 2 additions & 3 deletions spinnman/transceiver/base_transceiver.py
Original file line number Diff line number Diff line change
Expand Up @@ -816,11 +816,10 @@ def get_core_state_count(
self, app_id: int, state: CPUState,
xys: Optional[Iterable[Tuple[int, int]]] = None) -> int:
process = GetNCoresInStateProcess(self._scamp_connection_selector)
chip_xys = xys
chip_xys: Iterable[Tuple[int, int]]
if xys is None:
machine = SpiNNManDataView.get_machine()
chip_xys = [(ch.x, ch.y)
for ch in machine.ethernet_connected_chips]
chip_xys = machine.ethernet_connected_chips
else:
chip_xys = xys
return process.get_n_cores_in_state(chip_xys, app_id, state)
Expand Down

0 comments on commit bc417d6

Please sign in to comment.