Matthijs Douze
Matthijs Douze
Note that we cannot pass through the numpy wrapper because numpy does not support bf16. Adapting `gpu_knn` code for pytorch should be easy https://github.com/facebookresearch/faiss/blob/dc55e11874e4e32d0f04a9d62156ebe2ca25192d/contrib/torch_utils.py#L497
+ add bfloat16 support here https://github.com/facebookresearch/faiss/blob/main/faiss/gpu/GpuDistance.h#L76
Compiling Faiss GPU on windows is not supported by the core Faiss team. Any progress, comments on this configuration is welcome.
https://github.com/facebookresearch/faiss/wiki/Installing-Faiss#why-dont-you-support-installing-via-xxx-
As the error says, GpuIndexIVFScalarQuantizer does not support the sa_codec interface. NB that scalar quantizer encoding is very cheap, so there is no need to use a GPU to speed...
Thanks for the clean bug report...
I can repro
This test here is an error, since the values are not classes but instances. https://github.com/facebookresearch/faiss/blob/main/faiss/python/class_wrappers.py#L1084C28-L1084C28 however, it does not explain the memory leak.
``` subset = np.arange(0, 5000000) sel = faiss.IDSelectorBatch(subset) sel.this.own() # True: correct params = faiss.SearchParameters(sel=sel) sel.this.own() # False: why??? ```
see https://github.com/facebookresearch/faiss/pull/3007