Closed mstimberg closed 4 years ago
I think performance - wise, running on the CPU would not pose much of an issue. However, I think there may be complications with reusing C++ standalone code: We are translating some of the state variables and parameters from a Brian-like format to a GeNN format, in particular synaptic weights. Any operations on those would have to be done on the GeNN data structures, not the original Brian2 ones - unless we want to translate back and forth for each run_regularly operation. This may well need subtle modifications of the C++ standalone code. In any case, we would have to take care of correct data synchronisation between GPU and CPU data, of course.
But outside these caveats it would be great to be able to support timed arrays.
Good point about the synaptic weights – I guess as a first step we could exclude them from the variables you are allowed to use/change in a run_regularly
operation? This would still leave a number of valid use cases.
Agreed, that would work and still be quite useful. for the synapse weights it is essentially just a question of re-indexing correctly ... might not be trivial to plug into the current C++ standalone pipeline ... I need to think about it a bit longer ... would you be happy to attempt a first implementation excluding code that changes synaptic weights?
I'll see what I can do!
Supporting
TimedArray
is one of the main missing features that prevents some users from usingbrian2genn
for their models (see e.g. #95 ). One of the major use cases forTimedArray
is to implement stimuli varying in time, often on a slow time scale and implemented via arun_regulary
operation.Currently, we support a single
run_regulary
operation forNeuronGroup
which gets inserted into the Neuron kernel. Given that thedt
ofrun_regularly
operations is typically orders of magnitude larger than the simulation time step, I wonder whether we should not change this approach and simply perform allrun_regularly
operations on the CPU, re-using the standard C++ standalone implementation. I guess performance-wise that wouldn't change anything? It would also take care of #58 and we could supportTimedArray
in theserun_regularly
operations at least.