NVIDIA / NVIDIA/cuvs

[BUG][Java] Review and fix data types for neighbours and prefilters

Open
#1,250 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Cuda
Stars
854
Forks
236
Avg merge
3d 3h
Merged PRs (30d)
62

Description

Currently, neighbours and prefilters are defined with different data types across different indices types (Cagra/Hnsw/Bruteforce), and inconsistent with the Java type. E.g. they are mostly defined as Java long[], but sometimes they are defined as int[], and/or use a OfInt MemorySegment, and/or use a DLManagedTensor with code DLUint/DLInt, with 32 or 64 bits.

Using the wrong data size (32 bits with longs or 64 bits with ints) can lead to wrong results or memory corruption and crashes.

In https://github.com/rapidsai/cuvs/pull/1232 I have marked several inconsistencies with TODOs; those needs to be fixed, but also a thorough review should be done to identify all.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the TODOs identified in PR #1232, then compare neighbour and prefilter types across the Cagra, Hnsw, and Bruteforce index implementations. Done means all Java, MemorySegment, and DLManagedTensor representations use consistent sizes and the review finds no remaining inconsistencies.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.