faiss icon indicating copy to clipboard operation
faiss copied to clipboard

knn_gpu should use raft when raft is compiled in

Open mdouze opened this issue 1 year ago • 2 comments

by default use_raft is set to false, see

https://github.com/facebookresearch/faiss/blob/main/faiss/python/gpu_wrappers.py#L59

It should be set to use_raft='auto' and decide at runtime using get_compile_options().

https://github.com/facebookresearch/faiss/blob/main/faiss/gpu/GpuIndex.cu#L532

mdouze avatar Apr 23 '24 14:04 mdouze

in fact the GpuDistanceParams.use_raft should be set to true by default when raft is used.

NB that

https://github.com/facebookresearch/faiss/blob/main/contrib/torch_utils.py#L496

does not support RAFT. Needs to be fixed as well.

mdouze avatar Apr 24 '24 05:04 mdouze

There may be a float16 bug. Also make sure there is good test coverage for GPU torch array + raft + float16.

mdouze avatar Apr 24 '24 08:04 mdouze