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

Issues with local build for FAISS 1.10.0 #4215

Open
mbanani opened this issue Feb 27, 2025 · 0 comments
Open

Issues with local build for FAISS 1.10.0 #4215

mbanani opened this issue Feb 27, 2025 · 0 comments

Comments

@mbanani
Copy link

mbanani commented Feb 27, 2025

Thanks for the great library. I've been trying to do a local build of the library, but I can't seem to get it running. I followed the local build instructions with some additional flags during cmake.

cmake -B build \
    -DFAISS_ENABLE_GPU=ON \
    -DFAISS_ENABLE_PYTHON=ON \
    -DBUILD_SHARED_LIBS=ON \
    -DCMAKE_BUILD_TYPE=Release \
    -DFAISS_OPT_LEVEL=avx2 \
    -DCMAKE_CUDA_ARCHITECTURES="87;89" \
    -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc

make -C build -j16 faiss_avx512   
make -C build -j16 swigfaiss
cd build/faiss/python && python setup.py install

While everything seems successful, when I try to import faiss, I get the following error.

>>> import faiss
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/mbanani/.venv/lib/python3.10/site-packages/faiss/__init__.py", line 67, in <module>
    class_wrappers.handle_Index(the_class)
  File "/home/mbanani/.venv/lib/python3.10/site-packages/faiss/class_wrappers.py", line 815, in handle_Index
    replace_method(the_class, 'add_sa_codes', replacement_add_sa_codes)
  File "/home/mbanani/.venv/lib/python3.10/site-packages/faiss/class_wrappers.py", line 50, in replace_method
    orig_method = getattr(the_class, name)
AttributeError: type object 'AdditiveCoarseQuantizer' has no attribute 'add_sa_codes'

Please let me know if you have any suggestions on what might be causing the issue. Thank you!

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

1 participant