-
Notifications
You must be signed in to change notification settings - Fork 143
Add InnerProduct and CosineExpanded metric support in NN Descent
#177
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
Merged
Merged
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
5b8fc5a
inner product
divyegala 55f6758
Merge branch 'branch-24.08' into nn-descent-ip
divyegala ed9cd1f
add cosine distance
divyegala 37d7f49
merging upstream
divyegala 3f64888
Merge branch 'nn-descent-ip' of github.com:divyegala/cuvs into nn-des…
divyegala f6276c4
fix style
divyegala 174ffb8
Revert "add cosine distance"
divyegala 2ffe3af
add inner product in tests
divyegala 3faf7e8
Merge remote-tracking branch 'upstream/branch-24.10' into nn-descent-ip
divyegala b838ff8
style check
divyegala fafc4f9
updates
divyegala 87d2d92
Merge remote-tracking branch 'upstream/branch-24.10' into nn-descent-ip
divyegala 09e1d73
compiling
divyegala c29be2d
add missing APIs
divyegala e13bd0c
Merge branch 'branch-24.12' into nn-descent-fea-migrate
divyegala 5ab72c3
Passing batch tests
divyegala 3e084d3
remove comments
divyegala 252a62d
docs fix
divyegala fdea317
disable batch tests
divyegala 2172a84
doc fixes
divyegala d2d77d7
correct namespace for everything
divyegala 47ef5b5
remove extra include
divyegala 1976f76
correct namespace for everything
divyegala 9604963
fix header
divyegala 7846a64
return_distances=true
divyegala 3532c22
remove thrust types and functions
divyegala f5ffd0a
merge
divyegala 1104908
Merge branch 'branch-24.12' into nn-descent-ip
divyegala a339173
add missing file in cmakelists
divyegala eccf2f0
some prints and trials
divyegala 926068c
add cosine, play around with test params
divyegala 3e49e40
reduce test cross product
divyegala 3ac73b4
allow cagra to pass different metrics to nn descent
divyegala 88847bc
add inner_product to hnsw tests
divyegala cec1069
merge upstream
divyegala 14b14e8
fix docs
divyegala 11a7402
reword conditional
divyegala 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| /* | ||
| * Copyright (c) 2024, NVIDIA CORPORATION. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| #include <cstddef> | ||
| #include <cuvs/distance/distance.hpp> | ||
| #include <cuvs/neighbors/nn_descent.hpp> | ||
|
|
||
| namespace cuvs::neighbors::nn_descent { | ||
|
|
||
| index_params::index_params(size_t graph_degree, cuvs::distance::DistanceType metric) | ||
| { | ||
| this->graph_degree = graph_degree; | ||
| this->intermediate_graph_degree = 1.5 * graph_degree; | ||
| this->metric = metric; | ||
| } | ||
| } // namespace cuvs::neighbors::nn_descent |
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
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.