-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate from RAFT to CUVS #3549
base: main
Are you sure you want to change the base?
Conversation
@asadoughi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@asadoughi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Looks like unpinned CMake with 24.08 works.
In addition to the torch CPU tensor issue, let's track
- migration to libcuvs 24.10, pending your discussion with @cjnolet
- including cuVS build time 1+ hr more than other CI jobs
- cuVS in FAISS documentation - already filed Add CuVS (aka RAFT) documentation #3823
Remove the dependency on
raft::compiled
and modify GPU implementations to use cuVS backend in place of RAFT.A deeper insight into the dependency:
FAISS gets the ANN algorithm implementations such as IVF-Flat and IVF-PQ from cuVS. RAFT is meant to be a lightweight C++ header-only template library that cuVS relies on for the more fundamental / low-level utilities. Some examples of these are RAFT's device mdarray and mdspan objects; the RAFT resource object (
raft::resource
) that takes care of the stream ordering of device functions; linear algebra functions such as mapping, reduction, BLAS routines etc. A lot of the cuVS functions take the RAFT mdspan objects as arguments (for exampleraft::device_matrix_view
). Therefore FAISS relies on both cuVS and RAFT. FAISS gets RAFT headers through cuVS and uses them to create the function arguments that can be consumed by cuVS. Note that we are not explicitly linking FAISS againstraft::raft
orraft::compiled
. Only the required headers are included and compiled rather than compiling the whole RAFT shared library. This is the reason we still see mentions ofraft
in FAISS.