Skip to content

Commit

Permalink
Merge pull request #1509 from SpiNNakerManchester/fix_one_to_one_perf…
Browse files Browse the repository at this point in the history
…ormance

Fix one to one performance
  • Loading branch information
Christian-B authored Nov 19, 2024
2 parents c60396d + 5a41e01 commit c4c3605
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,14 +200,8 @@ def get_connected_vertices(
s_info.partition_id)

# If doing a view, we must be single dimensional, so use old method
if s_info.prepop_is_view or s_info.postpop_is_view:

# Check again here in case the rules change elsewhere
if (len(s_info.pre_vertex.atoms_shape) > 1 or
len(s_info.post_vertex.atoms_shape) > 1):
raise ConfigurationException(
"The OneToOneConnector does not support PopulationView "
"connections between vertices with more than 1 dimension")
if (len(s_info.pre_vertex.atoms_shape) == 1 and
len(s_info.post_vertex.atoms_shape) == 1):

pre_lo = 0
pre_hi = source_vertex.n_atoms - 1
Expand All @@ -225,6 +219,13 @@ def get_connected_vertices(
s_vert, pre_lo, pre_hi, t_vert, post_lo, post_hi)])
for t_vert in tgt_vtxs]

if s_info.prepop_is_view or s_info.postpop_is_view:

# Check again here in case the rules change elsewhere
raise ConfigurationException(
"The OneToOneConnector does not support PopulationView "
"connections between vertices with more than 1 dimension")

# Check for cross over of pre- and post- rasters, as that is how the
# connector works
return [(t_vert,
Expand Down
2 changes: 1 addition & 1 deletion unittests/model_tests/neuron/test_synaptic_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def write_memory(
return (-1, -1)

@overrides(Transceiver.get_region_base_address)
def get_region_base_address(self, x: int, y: int, p: int):
def get_region_base_address(self, x: int, y: int, p: int) -> int:
return 0

@overrides(MockableTransceiver.read_memory)
Expand Down

0 comments on commit c4c3605

Please sign in to comment.