Skip to content
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

Spikes are lost when changing delays between run calls #302

Open
denisalevi opened this issue Jun 22, 2022 · 3 comments
Open

Spikes are lost when changing delays between run calls #302

denisalevi opened this issue Jun 22, 2022 · 3 comments

Comments

@denisalevi
Copy link
Member

This is a follow-up of #83

In PR #300, I fixed the spike loss between run calls in general (when there are delays and spikes are still in queues or circular eventspaces). This also works when changing heterogeneous delays between run calls. But it currently fails when changing a scalar delay and also when changing between scalar and heterogeneous delays.

  • For changing the from one scalar delay to another: I think the eventspaces are created correctly and not deleted between runs, some debugging showed that they are even populated with the spikes from a previous run. I'm not exactly sure what is going wrong here... Leaving this for another time.
  • For changing between heterogenenous and scalar delays, we would have to somehow copy the spikes between the two methods (since for heterogenenous delays we use vectors in device code as queues, and for scalar delays we use circular eventspaces managed on host).
@mstimberg
Copy link
Member

Without having thought about this in depth: how would you actually change between scalar and heterogeneous delays? I don't think our syntax allows for it.

@denisalevi
Copy link
Member Author

syn = Synapses(...)
syn.delay = 'j*ms'
run(...)
syn.delay = '1*ms'
run(...)

Here, the delays will be heterogeneous during the first and homogeneous during the second run. The homogeneous delay is only detected in the generated code, but it still leads to a different algorithm (using a circular list of multiple eventspaces instead of a spikequeue implementation).

@mstimberg
Copy link
Member

Ah, ok, so it is not homogeneous on the Brian/Python side. Not sure if this corner case is really important enough to be handled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants