Skip to content

Fix for NN Descent negative or NaN distances - #994

Merged
rapids-bot[bot] merged 3 commits into
NVIDIA:branch-25.08from
jinsolp:nnd-zero-dist
Jun 9, 2025
Merged

rapids-bot[bot] merged 3 commits into
NVIDIA:branch-25.08from
jinsolp:nnd-zero-dist

Conversation

@jinsolp

@jinsolp jinsolp commented Jun 6, 2025

Copy link
Copy Markdown
Contributor

Closes #991

@jinsolp jinsolp self-assigned this Jun 6, 2025
@jinsolp
jinsolp requested a review from a team as a code owner June 6, 2025 23:15
@github-actions github-actions Bot added the cpp label Jun 6, 2025
@jinsolp jinsolp added bug Something isn't working non-breaking Introduces a non-breaking change and removed cpp labels Jun 6, 2025

@tarang-jain tarang-jain left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@divyegala divyegala left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we add this guard for L2Expanded as well? Considering we may return negative distances

@jinsolp

jinsolp commented Jun 9, 2025

Copy link
Copy Markdown
Contributor Author

This PR handles both L2Expanded and L2SqrtExpanded.
For L2SqrtExpanded, all distances are sqrt-ed at the very end (link) instead of doing it inside the kernel for efficiency!

@github-actions github-actions Bot added the cpp label Jun 9, 2025
@jinsolp

jinsolp commented Jun 9, 2025

Copy link
Copy Markdown
Contributor Author

@divyegala Think this is ready to go!

@divyegala

Copy link
Copy Markdown
Contributor

/merge

@rapids-bot
rapids-bot Bot merged commit 6d07116 into NVIDIA:branch-25.08 Jun 9, 2025
@jinsolp
jinsolp deleted the nnd-zero-dist branch June 13, 2025 01:53
bkarsin pushed a commit to bkarsin/cuvs that referenced this pull request Jun 19, 2025
landrumb pushed a commit to landrumb/cuvs that referenced this pull request Jul 8, 2026
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.

[BUG] NN Descent resulting in negative and NaN distances

3 participants