Open jpletcher opened 3 months ago
@jpletcher
The normalize_l2 is only implemented on CPU so we can't utilize GPU for normalize_2 method for now.
Right now, the normalzie_l2 implementation should leverage autovectorization https://github.com/facebookresearch/faiss/blob/34bbe5e540bbc4edd0de38cb98bf0a563b2bae45/faiss/utils/distances_simd.cpp#L200-L209
Summary
Running searches against a GPU index using
normalize_L2
is heavily CPU intensive.Please refer to the following psuedo code:
When invoking
query()
, we find that the platform is CPU constrained where CPU resources are consumed atfvec_renorm_L2 (faiss/swigfaiss.py)
, while GPU utilization remains stable.Additionally, for this case, AVX2 support is not available.
Platform
OS: Linux
Faiss version: faiss-gpu-1.7.2
Installed from: pip
Faiss compilation options: N/A
Running on:
Interface:
Reproduction instructions