Repository navigation
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 8ba8a8b |
5 of 12 tasks
Contributor
Author
|
/ok to test e89081b |
Contributor
Author
rapids-bot Bot
pushed a commit
that referenced
this pull request
Nov 4, 2026
IVF-RaBitQ computes the probe distance `||q - c||^2` in expanded form (`||q||^2 + ||c||^2 - 2 q.c`). When a query sits on a list centroid, for example a query equal to a row that is duplicated across a whole list, rounding can make that value slightly negative. The block-sort search kernels take `sqrtf` of it for the error bound, which gives NaN. The NaN lower bound then fails `low_dist < threshold` for every vector in that list, so the query's own list contributes no candidates and all k results come from other lists. This affects `QUANT4`/`QUANT8` (the default) at any `bits_per_dim`, and `LUT16`/`LUT32` with `bits_per_dim > 1`. This PR clamps the probe distances to non-negative values after the GEMM. It also adds a regression test where each list holds copies of one row and the queries are those rows. Without the fix, 18 of the 24 cases fail deterministically on H100 and RTX PRO 6000. See #2800 and #2783. Authors: - Bradley Dice (https://github.com/bdice) Approvers: - Robert Maynard (https://github.com/robertmaynard) - Anupam (https://github.com/aamijar) - Victor Lafargue (https://github.com/viclafargue) URL: #2802
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.
Reproduces IVF-RaBitQ returning neighbors from the wrong list when a query coincides with a list centroid (for example, a query equal to a duplicated data row). Found by workstream G (#2791, #2798).
Adds
ivf_rabitq_exact_match_test: 32 distinct rows, each repeated 128 times,n_lists = 32, and the queries are the distinct rows. All 10 neighbors must be copies of the query at distance ~0, for every search mode and forbits_per_dim1 and 3.CI is reduced to the amd64 CUDA 13.3.0 C++ build and
NEIGHBORS_ANN_IVF_RABITQ_TESTon H100 and RTX PRO 6000, repeated.Part of #2783 (workstream K).