Skip to content

Commit

Permalink
Merge branch 'reduce-op-complexity' into roc3
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B committed Sep 12, 2023
2 parents 2dffd77 + dd8546c commit c34aa03
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions spinnman/processes/get_machine_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from os.path import join
from typing import Dict, List, Optional, Set, Tuple, cast
from spinn_utilities.config_holder import (
get_config_bool, get_config_int, get_config_str)
get_config_bool, get_config_int_or_none, get_config_str_or_none)
from spinn_utilities.data import UtilsDataView
from spinn_utilities.log import FormatAdapter
from spinn_utilities.typing.coords import XY
Expand Down Expand Up @@ -121,7 +121,7 @@ def _make_chip(self, chip_info: ChipSummaryInfo, machine: Machine) -> Chip:

# Create the chip's SDRAM object
sdram_size = chip_info.largest_free_sdram_block
max_sdram_size = get_config_int(
max_sdram_size = get_config_int_or_none(
"Machine", "max_sdram_allowed_per_chip")
if (max_sdram_size is not None and
sdram_size > max_sdram_size):
Expand Down Expand Up @@ -303,7 +303,7 @@ def _process_ignore_links(self, machine: Machine):
An empty machine to handle wrap-arounds
"""
for ignore in IgnoreLink.parse_string(
get_config_str("Machine", "down_links")):
get_config_str_or_none("Machine", "down_links")):
global_xy = self._ignores_local_to_global(
ignore.x, ignore.y, ignore.ip_address, machine)
if global_xy is None:
Expand Down Expand Up @@ -352,7 +352,7 @@ def _preprocess_ignore_cores(self, machine: Machine):
"""
# Convert by ip to global
for ignore in IgnoreCore.parse_string(
get_config_str("Machine", "down_cores")):
get_config_str_or_none("Machine", "down_cores")):
global_xy = self._ignores_local_to_global(
ignore.x, ignore.y, ignore.ip_address, machine)
if global_xy is None:
Expand All @@ -376,7 +376,7 @@ def _preprocess_ignore_chips(self, machine: Machine):
An empty machine to handle wrap-arounds
"""
for ignore in IgnoreChip.parse_string(
get_config_str("Machine", "down_chips")):
get_config_str_or_none("Machine", "down_chips")):
# Convert by ip to global
global_xy = self._ignores_local_to_global(
ignore.x, ignore.y, ignore.ip_address, machine)
Expand Down

0 comments on commit c34aa03

Please sign in to comment.