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

Add out-of-place implementations #8

Open
jpsamaroo opened this issue Nov 4, 2019 · 0 comments
Open

Add out-of-place implementations #8

jpsamaroo opened this issue Nov 4, 2019 · 0 comments
Assignees

Comments

@jpsamaroo
Copy link
Collaborator

Currently all neurons/synapses are implemented as in-place operations using nested for loops. While this is great for single-CPU performance, it has a number of downsides:

  • We can't automatically use BLAS or sparse BLAS routines when available.
  • We can't use AD libraries like Zygote as we mutate arrays (which most AD libraries don't support easily, performantly, or at all).
  • To run on GPUs, we'd either need to switch to using GPUifyLoops.jl (which isn't a terrible idea), or write custom kernels (not difficult, but duplicative, especially if supporting both CUDA and AMDGPU, which I fully intend to implement).

An OOP implementation using broadcasting should solve many of these problems. I propose implementing these in parallel to our current implementations, using dispatch or kwargs to choose which to use at runtime.

@jpsamaroo jpsamaroo self-assigned this Nov 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant