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

Copy all eventspace counters to host efficiently at each time step #282

Open
denisalevi opened this issue Apr 13, 2022 · 0 comments
Open

Comments

@denisalevi
Copy link
Member

denisalevi commented Apr 13, 2022

Currently, there are multiple kernels that require or could be optimized when having the number of spiking neurons on the host and each kernel calls their own cudaMemcpy or would have to.

Instead, implement an asynchronous cudaMemcpy from device to host after all thresholders (for any spike or event condition) are run.

  1. Move the event counters for all eventspaces into a single contiguous array, such that one copy can copy all counters for multiple eventspaces at once. This would require changing the access to the counter variable in some kernels, but should be easy to do.
  2. Detect from Python side which kernel will be the first to require the counter variables. That kernel should that synchronize with the asynchronous copy call. Also detect if no kernel requires the counters and don't copy in that case.

Related issues that would benefit or could be closed by this:

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

1 participant