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

Global data new #172

Merged
merged 83 commits into from
Jul 21, 2022
Merged

Global data new #172

merged 83 commits into from
Jul 21, 2022

Conversation

Christian-B
Copy link
Member

@Christian-B Christian-B commented Mar 16, 2022

This PR moves a lot of the data held by AbstractSpinnakerBase and its Subclasses out into a Series of Global View Classes.

In Each repository that holds data there is a
_...Model
This holds the actual data and is guaranteed to be a singleton.
_...View
A list of class methods to allow none Simulator access to the data
_...Writer
Allows unittests and the simulator to add global variables.

See the spinn_utilities/data for documentation for all Views and Writers

Ideally the values stored in the GlobalData/View should be accessed directly from the View for every usage.
With no local copies of references and no passing of the Values as parameters.

A clear exception to the not to pass these values as parameters is where the receiving method is also called with different data.

In many case the Algorithms do still keep a local copy/pointer of the values.
This has been done for several reasons.

  1. Avoid too many conflicts with other branches like weight_scale and reduce_overhead
    Once these are in the local copies should be considered for removal.
  2. Speed.
    Even here the could be a later review if it is not better to use the view directly anyway
  3. To big a change for one PR
    At least that is my excuse for leaving the pushing down of the View use until later.

With the global data Injections is completely gone.

The use of the GlobalVariables() call to get the simulator has been greatly reduced.
These should now all be action calls and not data calls.

Names of the data have been kept as much as reasonable to the existing names.

While this is a giant PR I am sure there is still much work to be done.
Unless critical I suggest creating issue to address these later.

Extra methods need to simplify the merge with other branches should go in before this is merged.
Especially for the access for graph data.

All There PRs must be done at the same time.
SpiNNakerManchester/SpiNNMachine#170
SpiNNakerManchester/SpiNNMan#270
SpiNNakerManchester/PACMAN#423
SpiNNakerManchester/SpiNNFrontEndCommon#929
SpiNNakerManchester/sPyNNaker#1156
SpiNNakerManchester/SpiNNakerGraphFrontEnd#211
SpiNNakerManchester/MarkovChainMonteCarlo#30
SpiNNakerManchester/SpiNNGym#39
SpiNNakerManchester/SpiNNaker_PDP2#54
SpiNNakerManchester/TestBase#15
SpiNNakerManchester/sPyNNakerNewModelTemplate#82

tested by:
SpiNNakerManchester/IntegrationTests#104

Documented by:
SpiNNakerManchester/SpiNNakerManchester.github.io#41

Future work:
SpiNNakerManchester/SpiNNFrontEndCommon#956
SpiNNakerManchester/SpiNNFrontEndCommon#955
SpiNNakerManchester/SpiNNFrontEndCommon#954

Copy link
Contributor

@andrewgait andrewgait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine in general, just some typos and a question.

@andrewgait andrewgait merged commit 8462e41 into master Jul 21, 2022
@andrewgait andrewgait deleted the global_data_new branch July 21, 2022 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants