AllenInstitute / bmtk

Brain Modeling Toolkit
https://alleninstitute.github.io/bmtk/
BSD 3-Clause "New" or "Revised" License
265 stars 86 forks source link

Making non-separable FilterNet faster #335

Closed shixnya closed 10 months ago

shixnya commented 10 months ago

I rewrote one function with numba, and it makes non-separable FilterNet much faster. With no MPI, it is >10x faster (using numba's parallelization). With MPI (with an 8-core CPU), it is ~40x faster.

This change makes numba a requirement for FilterNet, so let's discuss it at the meeting before merging it.

kaeldai commented 10 months ago

Looks good and passes all the tests. I think for now it should be good enough to just require numba, but if it causes issues in the future we can just create a fake njit decorator.

Feel free to merge the PR when you are done.