Skip to content

Conversation

@yger
Copy link
Collaborator

@yger yger commented Jan 8, 2026

This PR adds the possibility to activate a fast_mode for the numba implementation. The mode will parallelize use prange(), but at the cost of some (rare) racing conditions that might possibily bring some numerical instabilities. Tested on 1000 units firing at few herz for 1000s, the error is less than one spike out of a million compared to the normal one

@alejoe91 alejoe91 added the postprocessing Related to postprocessing module label Jan 8, 2026
@yger yger mentioned this pull request Jan 8, 2026
@yger yger requested review from alejoe91 and samuelgarcia January 19, 2026 13:25
@samuelgarcia samuelgarcia added this to the 0.104.0 milestone Feb 3, 2026
Copy link
Member

@alejoe91 alejoe91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @yger

I would remove the fast_mode args from the numpy implementation since it's not used.

Also, maybe worth setting fast_mode="auto" by default and enable it in case of many units/many spikes?

yger and others added 7 commits February 5, 2026 16:29
Co-authored-by: Alessio Buccino <alejoe9187@gmail.com>
Co-authored-by: Alessio Buccino <alejoe9187@gmail.com>
Co-authored-by: Alessio Buccino <alejoe9187@gmail.com>
Co-authored-by: Alessio Buccino <alejoe9187@gmail.com>
Co-authored-by: Alessio Buccino <alejoe9187@gmail.com>
Co-authored-by: Alessio Buccino <alejoe9187@gmail.com>
@yger
Copy link
Collaborator Author

yger commented Feb 5, 2026

I've made fast_mode "auto" by default, (can also be "never" or "always"). "auto" means that if there are more than 300 neurons and "numba", it is activated

@alejoe91
Copy link
Member

alejoe91 commented Feb 6, 2026

I've made fast_mode "auto" by default, (can also be "never" or "always"). "auto" means that if there are more than 300 neurons and "numba", it is activated

Maybe "off"/"on" instead of never/always? :)

@yger
Copy link
Collaborator Author

yger commented Feb 6, 2026

done, let's go for on/off

@alejoe91 alejoe91 merged commit 25940b4 into SpikeInterface:main Feb 6, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

postprocessing Related to postprocessing module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants