Skip to content

Commit c52bac9

Browse files
authored
Merge branch 'master' into no_delaysupportadder_cfg
2 parents 1e1f7b5 + 0616c8a commit c52bac9

File tree

3 files changed

+21
-5
lines changed

3 files changed

+21
-5
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: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
finish_connection_holders)
5353
from spynnaker.pyNN.extra_algorithms.splitter_components import (
5454
spynnaker_splitter_selector)
55+
from spynnaker.pyNN.models.neural_projections import ProjectionApplicationEdge
5556
from spynnaker.pyNN.utilities.neo_buffer_database import NeoBufferDatabase
5657

5758

@@ -393,6 +394,17 @@ def _do_provenance_reports(self) -> None:
393394
AbstractSpinnakerBase._do_provenance_reports(self)
394395
self._report_redundant_packet_count()
395396

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+
396408
def _report_redundant_packet_count(self) -> None:
397409
with FecTimer("Redundant packet count report",
398410
TimerWork.REPORT) as timer:

spynnaker/pyNN/spynnaker.cfg

Lines changed: 3 additions & 0 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

0 commit comments

Comments
 (0)