-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
GPU Search billion vectors failed #379
Comments
Your code snippet is not complete, as it won't ocmpile. Are you enabling sharding? 400 million * 24 bytes per vector will fit on a single GPU, whereas 1 billion will not. Can 500 million fit on a single GPU? If so, then sharding should allow it to fit on 2 GPUs. |
since your GPU appears to have 24 GB of memory, note that 18% by default is eaten up for temp scratch space in StandardGpuResources, you can reduce this to 1.5 GB or so, and also note that there are overheads. Try aiming for 700 million or so on a single GPU and see if that works. |
@wickedfoo Hi, Actually, I tried to shard 800million to 2 GPU, shard mode =1, and the gpu memory consumption is aounr 18G each after index_cpu_to_gpu_multiple, sitll same issue. Could this have something to do with the Index? |
@0DF0Arc Same issue. I try to use one p4(8GB) to index 30 million 128D vectors with PQ8. However, it fails to add all the vectors to the index. Here is the backtrace: #0 memmove_ssse3_back () at ../sysdeps/x86_64/multiarch/memcpy-ssse3-back.S:1848 Appreciate any help. |
No activity, closing. |
Summary
Platform
OS: <Ubuntu 14.04->
Faiss version:
Running on :
Reproduction instructions
Using a Index IVF10000, PQ24, when add 1 billion random generated data to the index and do search ,get the follow error:
WARN: increase temp memory to avoid cudaMalloc, or decrease query/add size (alloc 18446744065779875840 B, highwater 0 B)
Faiss assertion 'err == cudaSuccess' failed in char* faiss::gpu::StackDeviceMemory::Stack::getAlloc(size_t, cudaStream_t) at /root/workspace/backup/back/SimilaritySearch/src/gpu/utils/StackDeviceMemory.cpp:77; details: cudaMalloc error 2 on alloc size 18446744065770205184
with 400 million vectors, the index and code works ok
code :
faiss::Index* tmp_cpu = faiss::read_index("/home/zxin10/index08b/index_800m.index", false);
faiss::Index* gpu_index = faiss::gpu::index_cpu_to_gpu_multiple((std::vectorfaiss::gpu::GpuResources* &)gpu_memory.res_mul, devices, cpu_index, gpu_memory.options_mul
faiss::Index::idx_t *indices = new faiss::Index::idx_t[nq * k];
float *distances = new float[nq * k];
index->search(nq, query_vecs.data(), k, distances, indices);
The text was updated successfully, but these errors were encountered: