Skip to content
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

Removing FAISS from build #1340

Merged
merged 89 commits into from
Mar 18, 2023

Conversation

cjnolet
Copy link
Member

@cjnolet cjnolet commented Mar 14, 2023

This depends on #1202 so those changes are also included here. This should also not be merged until that PR is merged.

benfred and others added 30 commits January 27, 2023 11:03
Replace faiss bfKnn with code that leverages our pairwise_distance api
and select_k api - by computing tiling over the inputs.

This lets us remove faiss as a dependency
This reverts commit 8eaba84.

Change didn't seem to build in CI
Also remove metrics processors - since is handled inside PW distance
This reverts commit fe728e9.

This is causing incorrect results, just use the faiss select_k call
instead
@bdice
Copy link
Contributor

bdice commented Mar 14, 2023

@cjnolet Thanks for splitting this, I agree this will be better and allow the faiss removal to merge faster. If #1202 is targeting 23.04, should the faiss removal also target 23.04?

@cjnolet
Copy link
Member Author

cjnolet commented Mar 14, 2023

@bdice I'm a little concerned doing that large of a change at the very end of 23.04, which is why we're targeting this specifically for early 23.06. What might not be obvious from the bfknn PR is that there are some follow-on features needed (in 23.04) as well in order remove FAISS fully from cuML.

@bdice
Copy link
Contributor

bdice commented Mar 14, 2023

@bdice I'm a little concerned doing that large of a change at the very end of 23.04, which is why we're targeting this specifically for early 23.06. What might not be obvious from the bfknn PR is that there are some follow-on features needed (in 23.04) as well in order remove FAISS fully from cuML.

Gotcha. Sounds good, thanks for the context!

@cjnolet cjnolet requested a review from a team as a code owner March 14, 2023 20:24
@github-actions github-actions bot added the ci label Mar 15, 2023
@cjnolet cjnolet requested a review from a team as a code owner March 17, 2023 17:43
@cjnolet cjnolet changed the base branch from branch-23.06 to branch-23.04 March 17, 2023 18:47
Copy link
Member

@benfred benfred left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

Copy link
Contributor

@vyasr vyasr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

Copy link
Contributor

@vyasr vyasr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like faiss still needs to be removed from the conda recipes (libcudf/meta.yaml and conda_build_config.yaml). Also, I still see faiss_select files and namespaces (coming from selection_faiss.cuh) in a number of places, do those need to be removed as well?

@cjnolet
Copy link
Member Author

cjnolet commented Mar 17, 2023

Looks like faiss still needs to be removed from the conda recipes (libcudf/meta.yaml and conda_build_config.yaml). Also, I still see faiss_select files and namespaces (coming from selection_faiss.cuh) in a number of places, do those need to be removed as well?

@vyasr done. And no, the faiss_select/ directory has a couple minor headers we've copied out of FAISS in the meantime. We're going to be getting rid of those soon too but it allows us to make progress otherwise.

@cjnolet
Copy link
Member Author

cjnolet commented Mar 18, 2023

Thinking about this more, we would like to have RAFT integrated into FAISS by early 23.06, which means FAISS will likely want to be using 23.04, at least to start. Given the transition has been smoother than I had originally thought this far, and since it's still a couple weeks from burndown, I'm going to go ahead and merge this over now. If we encounter any problems leading not burndown, im going to revert the change and push to 23.06. Cc @bdice @jakirkham @vyasr

@cjnolet
Copy link
Member Author

cjnolet commented Mar 18, 2023

/merge

@rapids-bot rapids-bot bot merged commit c4671ed into rapidsai:branch-23.04 Mar 18, 2023
rapids-bot bot pushed a commit that referenced this pull request Mar 20, 2023
…#1333)

Now that we no longer need to rely on the FAISS dependency, this PR:
1. Consolidates  the `libraft-distance` and `libraft-nn` targets into a single `libraft` artifact
2. Introduces a new `raft::compiled` target to link against the new `libraft.so` binary. Removes `raft::distance`and `raft::nn` targets.
3. Consolidates `RAFT_DISTANCE_COMPILED` and `RAFT_NN_COMPILED` pre-processor vars into a single `RAFT_COMPILED` (to match similar pattern implementated by `spdlog`)
4. Consolidates `specializations.cuh` headers
5. Updates all docs, scripts, and build infra

This change has been a long time coming and is intended to be a 23.04 feature. This is further going to require updates to several projects downstream. Here's a checklist to track that progress:
- [x] offline announcement
- [x] cuml rapidsai/cuml#5272
- [x] cugraph rapidsai/cugraph#3348
- [x] cuopt rapidsai/cuopt#1023
- [x] cugraph-ops rapidsai/cugraph-ops#429


This PR depended on #1340 (removing FAISS from the build) and on #1202 (replacing the FAISS bfknn w/ our own), both of which have been merged. 

Closes #824

Authors:
  - Corey J. Nolet (https://github.com/cjnolet)
  - Ben Frederickson (https://github.com/benfred)

Approvers:
  - Sevag H (https://github.com/sevagh)
  - Divye Gala (https://github.com/divyegala)
  - Ben Frederickson (https://github.com/benfred)
  - Vyas Ramasubramani (https://github.com/vyasr)

URL: #1333
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Breaking change CMake cpp improvement Improvement / enhancement to an existing function
Projects
Development

Successfully merging this pull request may close these issues.

5 participants