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

Consolidate pre-compiled specializations into single libraft binary #1333

Merged
merged 144 commits into from
Mar 20, 2023

Conversation

cjnolet
Copy link
Member

@cjnolet cjnolet commented Mar 11, 2023

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::distanceand 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:

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

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
Copy link
Member

@divyegala divyegala left a comment

Choose a reason for hiding this comment

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

Really minor questions. What a fantastic PR!

build.sh Show resolved Hide resolved
conda/recipes/libraft/meta.yaml Outdated Show resolved Hide resolved
@cjnolet cjnolet added breaking Breaking change 3 - Ready for Review and removed 5 - Merge After Dependencies Depends on another PR: do not merge out of order non-breaking Non-breaking change labels Mar 20, 2023
ajschmidt8 added a commit to ajschmidt8/docker that referenced this pull request Mar 20, 2023
Due to the changes in rapidsai/raft#1333, the `libraft` build command in our `devel` containers need to be updated.
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.

I get the sense that I'm missing some context for the reorganization of the template specialization headers, probably because there were dependencies when using FAISS that have now changed without our usage of FAISS, or possibly because they're now shared between the former nn and dist lib files thanks to them being combined. Assuming all of that was done correctly, the build-related changes look correct to me. Some minor questions that aren't worth blocking over.

@cjnolet
Copy link
Member Author

cjnolet commented Mar 20, 2023

/merge

@rapids-bot rapids-bot bot merged commit 97f8ad7 into rapidsai:branch-23.04 Mar 20, 2023
rapids-bot bot pushed a commit to rapidsai/cugraph that referenced this pull request Mar 21, 2023
Pleae note, this should not be merged until rapidsai/raft#1333 is ready to be merged.

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

Approvers:
  - Chuck Hastings (https://github.com/ChuckHastings)
  - Sevag H (https://github.com/sevagh)

URL: #3348
rapids-bot bot pushed a commit to rapidsai/cuml that referenced this pull request Mar 23, 2023
This is intended to be merged in 23.06 w/ this PR: rapidsai/raft#1333.

Authors:
  - Corey J. Nolet (https://github.com/cjnolet)
  - Vyas Ramasubramani (https://github.com/vyasr)

Approvers:
  - Dante Gama Dessavre (https://github.com/dantegd)
  - AJ Schmidt (https://github.com/ajschmidt8)

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

Successfully merging this pull request may close these issues.

[FEA] Rename libraft-distance to libraft
6 participants