-
Notifications
You must be signed in to change notification settings - Fork 222
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 was: invalid configuration argument #274
Comments
I see that #231 is the same problem, but I cannot implement the same workaround of parsing out sparse portions of the recording. I will comment out the print statement for now as it does not seem crucial to the sort, but insight would still be welcomed. |
Now I'm running into this error: `Error using gpuArray/subsref Error in learnTemplates (line 228) Error in learnAndSolve8b (line 35) Error in main_kilosort (line 46) Error in run (line 91) ` |
Can you please confirm that the path is pointing only to Kilosort2.5 and you compiled the mex files successfully? Also please copy paste here the output of "gpuDevice(1)" in Matlab. |
Hi Marius,
|
Reading other related issues I think the problem comes from the way ecephys_spike_sorting concatenates trials. Trials are concatenated with zeropadding, so if you concatenate two recordings that had a 5 min break you will have 5 min of no spiking in the middle and that seems to cause the error. What would be the best workaround? My concatenated file has breaks of maximum 20 seconds. |
@marius10p I can confirm that mexGPUall.m ran successfully, and that I am running kilosort 2.5 (as I only have 2.5 downloaded): `Building with 'nvcc'. MEX completed successfully. When run gpuDevice(1): `CUDADevice with properties:
` |
I've run into a similar error and I agree that it seems to be due to periods of the recording with no spikes. In my investigations it looks like if mexGetSpikes2 in learnTemplates doesn't find any spikes or templates in ibatch = 1, it results in Nfilt = 0. Then, something goes wrong in the later mex functions, which results in a CUDA error if you try to write to W (as shown above) or (in my case) nsp a few lines later. Basically, it seems like additional functionality needs to be added to deal with breaks in the data (e.g. #288) or recordings with few good neurons, at least in terms of reporting the issue so the user knows the problem is a lack of neurons, not some other issue. As always, thanks @marius10p for all your hard work! Our lab really appreciates this resource! |
Hi @marius10p , is this still an issue for anyone? I think I'm running on it too. I'm recording a baseline of 15/20 minutes, apply a drug and wait ~15/20, then record other 15/20 min. I'm concatenating the two sessions with CatGT and then use Kilosort2.
Error in median (line 71) Error in learnAndSolve8b (line 264) Error in master_kilosortM (line 53)
Does anyone have any tips? Thanks |
Hi! You should take a look at issue #275. I have a fork of kilosort that took care of that problem. You can also reduce the "pause" with cat_gt https://billkarsh.github.io/SpikeGLX/help/dmx_vs_gbl/dmx_vs_gbl/ that would solve the problem too and it's simpler if you are already using the eceephys pipeline. |
Hi @RobertoDF, thanks a lot for the help. I'll try your fork of KS 2.5 then. On a side note, I'm already using cat_gt, but I'm unsure how this could help? I'm using cat_gt with the following options: Thanks |
@RobertoDF I tried your fork (downloaded and extracted the zip file) but I'm running in the following problems:
Error in median (line 71) Error in learnTemplates (line 248) Error in learnAndSolve8b (line 35) Error in main_kilosort (line 48)
Am I doing something obviously wrong when I setup the new KS? By the way, I'm running this on Ubuntu 20.04; also, KS2 folder does not appear in my MATLAB path. Thanks |
Having trouble approaching the following error. I think it has something to do with an inappropriate ops.Nfilt value, so I will set that to 1024. Any insight would be appreciated.
Error using gpuArray/nan
An unexpected error occurred trying to launch a kernel. The CUDA error was:
invalid configuration argument
Error in median (line 71)
y = nan(s,'like',x);
Error in learnTemplates (line 248)
toc, ibatch, niter, Nfilt, sum(nsp), median(mu), numel(st0), ndrop)
Error in learnAndSolve8b (line 35)
rez = learnTemplates(rez, rez.iorig);
Error in main_kilosort (line 46)
rez = learnAndSolve8b(rez, iseed);
Error in run (line 91)
evalin('caller', strcat(script, ';'));
The text was updated successfully, but these errors were encountered: