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

[ENH] [4/5] Header structure: split search of ivf methods #1440

Conversation

ahendriksen
Copy link
Contributor

@ahendriksen ahendriksen commented Apr 20, 2023

This PR splits the ivf-pq and ivf-flat search methods. It is a follow up to PR #1439.

This PR:

  • Halves the number of instances of interleaved_scan_kernel, by instantiating only for veclen=1 or veclen=16/sizeof(DataT).
  • Extracts the interleaved_scan_kernel code from the ivf_flat_search.cuh header
  • Extracts the compute_similarity_kernel code from ivf_pq_search.cuh header
  • Makes the template parameters of IVF-flat consistent

Instead of having the specializations in sub-directories, the
raft_runtime source files now mimic the include/ directory hierarchy.
Used .data() instead of .data_handle()
These types are not used in the ext header, but are useful to have.
Under multiple combinations of RAFT_EXPLICIT_INSTANTIATE_ONLY and RAFT_COMPILED
The compute_similarity and interleaved_scan kernel are quite expensive
to compile. Splitting the headers in this commit.
@ahendriksen ahendriksen requested review from a team as code owners April 20, 2023 17:46
@github-actions github-actions bot added the CMake label Apr 20, 2023
@github-actions github-actions bot added the cpp label Apr 20, 2023
@ahendriksen
Copy link
Contributor Author

Review tip: the only difference compared to PR #1439 is the last commit. The full diff wrt branch-23.06 includes PR #1437, so it is a bit much.

@ahendriksen ahendriksen changed the title [ENH] [3/5] Header structure: split search of ivf methods [ENH] [4/5] Header structure: split search of ivf methods Apr 20, 2023
@ahendriksen ahendriksen added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change Build Time Improvement labels Apr 21, 2023
@ahendriksen ahendriksen self-assigned this Apr 21, 2023
Copy link
Contributor

@tfeher tfeher left a comment

Choose a reason for hiding this comment

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

Thanks Allard, I have just one question for clarification, otherwise the PR looks good to me.

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.

Just one comment about expanding documentation, but it doesn't have to be a part of this PR!

Copy link
Member

@cjnolet cjnolet left a comment

Choose a reason for hiding this comment

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

LGTM pending requested changes in #1437

@cjnolet cjnolet closed this Apr 28, 2023
rapids-bot bot pushed a commit that referenced this pull request Apr 28, 2023
This is a rebase of all the commits in PRs:
- #1437 
- #1438 
- #1439 
- #1440 
- #1441 

The original PRs have not been rebased to preserve review comments. This PR is up to date with branch 23.06.

Closes #1416

Authors:
  - Allard Hendriksen (https://github.com/ahendriksen)

Approvers:
  - Divye Gala (https://github.com/divyegala)
  - Corey J. Nolet (https://github.com/cjnolet)

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

Successfully merging this pull request may close these issues.

4 participants