Skip to content

Commit

Permalink
don't use SimulatorVertex for SyncTest
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B committed Jul 4, 2024
1 parent e6841c3 commit a073007
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
15 changes: 5 additions & 10 deletions gfe_examples/sync_test/sync_test_vertex.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,22 @@

from enum import IntEnum
import logging

from spinn_utilities.log import FormatAdapter
from spinn_utilities.overrides import overrides

from spinnman.model.enums import ExecutableType

from pacman.model.graphs.application.abstract import (
AbstractOneAppOneMachineVertex)
from pacman.model.graphs.machine import MachineVertex
from pacman.model.placements import Placement
from pacman.model.resources import ConstantSDRAM

from spinn_front_end_common.data import FecDataView
from spinn_front_end_common.interface.ds import DataSpecificationGenerator
from spinn_front_end_common.utilities.constants import (
SYSTEM_BYTES_REQUIREMENT, BYTES_PER_WORD)
from spinn_front_end_common.abstract_models import (
AbstractGeneratesDataSpecification, AbstractHasAssociatedBinary)

from spinnaker_graph_front_end.utilities.data_utils import (
generate_system_data_region, SimulatorVertex)
generate_system_data_region)
from pacman.model.graphs.application.abstract import (
AbstractOneAppOneMachineVertex)

logger = FormatAdapter(logging.getLogger(__name__))

Expand All @@ -54,7 +49,7 @@ def __init__(self, lead, label=None):
label, n_atoms=1)


class SyncTestMachineVertex(SimulatorVertex,
class SyncTestMachineVertex(MachineVertex, AbstractHasAssociatedBinary,
AbstractGeneratesDataSpecification):
def __init__(self, lead, app_vertex, label=None):
super().__init__(label, app_vertex)
Expand Down Expand Up @@ -89,7 +84,7 @@ def generate_data_specification(
routing_info = FecDataView.get_routing_infos()
key = routing_info.get_first_key_from_pre_vertex(
self, SEND_PARTITION)
assert (key is not None)
assert key is not None
spec.write_value(key)

# End-of-Spec:
Expand Down
4 changes: 3 additions & 1 deletion spinnaker_graph_front_end/utilities/data_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# limitations under the License.

from typing import TYPE_CHECKING
from spinn_front_end_common.abstract_models import (
AbstractHasAssociatedBinary)
from spinn_front_end_common.utilities.constants import SIMULATION_N_BYTES
from spinn_front_end_common.interface.ds import DataSpecificationGenerator
from spinn_front_end_common.interface.simulation.simulation_utilities import (
Expand All @@ -23,7 +25,7 @@

def generate_system_data_region(
spec: DataSpecificationGenerator, region_id: int,
machine_vertex: 'SimulatorVertex'):
machine_vertex: AbstractHasAssociatedBinary):
"""
Generate a system data region for time-based simulations.
Expand Down

0 comments on commit a073007

Please sign in to comment.