SpiNNakerManchester / sPyNNaker

The SpiNNaker implementation of the PyNN neural networking language
Apache License 2.0
105 stars 44 forks source link

set_number_of_neurons_per_core vs already existing Populations #1182

Open Christian-B opened 2 years ago

Christian-B commented 2 years ago

In all our examples we do set_number_of_neurons_per_core before creating the Populations

So sim.set_number_of_neurons_per_core(sim.IF_curr_exp, 2) pop_1 = sim.Population(10, sim.IF_curr_exp(), label="pop_1")

Will result in 5 Machine Vertexes

But pop_1 = sim.Population(10, sim.IF_curr_exp(), label="pop_1") sim.set_number_of_neurons_per_core(sim.IF_curr_exp, 2)

results in 1 Machine Vertex

So the questions is this the desired behaviour

If yes I suggest a warning if set_number_of_neurons_per_core is called after Population

If no on a set_number_of_neurons_per_cor iterate through all Populations to find any existing ones and limit them too.

andrewgait commented 2 years ago

I think I'd say no, because the set_number_of_neurons_per_core does specify which model (not Population) that you wish to do this for. So yes, I would iterate through all current Populations to find any matching the specified model and limit them too.