Skip to content

Commit aef7c4a

Browse files
committed
merged in master
2 parents 59c5ae7 + 0823541 commit aef7c4a

File tree

3 files changed

+29
-27
lines changed

3 files changed

+29
-27
lines changed

spynnaker/pyNN/models/neural_projections/projection_application_edge.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
from typing_extensions import TypeGuard
1818
from spinn_utilities.overrides import overrides
1919
from pacman.model.graphs.application import ApplicationEdge
20-
from spinn_front_end_common.interface.provenance import (
21-
AbstractProvidesLocalProvenanceData)
2220
from spynnaker.pyNN.exceptions import SynapticConfigurationException
2321
from spynnaker.pyNN.models.utility_models.delays import DelayExtensionVertex
2422
from spynnaker.pyNN.models.common.population_application_vertex import (
@@ -112,8 +110,7 @@ def are_dynamics_neuromodulation(
112110
return isinstance(synapse_dynamics, _Dynamics.neuromodulation())
113111

114112

115-
class ProjectionApplicationEdge(
116-
ApplicationEdge, AbstractProvidesLocalProvenanceData):
113+
class ProjectionApplicationEdge(ApplicationEdge):
117114
"""
118115
An edge which terminates on an :py:class:`PopulationVertex`.
119116
"""
@@ -197,8 +194,12 @@ def n_delay_stages(self) -> int:
197194
return cast(DelayExtensionVertex,
198195
self.__delay_edge.pre_vertex).n_delay_stages
199196

200-
@overrides(AbstractProvidesLocalProvenanceData.get_local_provenance_data)
201197
def get_local_provenance_data(self) -> None:
198+
"""
199+
Calls get_provenance_data on the connectors
200+
201+
This calls get_provenance_data on the connector used.
202+
"""
202203
for synapse_info in self.synapse_information:
203204
synapse_info.connector.get_provenance_data(synapse_info)
204205

spynnaker/pyNN/spinnaker.py

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@
2626

2727

2828
from spinn_utilities.log import FormatAdapter
29-
from spinn_utilities.config_holder import (
30-
get_config_bool, get_config_str_or_none)
29+
from spinn_utilities.config_holder import get_config_bool
3130
from spinn_utilities.overrides import overrides
3231

3332
from spinn_front_end_common.interface.abstract_spinnaker_base import (
@@ -36,7 +35,6 @@
3635
add_spinnaker_template)
3736
from spinn_front_end_common.interface.provenance import (
3837
FecTimer, GlobalProvenance, TimerCategory, TimerWork)
39-
from spinn_front_end_common.utilities.exceptions import ConfigurationException
4038

4139
from spynnaker import _version
4240
from spynnaker.pyNN import model_binaries
@@ -54,6 +52,7 @@
5452
finish_connection_holders)
5553
from spynnaker.pyNN.extra_algorithms.splitter_components import (
5654
spynnaker_splitter_selector)
55+
from spynnaker.pyNN.models.neural_projections import ProjectionApplicationEdge
5756
from spynnaker.pyNN.utilities.neo_buffer_database import NeoBufferDatabase
5857

5958

@@ -395,6 +394,17 @@ def _do_provenance_reports(self) -> None:
395394
AbstractSpinnakerBase._do_provenance_reports(self)
396395
self._report_redundant_packet_count()
397396

397+
@overrides(AbstractSpinnakerBase._execute_graph_provenance)
398+
def _execute_graph_provenance(self) -> None:
399+
with FecTimer("Graph provenance", TimerWork.OTHER) as timer:
400+
if timer.skip_if_cfg_false("Reports",
401+
"read_graph_provenance_data"):
402+
return
403+
for partition in self._data_writer.iterate_partitions():
404+
for edge in partition.edges:
405+
if isinstance(edge, ProjectionApplicationEdge):
406+
edge.get_local_provenance_data()
407+
398408
def _report_redundant_packet_count(self) -> None:
399409
with FecTimer("Redundant packet count report",
400410
TimerWork.REPORT) as timer:
@@ -413,20 +423,15 @@ def _execute_splitter_selector(self) -> None:
413423
def _execute_delay_support_adder(self) -> None:
414424
"""
415425
Runs, times and logs the DelaySupportAdder if required.
426+
# Check for option removed Jan 2026
416427
"""
417-
name = get_config_str_or_none("Mapping", "delay_support_adder")
418-
if name is None:
419-
return
420428
with FecTimer("DelaySupportAdder", TimerWork.OTHER):
421-
if name == "DelaySupportAdder":
422-
d_vertices, d_edges = delay_support_adder()
423-
for vertex in d_vertices:
424-
self.__writer.add_vertex(vertex)
425-
for edge, partition_id in d_edges:
426-
self.__writer.add_edge(edge, partition_id)
427-
return
428-
raise ConfigurationException(
429-
f"Unexpected cfg setting delay_support_adder: {name}")
429+
d_vertices, d_edges = delay_support_adder()
430+
for vertex in d_vertices:
431+
self.__writer.add_vertex(vertex)
432+
for edge, partition_id in d_edges:
433+
self.__writer.add_edge(edge, partition_id)
434+
return
430435

431436
@overrides(AbstractSpinnakerBase.reset)
432437
def reset(self) -> None:

spynnaker/pyNN/spynnaker.cfg

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ write_network_graph = Debug
1515
@write_network_graph = Draws a grpah of the network using graphviz (Which most be installed)
1616
path_network_graph = network_graph.gv
1717

18+
read_graph_provenance_data = Debug
19+
@read_graph_provenance_data = Reads graph provenance and writes it into the [database](path_data_database)
20+
1821
network_graph_format = None
1922
@network_graph_format = Format to use to [draw](write_network_graph) a large graph
2023
Unless specified [draw](write_network_graph) is disabled for large graphs
@@ -60,13 +63,6 @@ n_colour_bits = 4
6063
error_on_non_spynnaker_pynn = True
6164
@error_on_non_spynnaker_pynn = Whether to error or just warn on non-spynnaker-compatible PyNN
6265

63-
[Mapping]
64-
delay_support_adder = DelaySupportAdder
65-
@delay_support_adder = Algorthm for adding Delay verteices.</br>
66-
Currently supported options:
67-
* DelaySupportAdder: Adds the standard Delays Vertcies if needed
68-
* None: will skip the adder (Not Recommended) </br></br>
69-
7066
[Recording]
7167
@ = Section for the sending of live spikes.
7268

0 commit comments

Comments
 (0)