Skip to content

Multi-chip support for SNIPs#266

Merged
tbekolay merged 4 commits intomasterfrom
multichip-snips-host-snips
Mar 2, 2020
Merged

Multi-chip support for SNIPs#266
tbekolay merged 4 commits intomasterfrom
multichip-snips-host-snips

Conversation

@hunse
Copy link
Contributor

@hunse hunse commented Dec 4, 2019

Our IO SNIP can now run on multiple chips. This adds full support for multichip when using the precompute=False option.

Based on #264.

TODO:

  • Add tests for multichip snips. Tests that use discrete or pop32 spikes between
    chips should work on nahuku08 or nahuku32. Tests that use pop16 between chips
    (e.g. test_conv_deepnet with pop_type == 16) will only work on nahuku32.
    There are a number of existing tests that should be easily extensible, including
    test_conv_deepnet and test_split_ensembles. Basically any test run with
    RoundRobin should test it.
  • Test learning on multiple chips
  • Once final tests are developed, remove multichip_snip_test.py.

@kinjalpatel27 kinjalpatel27 force-pushed the multichip-snips-host-snips branch 6 times, most recently from 90a6f80 to 9ece4bf Compare January 8, 2020 15:59
@kinjalpatel27 kinjalpatel27 force-pushed the multichip-snips-host-snips branch 3 times, most recently from d607b34 to 974f81c Compare January 13, 2020 20:00
One update is required for each group of four compartments.
@tbekolay tbekolay force-pushed the multichip-snips-host-snips branch from b75e616 to 610cbd3 Compare February 14, 2020 15:59
@tbekolay tbekolay force-pushed the multichip-snips-host-snips branch from 610cbd3 to b75e616 Compare February 26, 2020 16:33
@tbekolay tbekolay mentioned this pull request Feb 28, 2020
@tbekolay tbekolay force-pushed the multichip-snips-host-snips branch 6 times, most recently from 65c3e86 to 318f4f3 Compare March 2, 2020 17:04
kinjalpatel27 and others added 3 commits March 2, 2020 14:10
This commit makes it possible to use multi-chip allocators in
non-precomputable models. Combined with recent commits that split
large blocks, it is now possible to run much larger real-world
models on Loihi.

Major changes
-------------

The superhost, host, and chip now all attempt to shut down when
one of the other devices shuts down. This is signaled by a -1
sent to/from the superhost<->host and host<->chip sockets.

Since race conditions can occur, the chip Snip waits at the end
of the simulation before signalling the end of the simulation.
This allows other chips to catch up and finish using the channels
before they close.

We also fix a bug in the error message when an unsupported neuron type
is requested.

Refactoring
-----------

The `Snips` class has been rewritten to support sending data to
and receiving data from multiple chips. Several new classes were
added to make the `Snips` class readable, including `ChipSnips`,
and `nengo_loihi.hardware.builder.ProbeSnip`. The `HostSocket`
class has been changed to a `HostSnip` class that encapsulates
the logic for both the Snip and the socket.

More Snip-specific logic has been moved from `HardwareInterface`
to `Snips`.

We pre-deobfuscate in build_synapse as deobfuscating within a loop
is expensive.

We remove the `Probe.use_snips` and `Probe.snip_info` attributes
because they contain hardware-specific information that was only
added in the hardware build process in order to be read in a later
part of the hardware build process. Instead, this information is
either stored in the model or passed through to the `build_probe`
function.

Shutdown behavior in Snips that used to be handled with jumps to
a `shutdown` label are now handled with function calls instead.

All host snip messages are now prepended with "[Host] " to make it
easier to scan debug logs. In order to make this possible, we switch
from using std::cout (<iostream>) to printf.

Co-authored-by: Eric Hunsberger <eric.hunsberger@appliedbrainresearch.com>

Co-authored-by: Trevor Bekolay <tbekolay@gmail.com>
The default allocator is now Greedy, which uses all of the cores
on one chip then proceeds to the next chip. Each block is only
allocated to one core.

The previous default, OneToOne, has been removed because it
offers no functionality over the Greedy allocator. The OneToOne
allocator is (mostly) equivalent to Greedy(n_chips=1).

Co-authored-by: Trevor Bekolay <tbekolay@gmail.com>
Previously, n_chips was an argument to allocators. However, that
means that to tell Nengo Loihi that you want to use more chips,
you have to know that this is defined in the allocators, and then
you have to decide which allocator you want. Making it part of the
hardware options (i.e., HardwareInterface constructor) makes it
easier for users to specify, and reduces duplication because all
current (and likely future) allocators are multi-chip. The number
of chips is still available to allocators, as it is passed
into `__call__`.
@tbekolay tbekolay force-pushed the multichip-snips-host-snips branch from 318f4f3 to 5280436 Compare March 2, 2020 19:11
@tbekolay tbekolay merged commit 5280436 into master Mar 2, 2020
@tbekolay tbekolay deleted the multichip-snips-host-snips branch March 2, 2020 20:01
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