-
Notifications
You must be signed in to change notification settings - Fork 228
CAGRA: variable graph degree for CPU-based algorithm #2031
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
Open
achirkin
wants to merge
44
commits into
NVIDIA:main
Choose a base branch
from
achirkin:fea-variable-graph-degree
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 35 commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
36abd64
Add variable graph degree option to cagra optimize
achirkin 261fc3d
Improve the trimming logic
achirkin b642179
Improve the wording
achirkin de0bcaa
Remove irrelevant file
achirkin 7e89304
Merge branch 'main' into fea-variable-graph-degree
achirkin a0f6379
Set defaults for HNSW heuristics and fix parameter parsing
achirkin 970807c
Merge branch 'main' into fea-variable-graph-degree
achirkin 3ca3d37
Merge branch 'main' into fea-variable-graph-degree
achirkin 21758da
Merge branch 'main' into fea-variable-graph-degree
achirkin ab3c3b6
Merge branch 'main' into fea-variable-graph-degree
achirkin 9f51236
Merge branch 'main' into fea-variable-graph-degree
achirkin 5cb53f0
Add an explicit sentinel value for invalid indices
achirkin 4001a1e
Merge remote-tracking branch 'rapidsai/main' into fea-variable-graph-…
achirkin a244b52
Merge branch 'main' into fea-variable-graph-degree
achirkin 40e6517
Add optimize step when building hierarchy
achirkin 5d5c4d4
Filter the merged reverse graph by in-degree
achirkin 9b92959
Merge branch 'main' into fea-variable-graph-degree
achirkin d9a830a
Merge branch 'main' into fea-variable-graph-degree
achirkin 4e517d0
Update the style and pruning logic
achirkin f528bfe
Don't prune highways and make the skipping threshold soft
achirkin 7a07da5
Merge branch 'main' into fea-variable-graph-degree
achirkin b858600
Use the constant for the invalid graph neighbor idx
achirkin c95b28d
Undo unnecessary changes to the reverse graph construction step
achirkin 8b4a50e
Undo unnecessary changes to the reverse graph construction step
achirkin dbabfee
Undo unnecessary changes to the reverse graph construction step
achirkin 96ef206
Change natural degree logging to the debug level and guard it
achirkin 12238a8
Fix the ACE build
achirkin d6c65f2
Merge branch 'release/26.08' into fea-variable-graph-degree
achirkin 59663c9
Merge branch 'release/26.08' into fea-variable-graph-degree
achirkin 7463575
Merge branch 'release/26.08' into fea-variable-graph-degree
achirkin ed3b216
Merge branch 'release/26.08' into fea-variable-graph-degree
achirkin 1a09c84
Merge branch 'main' into fea-variable-graph-degree
achirkin 502d016
Merge remote-tracking branch 'rapidsai/main' into fea-variable-graph-…
achirkin 8fae452
Merge branch 'main' into fea-variable-graph-degree
achirkin 9604c86
Merge branch 'main' into fea-variable-graph-degree
achirkin e80bbfc
Merge branch 'main' into fea-variable-graph-degree
achirkin 7d1931e
Update SIMILAR_SEARCH_PERFORMANCE description
achirkin fbfae36
Use graph_row to count the degree
achirkin da69a3f
Multiple fixes to address comments in graph_core
achirkin 9cb2def
Use named constant
achirkin e61feee
Avoid info-level logging and relax constrain to allow zero degree fra…
achirkin b291f82
Merge branch 'main' into fea-variable-graph-degree
achirkin ab9779a
Make disable variable degree for SIMILAR_SEARCH_PERFORMANCE heuristic
achirkin 10e79c7
Merge branch 'main' into fea-variable-graph-degree
achirkin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -277,8 +277,14 @@ void serialize_to_hnswlib( | |
| size_t bytes_written = 0; | ||
| float GiB = 1 << 30; | ||
| for (std::size_t i = 0; i < index_.size(); i++) { | ||
| auto graph_degree = static_cast<int>(index_.graph_degree()); | ||
| os.write(reinterpret_cast<char*>(&graph_degree), sizeof(int)); | ||
| int actual_degree = static_cast<int>(index_.graph_degree()); | ||
| for (int j = 0; j < actual_degree; j++) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Which values of |
||
| if (host_graph(i, j) == static_cast<IdxT>(-1)) { | ||
|
achirkin marked this conversation as resolved.
Outdated
achirkin marked this conversation as resolved.
Outdated
|
||
| actual_degree = j; | ||
| break; | ||
| } | ||
| } | ||
| os.write(reinterpret_cast<char*>(&actual_degree), sizeof(int)); | ||
|
|
||
| IdxT* graph_row = &host_graph(i, 0); | ||
| os.write(reinterpret_cast<char*>(graph_row), sizeof(IdxT) * index_.graph_degree()); | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.