-
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
Conversation
…nto cuvs-migrate
@asadoughi @cjnolet, due to the segmentation fault in the cagra tests with cuvs 24.10, I have reverted to cuVS 24.08. I will continue to work on getting 24.10 in on the side. But it is crucial to get this PR merged quickly. |
@tarang-jain Did you mean to push those latest 4 commits to this PR? If we're rolling forward with 24.08 we should probably go back to 3e056ed. |
b8dca0d
to
ef22fa2
Compare
@asadoughi I have fixed the segmentation fault occurring with 24.10 in the CAGRA tests and so we are very close to getting cuVS 24.10 in. There are still some |
ceaec7c
to
3e056ed
Compare
I have downgraded cuVS to 24.08 again. I'm working on #4021 to get 24.10 in after this PR is merged. |
@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.
Hi @tarang-jain! Thanks for updating. I have just a couple of suggestions inline.
@asadoughi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@asadoughi what are the facebook internal checks that are failing? |
@asadoughi merged this pull request in 1349220. |
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.