From af2ec44d4944886e23cf0e9f6a0df4bb23853a38 Mon Sep 17 00:00:00 2001 From: Andrew Rowley Date: Tue, 15 Oct 2024 11:06:17 +0100 Subject: [PATCH 1/2] See if this is faster --- .../connectors/one_to_one_connector.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/spynnaker/pyNN/models/neural_projections/connectors/one_to_one_connector.py b/spynnaker/pyNN/models/neural_projections/connectors/one_to_one_connector.py index 755bd8c7d3..608d7d6f1b 100644 --- a/spynnaker/pyNN/models/neural_projections/connectors/one_to_one_connector.py +++ b/spynnaker/pyNN/models/neural_projections/connectors/one_to_one_connector.py @@ -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 @@ -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, From 5a41e010ea661d555fae105e4c10b49c6283d684 Mon Sep 17 00:00:00 2001 From: Andrew Rowley Date: Tue, 19 Nov 2024 08:11:33 +0000 Subject: [PATCH 2/2] Nowt to do with me govenr... but fix it anyway! --- unittests/model_tests/neuron/test_synaptic_manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unittests/model_tests/neuron/test_synaptic_manager.py b/unittests/model_tests/neuron/test_synaptic_manager.py index c4d619c4ec..e3b5b1b287 100644 --- a/unittests/model_tests/neuron/test_synaptic_manager.py +++ b/unittests/model_tests/neuron/test_synaptic_manager.py @@ -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)