Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix one to one performance #1509

Merged
merged 7 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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