Skip to content

Commit

Permalink
Merge pull request #286 from SpiNNakerManchester/allow_different_part…
Browse files Browse the repository at this point in the history
…itions

Allow different partitions
  • Loading branch information
rowleya authored Oct 14, 2024
2 parents 4980aa5 + 048ec72 commit d9231af
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ def generate_machine_data_specification(
label="results")

# write key needed to transmit with
key = FecDataView.get_routing_infos().get_first_key_from_pre_vertex(
self, self.PARTITION_ID)
r_infos = FecDataView.get_routing_infos()
key = r_infos.get_single_key_from(self)

spec.switch_write_focus(DataRegions.TRANSMISSIONS)
spec.write_value(int(key is not None))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ def generate_machine_data_specification(
FecDataView.get_max_run_time_steps()])

# write key needed to transmit with
key = FecDataView.get_routing_infos().get_first_key_from_pre_vertex(
self, self.PARTITION_ID)
r_infos = FecDataView.get_routing_infos()
key = r_infos.get_single_key_from(self)

spec.switch_write_focus(DataRegions.TRANSMISSIONS)
spec.write_value(int(key is not None))
Expand Down
2 changes: 1 addition & 1 deletion gfe_examples/live_io/live_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def receive(label, time, keys):
front_end.add_socket_address(None, None, conn.local_port)

# Add a sender
eieio_params = EIEIOParameters(injection_partition_id=sender_partition)
eieio_params = EIEIOParameters()
sender = ReverseIPTagMulticastSourceMachineVertex(
n_keys=n_sender_keys, label="Sender",
eieio_params=eieio_params)
Expand Down
4 changes: 2 additions & 2 deletions gfe_examples/live_io/live_io_vertex.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ def generate_machine_data_specification(
spec.switch_write_focus(DataRegions.KEY_DATA)

routing_infos = FecDataView().get_routing_infos()
r_info = routing_infos.get_routing_info_from_pre_vertex(
placement.vertex, self.__send_partition)
r_info = routing_infos.get_single_info_from(
placement.vertex)
if r_info is None:
spec.write_value(0)
spec.write_value(0)
Expand Down
3 changes: 1 addition & 2 deletions gfe_examples/sync_test/sync_test_vertex.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,8 @@ def generate_data_specification(
spec.write_value(0)
else:
routing_info = FecDataView.get_routing_infos()
key = routing_info.get_first_key_from_pre_vertex(
key = routing_info.get_key_from(
self, SEND_PARTITION)
assert key is not None
spec.write_value(key)

# End-of-Spec:
Expand Down
2 changes: 1 addition & 1 deletion gfe_examples/template/template_vertex.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def _reserve_app_memory_regions(self, spec):
def _write_app_memory_regions(self, spec, iptags):
# Get the key, assuming all outgoing edges use the same key
routing_info = FecDataView.get_routing_infos()
key = routing_info.get_first_key_from_pre_vertex(self, PARTITION_ID)
key = routing_info.get_single_key_from(self)

# Write the transmission region
spec.switch_write_focus(DataRegions.TRANSMISSION)
Expand Down
2 changes: 1 addition & 1 deletion gfe_integration_tests/test_rte/run_vertex.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class RunVertex(
AbstractGeneratesDataSpecification):

def __init__(self, aplx_file, executable_type):
super().__init__(ConstantSDRAM(0))
super().__init__(ConstantSDRAM(SIMULATION_N_BYTES))
self._aplx_file = aplx_file
self._executable_type = executable_type

Expand Down

0 comments on commit d9231af

Please sign in to comment.