Conversation
90a6f80 to
9ece4bf
Compare
d607b34 to
974f81c
Compare
One update is required for each group of four compartments.
b75e616 to
610cbd3
Compare
610cbd3 to
b75e616
Compare
Merged
65c3e86 to
318f4f3
Compare
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__`.
318f4f3 to
5280436
Compare
tbekolay
approved these changes
Mar 2, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Our IO SNIP can now run on multiple chips. This adds full support for multichip when using the
precompute=Falseoption.Based on #264.
TODO:
chips should work on nahuku08 or nahuku32. Tests that use pop16 between chips
(e.g.
test_conv_deepnetwithpop_type == 16) will only work on nahuku32.There are a number of existing tests that should be easily extensible, including
test_conv_deepnetandtest_split_ensembles. Basically any test run withRoundRobinshould test it.multichip_snip_test.py.