7676from pacman .operations .router_compressors .ordered_covering_router_compressor \
7777 import ordered_covering_compressor
7878from pacman .operations .routing_info_allocator_algorithms .\
79- zoned_routing_info_allocator import ( flexible_allocate , global_allocate )
79+ zoned_routing_info_allocator import ZonedRoutingInfoAllocator
8080from pacman .operations .routing_table_generators import (
8181 basic_routing_table_generator , merged_routing_table_generator )
8282from pacman .operations .tag_allocator_algorithms import basic_tag_allocator
@@ -1017,41 +1017,7 @@ def _report_tag_allocations(self) -> None:
10171017 tag_allocator_report ()
10181018
10191019 @final
1020- def _execute_global_allocate (
1021- self , extra_allocations : Iterable [
1022- Tuple [ApplicationVertex , str ]]) -> None :
1023- """
1024- Runs, times and logs the Global Zoned Routing Info Allocator.
1025-
1026- Sets "routing_info" is called
1027-
1028- .. note::
1029- Calling of this method is based on the configuration
1030- info_allocator value
1031- """
1032- with FecTimer ("Global allocate" , TimerWork .OTHER ):
1033- self ._data_writer .set_routing_infos (
1034- global_allocate (extra_allocations ))
1035-
1036- @final
1037- def _execute_flexible_allocate (
1038- self , extra_allocations : Iterable [
1039- Tuple [ApplicationVertex , str ]]) -> None :
1040- """
1041- Runs, times and logs the Zoned Routing Info Allocator.
1042-
1043- Sets "routing_info" is called
1044-
1045- .. note::
1046- Calling of this method is based on the configuration
1047- info_allocator value
1048- """
1049- with FecTimer ("Zoned routing info allocator" , TimerWork .OTHER ):
1050- self ._data_writer .set_routing_infos (
1051- flexible_allocate (extra_allocations ))
1052-
1053- @final
1054- def _do_info_allocator (self ) -> None :
1020+ def _execute_info_allocator (self ) -> None :
10551021 """
10561022 Runs, times and logs one of the info allocators.
10571023
@@ -1067,14 +1033,20 @@ def _do_info_allocator(self) -> None:
10671033 """
10681034 name = get_config_str ("Mapping" , "info_allocator" )
10691035 if name == "GlobalZonedRoutingInfoAllocator" :
1070- return self ._execute_global_allocate ([])
1036+ logger .warning ("GlobalZonedRoutingInfoAllocator is deprecated. "
1037+ "Please change cfg Mapping info_allocator to "
1038+ "ZonedRoutingInfoAllocator" )
1039+ name = "ZonedRoutingInfoAllocator"
10711040 if name == "ZonedRoutingInfoAllocator" :
1072- return self ._execute_flexible_allocate ([])
1073- if "," in name :
1041+ with FecTimer ("Zoned routing info allocator" , TimerWork .OTHER ):
1042+ self ._data_writer .set_routing_infos (
1043+ ZonedRoutingInfoAllocator ().allocate ())
1044+ elif "," in name :
10741045 raise ConfigurationException (
10751046 "Only a single algorithm is supported for info_allocator" )
1076- raise ConfigurationException (
1077- f"Unexpected cfg setting info_allocator: { name } " )
1047+ else :
1048+ raise ConfigurationException (
1049+ f"Unexpected cfg setting info_allocator: { name } " )
10781050
10791051 def _report_router_info (self ) -> None :
10801052 """
@@ -1280,7 +1252,7 @@ def _stage_mapping(self, total_run_time: Optional[float],
12801252 self ._execute_basic_tag_allocator ()
12811253 self ._report_tag_allocations ()
12821254
1283- self ._do_info_allocator ()
1255+ self ._execute_info_allocator ()
12841256 self ._report_router_info ()
12851257 self ._do_routing_table_generator ()
12861258 self ._report_uncompressed_routing_table ()
0 commit comments