Skip to content

Multi-chip support, testing, and failure modes#197

Merged
hunse merged 4 commits into
masterfrom
multi-chip
Apr 15, 2019
Merged

Multi-chip support, testing, and failure modes#197
hunse merged 4 commits into
masterfrom
multi-chip

Conversation

@arvoelke
Copy link
Copy Markdown
Contributor

@arvoelke arvoelke commented Mar 8, 2019

Abstracted two different methods of allocating resources to models:

  • OneToOne() which is the same method as before (default)
  • RoundRobin(n_chips) which cycles through chips per block / input

Ran the entire unit test suite with a manually-overwritten default of allocator=RoundRobin(n_chips=8) (on our local host; not shown) and discovered that all failed tests currently fall into one of two categories:

  1. Convolutional weights (pop[16|32]) across chips
  2. Use of SNIPS (precompute=False)

Multi-chip support is otherwise working and the user can override / customize the behaviour, with the following notes:

  • RoundRobin(n_chips) gives identical behaviour across any number of n_chips between 1 and 8 inclusive (unit-tested).
  • Each failure mode currently returns an error (unit-tested).

The current syntax for running a multi-chip simulation of the model is:

from nengo_loihi.hardware.allocators import RoundRobin  # or OneToOne

with Simulator(model, precompute=True,
               hardware_options={'allocator': RoundRobin(n_chips=8)}):
    ...

Todo:

  • Is this abstraction okay for now? I realize things may change and so this is just a basic starting point that can be adapted.
  • Is this an acceptable level of exposure to the user, even if it might change in the future? Or do we have better ways of exposing advanced configuration? (Resolution: will need to rethink global simulator configuration at the level of Nengo core)
  • Are there more appropriate exceptions to raise?

Comment thread nengo_loihi/hardware/allocators.py Outdated
Comment thread nengo_loihi/hardware/builder.py Outdated
Comment thread nengo_loihi/hardware/allocators.py
@arvoelke
Copy link
Copy Markdown
Contributor Author

arvoelke commented Mar 12, 2019

Note to self: since this touches the Simulator docstring it is a natural place to simultaneously fix #147.

@arvoelke arvoelke mentioned this pull request Mar 13, 2019
Comment thread nengo_loihi/hardware/allocators.py Outdated
Comment thread nengo_loihi/hardware/allocators.py
Comment thread nengo_loihi/simulator.py Outdated
Comment thread nengo_loihi/simulator.py Outdated
Comment thread nengo_loihi/hardware/tests/test_allocators.py
This allows the allocator to be set by the user, since it is used
during Simulator/HardwareInterface creation and cannot be set after.
Also:
- Disallow RoundRobin allocator with snips and test that error.
- Make OneToOne allocator a class.
- Unit test both allocators' data structures.
- Change some nxsdk_object methods to properties.
- Move the board validation to happen at the build level.
- Remove dead `add_axon` allocator code.
These connections are not supported by NxSDK.
@hunse hunse merged commit c83acd1 into master Apr 15, 2019
@hunse hunse deleted the multi-chip branch April 15, 2019 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants