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

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

Merged
merged 4 commits into from Apr 15, 2019
Merged

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

merged 4 commits into from Apr 15, 2019

Conversation

@arvoelke
Copy link
Collaborator

@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?
nengo_loihi/hardware/allocators.py Outdated Show resolved Hide resolved
nengo_loihi/hardware/builder.py Outdated Show resolved Hide resolved
@arvoelke
Copy link
Collaborator Author

@arvoelke 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
nengo_loihi/hardware/allocators.py Outdated Show resolved Hide resolved
nengo_loihi/hardware/allocators.py Show resolved Hide resolved
nengo_loihi/simulator.py Outdated Show resolved Hide resolved
nengo_loihi/simulator.py Outdated Show resolved Hide resolved
This allows the allocator to be set by the user, since it is used
during Simulator/HardwareInterface creation and cannot be set after.
arvoelke added 3 commits Apr 15, 2019
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 approved these changes Apr 15, 2019
@hunse hunse merged commit c83acd1 into master Apr 15, 2019
3 checks passed
@hunse hunse deleted the multi-chip branch Apr 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants