-
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
std::bad_alloc #758
Comments
@linghuang please provide a proper bug report |
Sorry, I missed the "minimal code" section. |
Bugfixes: - slow scanning of inverted lists (#836). Features: - add basic support for 6 new metrics in CPU `IndexFlat` and `IndexHNSW` (#848); - add support for `IndexIDMap`/`IndexIDMap2` with binary indexes (#780). Misc: - throw python exception for OOM (#758); - make `DistanceComputer` available for all random access indexes; - gradually moving from `long` to `int64_t` for portability.
Implemented in 1.5.3 |
Summary
Platform
OS: Ubuntu Server 16.04
Faiss version: GPU version
Faiss compilation options: conda install faiss-gpu -c pytorch
Running on:
Interface:
minimal code to reproduce the issue:
import faiss
import numpy as np
d = 2048
index = faiss.IndexFlatIP(d)
#img_feature_list is a numpy array with dimension of 30000 * 2048
img_feature_list = np.load("feature.npy")
for i in range(40): index.add(img_feature_list)
Reproduction instructions
RAM size is 32G
Run this code, It throws the following error:
“terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Aborted (core dumped)”
But the memory hasn't ran out. The memory is only occupied about 67%.
what to do with this ?
The text was updated successfully, but these errors were encountered: