AllenInstitute / bmtk

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

Making non-separable FilterNet faster #335

Closed shixnya closed 1 year ago

shixnya commented 1 year 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 1 year 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.