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

CUDA error while running run_sorter_by_property("kilosort4", ... #3550

Open
paolahydra opened this issue Nov 24, 2024 · 3 comments
Open

CUDA error while running run_sorter_by_property("kilosort4", ... #3550

paolahydra opened this issue Nov 24, 2024 · 3 comments

Comments

@paolahydra
Copy link

Hi everyone,

Occasionally, and in a not entirely reproducible way, I get this error while running kilosort (full error report in the file attached):

File "C:\Users\SNeurobiology\miniconda3\envs\ephys-env\lib\site-packages\kilosort\clustering_qr.py", line 178, in kmeans_plusplus
ix = dexp[:, imax] > 0
RuntimeError: CUDA error: unknown error
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.

ks error.txt

With most datasets, I have no problems.
With some datasets, calling the function again will work.
With this one dataset, I am stuck at the second of 4 shanks and cannot move past that.

I have two questions:

  1. Do you have any insight on what might be the underlying problem and how to fix it?
  2. Is there a way to call run_sorter_by_property on a single specified group which is not necessarily the first (0)? Since I managed to sort shank 0, and I am getting the error in shank 1, I would like to skip 0 and possibly 1 too...

Thanks,
Paola
running:
spikeinterface 0.101.0
kilosort 4.0.6

@samuelgarcia
Copy link
Member

Hi Paola.
Are you using the run_sorter_by_property(engine='loop') with a diffrent engine than loop ?
Maybe you are using engine='joblib' and then you have a parallel acces to the cuda driver.

@paolahydra
Copy link
Author

Hi Samuel,
I am using engine='joblib' indeed. I will try using 'loop' instead.

There is no easy way to skip the group I have already processed, right?

Thanks!
Paola

@zm711
Copy link
Collaborator

zm711 commented Dec 3, 2024

Did the "loop" work? I'm just trying to follow up on stuff. What do you mean by skip already processed? :)

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

3 participants