faiss icon indicating copy to clipboard operation
faiss copied to clipboard

Faiss assertion 'err == cudaSuccess' failed in faiss::gpu::StackDeviceMemory::Stack::Stack(int, size_t) at utils/StackDeviceMemory.cpp:33

Open billkle1n opened this issue 9 years ago • 7 comments

I'm getting the following error when trying to run a fairly simple python notebook:

Faiss assertion 'err == cudaSuccess' failed in faiss::gpu::StackDeviceMemory::Stack::Stack(int, size_t) at utils/StackDeviceMemory.cpp:33

The error happens when executing index = faiss.index_cpu_to_gpu(res, 0, index, co):

screen shot 2017-10-30 at 15 38 26

billkle1n avatar Oct 30 '17 22:10 billkle1n

Is your CUDA SDK installed properly and does it match your GPU drivers?

Did you specify the proper compute capability in the compilation?

Also, there's no need to use the cloner, you can just create a GpuIndexFlatIP.

wickedfoo avatar Oct 30 '17 23:10 wickedfoo

Also, how much free GPU memory do you have when you are attempting to run this?

wickedfoo avatar Oct 31 '17 00:10 wickedfoo

(By default Faiss GPU reserves something like 18% of all GPU memory for itself, and it is getting this assertion when it attempts to make that allocation.)

wickedfoo avatar Oct 31 '17 00:10 wickedfoo

No activity, closing.

mdouze avatar Nov 09 '17 19:11 mdouze

FYI: got the same error, due to the fact that my GPU didn't have enough memory available. After killing a few jobs and freeing some memory space, I didn't get this issue anymore.

aconneau avatar Aug 20 '18 12:08 aconneau

I have the same question, so could anyone give me some advice please?

XGBoost avatar Jan 08 '19 05:01 XGBoost

No specific advice, but in the next version of Faiss, GPU errors will raise exceptions instead of crashing. Should be more friendly to users.

mdouze avatar Jan 08 '19 10:01 mdouze