Skip to content

Commit

Permalink
Merge pull request #89 from SpiNNakerManchester/allow_different_parti…
Browse files Browse the repository at this point in the history
…tions

Allow Different Partitions
  • Loading branch information
rowleya authored Oct 14, 2024
2 parents fc70386 + d90bcbf commit a4f35b6
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 26 deletions.
6 changes: 2 additions & 4 deletions spinn_pdp2/input_vertex.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,15 +294,13 @@ def generate_machine_data_specification(
spec.switch_write_focus (MLPRegions.ROUTING.value)

# write link keys: fwd
key = routing_info.get_first_key_from_pre_vertex(
key = routing_info.get_key_from(
self, self.fwd_link)
assert key is not None
spec.write_value(key, data_type=DataType.UINT32)

# write link keys: bkp
key = routing_info.get_first_key_from_pre_vertex(
key = routing_info.get_key_from(
self, self.bkp_link)
assert key is not None
spec.write_value (key, data_type = DataType.UINT32)

# write link keys: bps (padding)
Expand Down
12 changes: 4 additions & 8 deletions spinn_pdp2/sum_vertex.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,15 +319,13 @@ def generate_machine_data_specification(
spec.switch_write_focus (MLPRegions.ROUTING.value)

# write link keys: fwd
key = routing_info.get_first_key_from_pre_vertex(
key = routing_info.get_key_from(
self, self.fwd_link)
assert key is not None
spec.write_value(key, data_type=DataType.UINT32)

# write link keys: bkp
key = routing_info.get_first_key_from_pre_vertex(
key = routing_info.get_key_from(
self, self.bkp_link)
assert key is not None
spec.write_value(key, data_type=DataType.UINT32)

# write link keys: bps (padding)
Expand All @@ -337,15 +335,13 @@ def generate_machine_data_specification(
spec.write_value (0, data_type = DataType.UINT32)

# write link keys: lds
key = routing_info.get_first_key_from_pre_vertex(
key = routing_info.get_key_from(
self, self.lds_link)
assert key is not None
spec.write_value(key, data_type=DataType.UINT32)

# write link keys: fsg
key = routing_info.get_first_key_from_pre_vertex (
key = routing_info.get_key_from (
self, self.fsg_link)
assert key is not None
spec.write_value(key, data_type=DataType.UINT32)

# Reserve and write the stage configuration region
Expand Down
9 changes: 3 additions & 6 deletions spinn_pdp2/threshold_vertex.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,24 +483,21 @@ def generate_machine_data_specification(
spec.switch_write_focus (MLPRegions.ROUTING.value)

# write link keys: fwd
key = routing_info.get_first_key_from_pre_vertex(
key = routing_info.get_key_from(
self, self.fwd_link)
assert key is not None
spec.write_value(key, data_type=DataType.UINT32)

# write link keys: bkp
key = routing_info.get_first_key_from_pre_vertex(
key = routing_info.get_key_from(
self, self.bkp_link)
assert key is not None
spec.write_value (key, data_type = DataType.UINT32)

# write link keys: bps (padding)
spec.write_value (0, data_type = DataType.UINT32)

# write link keys: stp
key = routing_info.get_first_key_from_pre_vertex(
key = routing_info.get_key_from(
self, self.stp_link)
assert key is not None
spec.write_value(key, data_type=DataType.UINT32)

# write link keys: lds (padding)
Expand Down
12 changes: 4 additions & 8 deletions spinn_pdp2/weight_vertex.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,15 +353,13 @@ def generate_machine_data_specification(
spec.switch_write_focus (MLPRegions.ROUTING.value)

# write link keys: fwd
key = routing_info.get_first_key_from_pre_vertex(
key = routing_info.get_key_from(
self, self.fwd_link)
assert key is not None
spec.write_value(key, data_type=DataType.UINT32)

# write link keys: bkp
key = routing_info.get_first_key_from_pre_vertex(
key = routing_info.get_key_from(
self, self.bkp_link)
assert key is not None
spec.write_value(key, data_type=DataType.UINT32)

# write link keys: bps (padding)
Expand All @@ -371,15 +369,13 @@ def generate_machine_data_specification(
spec.write_value (0, data_type = DataType.UINT32)

# write link keys: lds
key = routing_info.get_first_key_from_pre_vertex(
key = routing_info.get_key_from(
self, self.lds_link)
assert key is not None
spec.write_value(key, data_type=DataType.UINT32)

# write link keys: fsg
key = routing_info.get_first_key_from_pre_vertex(
key = routing_info.get_key_from(
self, self.fsg_link)
assert key is not None
spec.write_value(key, data_type=DataType.UINT32)

# Reserve and write the stage configuration region
Expand Down

0 comments on commit a4f35b6

Please sign in to comment.