You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building faiss_gpu, the objects of faiss_gpu are not copied to the static library libfaiss.a.
Below is the static library capacity output to the build directory.
Since the size of libfaiss.a is smaller than libfaiss_gpu.a, it is assumed that the objects of faiss_gpu are not copied to libfaiss.a.
@mdouze Thanks for the reply!
In FAISS v1.7.4, libfaiss_gpu.a was not generated and libfaiss.a contained both CPU and GPU objects.
Has the specification changed in FAISS v1.8.0?
Also, it appears that libfaiss_gpu.a is not installed as described in issue #3375.
This specification seems to make it difficult for users to use libfaiss_gpu.a.
libfaiss_gpu.a is supposed to be linked into libfaiss via the WHOLE_ARCHIVE directive in its entirety. Maybe this doesn't work when libfaiss is compiled as a static lib.
In FAISS v1.7.4, libfaiss_gpu.a was not generated and libfaiss.a contained both CPU and GPU objects.
Has the specification changed in FAISS v1.8.0?
It's still the case that libfaiss*.so contains both CPU and GPU code. libfaiss_gpu.a was introduced to share the same objects for GPU code across the different versions of libfaiss (generic, avx2, avs512). This considerably reduced the build times for the conda packages. However, it's possible when built as a static library (libfaiss.a) that WHOLE_ARCHIVE packaging (of libfaiss_gpu into libfaiss) doesn't work.
Summary
When building faiss_gpu, the objects of faiss_gpu are not copied to the static library libfaiss.a.
Below is the static library capacity output to the build directory.
Since the size of libfaiss.a is smaller than libfaiss_gpu.a, it is assumed that the objects of faiss_gpu are not copied to libfaiss.a.
In faiss/gpu/CMakeLists.txt#L292-L294 There is a description that links the faiss_gpu object to libfaiss.a, but it does not seem to be working.
Platform
OS:
Faiss version: 1.8.0
Installed from: src
Faiss compilation options:
Running on:
Interface:
Reproduction instructions
The build and library installation commands are shown below.
Check for static library size.
The text was updated successfully, but these errors were encountered: