SpiNNakerManchester / SpiNNMachine

A python module which contains a representation of the SpiNNaker Machine
Apache License 2.0
4 stars 3 forks source link

Version #217

Closed Christian-B closed 1 year ago

Christian-B commented 1 year ago

Alternative to https://github.com/SpiNNakerManchester/SpiNNMachine/pull/215 if this is approved close without merging the above

In Preparation for Spin2 this Introduces a set of Version classes defined by AbstractVersion

During sim.setup the version_factory() class will read the cfg and load a Specific Version class into the ....View.

The Version init will read any cfg setting that affect the values it returns so from this point only the Version is used to.

  1. Provide Values that used to be Machine constants but are likely to change for Spin2
  2. Check Width and Height and use these to create the correct Wrap Machine
  3. Pass into the Machine a Dict of xys and the default number of cores. Mainly used for creating Virtual Machines

Machine changes included

  1. Rreplacing local_xys and CHIPS_PER_BOARD with _chip_core_map (which it gets from Version)
  2. Lose the max_cores methods as this is now handled by Version and its init
  3. Have counters for cores, links and router_entries
  4. Replace cores_and_link_output_string with summary_string
    • based on the counters
    • give more info
    • logs warnings it the Machine has unexpected but supported characteristics
  5. Add the currently needed access method for the counters
  6. Removed the creation of Machine with existing Chips (it was never used outside of Tests)

Machine_factory lost ability to create boards from size (now Version) and from Chips (unused) If the steps to check and repair Machine change for spin2 the rest should be moved to Version

Router init is always passed the n_available_multicast_entries

board width and height moved to spinn5_triad_geometry

Any untitest that directly or indirectly created a Virtual Board now has to do: set_config("Machine", "version", 5) Or set_config("Machine", "version", 3)

Must be done at the same time as: https://github.com/SpiNNakerManchester/SpiNNMan/pull/343 https://github.com/SpiNNakerManchester/PACMAN/pull/520 https://github.com/SpiNNakerManchester/SpiNNFrontEndCommon/pull/1093 https://github.com/SpiNNakerManchester/sPyNNaker/pull/1373

Tested by: https://github.com/SpiNNakerManchester/IntegrationTests/pull/220

fixes: https://github.com/SpiNNakerManchester/SpiNNMachine/issues/211