Skip to content

Option to turn on parallel computation for CCG in numba - #4305

Merged
alejoe91 merged 19 commits into
SpikeInterface:mainfrom
yger:parallel_correlograms
Feb 6, 2026
Merged

alejoe91 merged 19 commits into
SpikeInterface:mainfrom
yger:parallel_correlograms

Conversation

@yger

@yger yger commented Jan 8, 2026

Copy link
Copy Markdown
Contributor

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

@alejoe91 alejoe91 left a comment

Copy link
Copy Markdown
Member

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

yger commented Feb 5, 2026

Copy link
Copy Markdown
Contributor Author

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

alejoe91 commented Feb 6, 2026

Copy link
Copy Markdown
Member

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

yger commented Feb 6, 2026

Copy link
Copy Markdown
Contributor Author

done, let's go for on/off

@alejoe91
alejoe91 merged commit 25940b4 into SpikeInterface:main Feb 6, 2026
13 checks passed
@yger
yger deleted the parallel_correlograms branch February 20, 2026 20:16
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