Optimize hnsw::from_cagra<GPU>#826
Merged
rapids-bot[bot] merged 14 commits intorapidsai:branch-25.06from Apr 25, 2025
Merged
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Contributor
Author
|
/ok to test |
Contributor
Author
Example timelineHardware: NVIDIA H200 NVL + Intel(R) Xeon(R) Gold 6444Y (16 cores / 32 threads) branch-25.06 / input data on the hostbranch-25.06 / input data on the device(segmentation fault) PR-826 / input data on the hostPR-826 / input data on the deviceNotes
|
Member
|
@achirkin it looks like we have some python failures from these changes (this makes me happy we now have python tests for the benchmarks). |
Contributor
Author
|
@cjnolet lol these tests haven't made me happy while I was trying to setup my environment to run them :) and they just complain about a missing useless column I removed for HNSW algorithm (GPU time). |
cjnolet
approved these changes
Apr 25, 2025
Member
|
/merge |
Member
jamxia155
pushed a commit
to jamxia155/cuvs
that referenced
this pull request
Apr 25, 2025
Reduce the CAGRA-for-HNSW build times by: - avoiding unnecessary copies of the data between cagra::build and hnsw::from_cagra in the benchmarks - avoiding unnecessary temporary data buffers in hnsw::from_cagra<GPU> - reducing random reads via forcing 1-1 mapping between the internal indices and external labels during HNSW import As a side-effect, this PR also fixes the bug where hnsw::from_cagra segfaults in benchmarks if the dataset is passed in device memory (and incorrectly wrapped in a host_matrix_view). In addition, this PR adds a bit more verbose NVTX reporting of different stages during the CAGRA/HNSW index build. Authors: - Artem M. Chirkin (https://github.com/achirkin) - Corey J. Nolet (https://github.com/cjnolet) Approvers: - Corey J. Nolet (https://github.com/cjnolet) URL: rapidsai#826
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Reduce the CAGRA-for-HNSW build times by:
As a side-effect, this PR also fixes the bug where hnsw::from_cagra segfaults in benchmarks if the dataset is passed in device memory (and incorrectly wrapped in a host_matrix_view).
In addition, this PR adds a bit more verbose NVTX reporting of different stages during the CAGRA/HNSW index build.