diff --git a/pacman/operations/placer_algorithms/application_placer.py b/pacman/operations/placer_algorithms/application_placer.py index 9efbb7909..5d5e5d77a 100644 --- a/pacman/operations/placer_algorithms/application_placer.py +++ b/pacman/operations/placer_algorithms/application_placer.py @@ -208,7 +208,7 @@ def _place_error( n_placed = placements.n_placements_on_chip(x, y) system_placed = system_placements.n_placements_on_chip(x, y) if n_placed - system_placed == 0: - n_procs = machine[x, y].n_user_processors + n_procs = machine[x, y].n_placable_processors f.write(f" {x}, {y} ({n_procs - system_placed}" " free cores)\n") @@ -237,7 +237,7 @@ def _check_could_fit( PacmanDataView.get_all_monitor_sdram().get_total_sdram( PacmanDataView.get_plan_n_timestep())) max_cores = ( - version.max_cores_per_chip - version.n_non_user_cores - + version.max_cores_per_chip - version.n_scamp_cores - PacmanDataView.get_all_monitor_cores()) n_cores = len(vertices_to_place) if sdram <= max_sdram and n_cores <= max_cores: @@ -257,7 +257,7 @@ def _check_could_fit( if n_cores > version.max_cores_per_chip: message += " is more vertices than the number of cores on a chip." raise PacmanTooBigToPlace(message) - user_cores = version.max_cores_per_chip - version.n_non_user_cores + user_cores = version.max_cores_per_chip - version.n_scamp_cores if n_cores > user_cores: message += ( f"is more vertices than the user cores ({user_cores}) " @@ -300,7 +300,7 @@ def _do_fixed_location( f"Constrained to chip {x, y} but no such chip") on_chip = placements.placements_on_chip(x, y) cores_used = {p.p for p in on_chip} - cores = set(chip.user_processors_ids) - cores_used + cores = set(chip.placable_processors_ids) - cores_used next_cores = iter(cores) for vertex in vertices: next_core = None @@ -553,7 +553,7 @@ def __init__( :param int used_sdram: """ self.chip = chip - self.cores = set(chip.user_processors_ids) + self.cores = set(chip.placable_processors_ids) self.cores -= used_processors self.sdram = chip.sdram - used_sdram diff --git a/pacman/utilities/utility_objs/chip_counter.py b/pacman/utilities/utility_objs/chip_counter.py index ae3fcd843..73f87371a 100644 --- a/pacman/utilities/utility_objs/chip_counter.py +++ b/pacman/utilities/utility_objs/chip_counter.py @@ -43,7 +43,7 @@ class ChipCounter(object): def __init__(self): version = PacmanDataView.get_machine_version() self.__n_cores_per_chip = ( - version.max_cores_per_chip - version.n_non_user_cores - + version.max_cores_per_chip - version.n_scamp_cores - PacmanDataView.get_all_monitor_cores()) self.__sdram_per_chip = ( version.max_sdram_per_chip - diff --git a/unittests/operations_tests/tag_allocator_tests/test_tags_board_addresses.py b/unittests/operations_tests/tag_allocator_tests/test_tags_board_addresses.py index 6be26963e..190973db4 100644 --- a/unittests/operations_tests/tag_allocator_tests/test_tags_board_addresses.py +++ b/unittests/operations_tests/tag_allocator_tests/test_tags_board_addresses.py @@ -73,10 +73,9 @@ def do_too_many_ip_tags_for_1_board(self, machine): eth_chips = machine.ethernet_connected_chips eth_chip = eth_chips[0] eth_chip_2 = machine.get_chip_at(eth_chip.x + 1, eth_chip.y + 1) - eth_procs = list(eth_chip.user_processors_ids) - procs = list(eth_chip_2.user_processors) - eth2_procs = [proc.processor_id for proc in procs] - proc = procs[-1] + eth_procs = list(eth_chip.placable_processors_ids) + eth2_procs = list(eth_chip_2.placable_processors_ids) + proc = eth2_procs[-1] eth_vertices = [ SimpleMachineVertex( sdram=ConstantSDRAM(0), @@ -123,7 +122,7 @@ def test_fixed_tag(self): machine = virtual_machine(8, 8) writer.set_machine(machine) chip00 = machine.get_chip_at(0, 0) - procs = chip00.user_processors_ids + procs = chip00.placable_processors_ids placements = Placements() for i in range(5): vertex = SimpleMachineVertex( @@ -131,7 +130,7 @@ def test_fixed_tag(self): iptags=[IPtagResource( "127.0.0.1", port=10000 + i, strip_sdp=True, tag=1+i)], label="Vertex {i}") - placements.add_placement(Placement(vertex, 0, 0, next(procs))) + placements.add_placement(Placement(vertex, 0, 0, procs[i])) writer.set_placements(placements) writer.set_plan_n_timesteps(1000) tags = basic_tag_allocator() @@ -142,7 +141,7 @@ def do_fixed_repeat_tag(self, machine): writer = PacmanDataWriter.mock() writer.set_machine(machine) chip00 = machine.get_chip_at(0, 0) - procs = chip00.user_processors_ids + procs = chip00.placable_processors_ids placements = Placements() for i in range(3): vertex = SimpleMachineVertex( @@ -152,7 +151,7 @@ def do_fixed_repeat_tag(self, machine): IPtagResource("127.45.0.1", port=10000 + i, strip_sdp=True, tag=1+i)], label=f"Vertex {i}") - placements.add_placement(Placement(vertex, 0, 0, next(procs))) + placements.add_placement(Placement(vertex, 0, 0, procs[i])) writer.set_placements(placements) writer.set_plan_n_timesteps(1000) tags = basic_tag_allocator() @@ -176,7 +175,7 @@ def do_reverse(self, machine): writer = PacmanDataWriter.mock() writer.set_machine(machine) chip00 = machine.get_chip_at(0, 0) - processor = chip00.get_first_none_monitor_processor() + processor = chip00.placable_processors_ids[0] placements = Placements() vertex = SimpleMachineVertex( sdram=ConstantSDRAM(0),