Skip to content

[BUG] Fix graph index sorting in CAGRA graph build by NN Descent #763

Merged
rapids-bot[bot] merged 7 commits intorapidsai:branch-25.04from
enp1s0:fix-cagra-build-nnd-sort
Mar 25, 2025
Merged

[BUG] Fix graph index sorting in CAGRA graph build by NN Descent #763
rapids-bot[bot] merged 7 commits intorapidsai:branch-25.04from
enp1s0:fix-cagra-build-nnd-sort

Conversation

@enp1s0
Copy link
Member

@enp1s0 enp1s0 commented Mar 14, 2025

Graph neighbor sorting after the initial kNN graph construction by NN descent always uses the L2 norm, while NN descent also supports the inner product and cosine distance. This PR adds support for the inner product and cosine distance in graph neighbor sorting.

TODO

  • Normalize vector when metric == Cosine

@enp1s0 enp1s0 requested a review from a team as a code owner March 14, 2025 09:16
@enp1s0 enp1s0 self-assigned this Mar 14, 2025
@github-actions github-actions bot added the cpp label Mar 14, 2025
@enp1s0 enp1s0 added bug Something isn't working non-breaking Introduces a non-breaking change cpp breaking Introduces a breaking change and removed cpp non-breaking Introduces a non-breaking change labels Mar 14, 2025
@tfeher tfeher added non-breaking Introduces a non-breaking change and removed breaking Introduces a breaking change labels Mar 24, 2025
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 @enp1s0 for the PR, it looks good to me!

@tfeher
Copy link
Contributor

tfeher commented Mar 25, 2025

/merge

@rapids-bot rapids-bot bot merged commit ff86827 into rapidsai:branch-25.04 Mar 25, 2025
66 checks passed
moccch pushed a commit to Supercomputing-System-AI-Lab/VecFlow that referenced this pull request Apr 11, 2025
Graph neighbor sorting after the initial kNN graph construction by NN descent always uses the L2 norm, while NN descent also supports the inner product and cosine distance. This PR adds support for the inner product and cosine distance in graph neighbor sorting.

## TODO
- [x] Normalize vector when metric == Cosine

Authors:
  - tsuki (https://github.com/enp1s0)

Approvers:
  - Tamas Bela Feher (https://github.com/tfeher)

URL: rapidsai/cuvs#763
@enp1s0 enp1s0 deleted the fix-cagra-build-nnd-sort branch September 29, 2025 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working cpp non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants