-
Notifications
You must be signed in to change notification settings - Fork 43
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
Speedup Big FromListConnector #1095
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me and worth having in, just one minor spelling mistake
self.splitter = MockSplitter(slices) | ||
|
||
|
||
class MockMachieVertex(object): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MockMachieVertex -> MockMachineVertex
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Depends on:
SpiNNakerManchester/PACMAN#398
tested by:
SpiNNakerManchester/IntegrationTests#64
BUG FIX: SynapseIORowBased
Now asks splitters for the slices!
Method could_connect changed to use vertexes
This allows __split_conn_list to be used!
__split_conn_list now maps only pairs of slices that connect
Instead of checking if not none and then length of item can now just check in
_split_connections
always sets _split_connections to a dict even if empty
Only maps if len(indices) > 0
exit because slices seen is most common so moved first
create_synaptic_block
exit fast if not in __split_conn_list which includes the not len(self.__sources) case
tests show partitioner time cut by over 80 in large fromLists
for example:
import numpy
import spynnaker8 as sim
n_sources = 100000
n_targets = 100000
n_connections = 10000000
sources = numpy.random.randint(0, n_sources, n_connections)
targets = numpy.random.randint(0, n_targets, n_connections)
connection_list = numpy.dstack((sources, targets))[0]
sim.setup(timestep=1.0)
sim.set_number_of_neurons_per_core(sim.IF_curr_exp, 100)
pop_1 = sim.Population(n_sources, sim.IF_curr_exp(), label="pop_1")
input = sim.Population(n_targets, sim.SpikeSourceArray(spike_times=[0]), label="input")
input_proj = sim.Projection(input, pop_1, sim.FromListConnector(connection_list),
synapse_type=sim.StaticSynapse(weight=5, delay=1))
simtime = 10
sim.run(simtime)
In Master:
0:04:43.446246 taken by SpYNNakerSplitterPartitioner
This PR:
0:00:38.930407 taken by SpYNNakerSplitterPartitioner