Add support for IndexIDMap with Cagra fp16#4411
Add support for IndexIDMap with Cagra fp16#4411jinsolp wants to merge 24 commits intofacebookresearch:mainfrom
Conversation
|
One of the issues that I've noticed is that the current extended API approach results in a lot of warnings from all child structs at compile time. This is because we have an overload of a function (e.g. The straightforward solution is to add |
mdouze
left a comment
There was a problem hiding this comment.
For this change to work without user visible degradation, we should implement implicit conversion fp16->fp32 in C++ for add/search/train. There are a few fp16 routines for CPU here: https://github.com/facebookresearch/faiss/blob/main/faiss/utils/fp16.h
|
@mdouze Thanks for your feedback! I have made a few changes : )
|
|
I don't understand the rationale for the |
|
@mdouze In the current CI runs for cuVS build, it can be seen that it raises a warning for every single index https://github.com/facebookresearch/faiss/actions/runs/16378195325/job/46284306200 e.g. I've stated the reason for this in the comment above
TLDR; warning happen because most child structs don't override the overloaded functions (i.e. most child structs don't override the extended API). There are two ways to tackle this cpp warning
|
|
Sorry for delayed responses. At least to me, it does not seem like a problem to annotate this 1 line on all the indexes that require it, if the API stays as |
|
Got it, thanks @mnorris11 , I'll fix this today and push : ) |
|
@mnorris11 has imported this pull request. If you are a Meta employee, you can view this in D78695771. |
|
@mnorris11 Now the diff is really big, but we are 1) keeping the previous API (without the swig wasn't able to process macros or work with |
|
@mnorris11 has imported this pull request. If you are a Meta employee, you can view this in D78695771. |
|
@mnorris11 merged this pull request in 71f775b. |
Summary: This PR does 2 things - Enable support fot `IndexIDMap` with Cagra fp16 (original support introduced in facebookresearch#4188) - Added tests in `test_cagra.py` - Reflecting feedback about python API from facebookresearch#4384 (comment) Pull Request resolved: facebookresearch#4411 Reviewed By: junjieqi Differential Revision: D78695771 Pulled By: mnorris11 fbshipit-source-id: 4b3a0869bed5d33165354f415c748812b0d4b253
Summary: Closes facebookresearch#4430 by exposing int8 for cuVS cagra. This PR (facebookresearch#4411) needs to be merged before this one . Pull Request resolved: facebookresearch#4439 Reviewed By: junjieqi Differential Revision: D78746656 Pulled By: mnorris11 fbshipit-source-id: 79147c8196f298c443796a615fabefac34fb188d
Summary: This PR does 2 things - Enable support fot `IndexIDMap` with Cagra fp16 (original support introduced in facebookresearch/faiss#4188) - Added tests in `test_cagra.py` - Reflecting feedback about python API from facebookresearch/faiss#4384 (comment) Pull Request resolved: facebookresearch/faiss#4411 Reviewed By: junjieqi Differential Revision: D78695771 Pulled By: mnorris11 fbshipit-source-id: 4b3a0869bed5d33165354f415c748812b0d4b253
Summary: Closes facebookresearch/faiss#4430 by exposing int8 for cuVS cagra. This PR (facebookresearch/faiss#4411) needs to be merged before this one . Pull Request resolved: facebookresearch/faiss#4439 Reviewed By: junjieqi Differential Revision: D78746656 Pulled By: mnorris11 fbshipit-source-id: 79147c8196f298c443796a615fabefac34fb188d
This PR does 2 things
IndexIDMapwith Cagra fp16 (original support introduced in Add the support for IndexIDMap with Cagra index #4188)test_cagra.py