Skip to content

Fix incorrect distances tensor type in cuvsCagraSearch - #2372

Open
imotov wants to merge 2 commits into
NVIDIA:release/26.08from
imotov:fix-invalid-distances-tensor-type
Open

Fix incorrect distances tensor type in cuvsCagraSearch#2372
imotov wants to merge 2 commits into
NVIDIA:release/26.08from
imotov:fix-invalid-distances-tensor-type

Conversation

@imotov

@imotov imotov commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Per the cuvsCagraSearch documentation [1], distances is always float32 regardless of the query type. Force the distances buffer and tensor to float32 and add a byte-query search regression test.

[1]

* 3. `distances`: `kDLDataType.code == kDLFloat` and `kDLDataType.bits = 32`

@imotov
imotov requested a review from a team as a code owner July 28, 2026 23:06
@imotov imotov added bug Something isn't working non-breaking Introduces a non-breaking change labels Jul 28, 2026
@imotov
imotov changed the base branch from main to release/26.08 July 28, 2026 23:06
Per the cuvsCagraSearch contract [1], `distances` is always float32
regardless of the query type. Force the distances buffer and tensor to
float32 (matching the neighbors path) and add a byte-query search
regression test.

[1] https://github.com/NVIDIA/cuvs/blob/6858b2988b9ebfcfaadb72a715e1963349d265b7/c/include/cuvs/neighbors/cagra.h#L672
@imotov
imotov force-pushed the fix-invalid-distances-tensor-type branch from 752ade7 to dbb5ec7 Compare July 28, 2026 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant