Skip to content

Commit

Permalink
vm core as min from version or cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B committed Mar 6, 2024
1 parent 7304254 commit f370136
Showing 1 changed file with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
get_config_int, get_config_str_or_none, is_config_none)
from spinn_utilities.log import FormatAdapter
from spinn_machine import json_machine, virtual_machine, Machine
from spinn_front_end_common.data import FecDataView
logger = FormatAdapter(logging.getLogger(__name__))


Expand All @@ -32,20 +31,12 @@ def virtual_machine_generator() -> Machine:
height = get_config_int("Machine", "height")
width = get_config_int("Machine", "width")

version = FecDataView.get_machine_version()
version.verify_size(height, width)

json_path = get_config_str_or_none("Machine", "json_path")
if json_path is None:
assert width is not None and height is not None
n_cores = FecDataView.get_machine_version().max_cores_per_chip
machine = virtual_machine(
width=width, height=height,
n_cpus_per_chip=n_cores,
validate=True)
machine = virtual_machine(width=width, height=height, validate=True)
else:
if (height is not None or width is not None or
version is not None or
not is_config_none("Machine", "down_chips") or
not is_config_none("Machine", "down_cores") or
not is_config_none("Machine", "down_links")):
Expand Down

0 comments on commit f370136

Please sign in to comment.