Skip to content

Conversation

@ldematte
Copy link
Contributor

@ldematte ldematte commented Aug 26, 2025

With the introduction of CuVSMatrix as the type to provide an input dataset, we expanded the types that can be used in indexing.
With this PR we aim to do the same query/search:

  • Use a CuVSMatrix for CagraQuery too
  • Use the correct types for sizes in CagraIndex#search

There is more we can do there, e.g. use CuVSDeviceMatrix for storing the results so we don't have to explicitly copy them (all duplicated code). That would be follow-up work.

@copy-pr-bot
Copy link

copy-pr-bot bot commented Aug 26, 2025

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@ldematte ldematte changed the title [WIP][Java] Expand cagra index to accept more types (int8 and int32) [WIP][Java] Expand CagraIndex to accept more types (int8 and int32) Sep 3, 2025
@cjnolet cjnolet added improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels Sep 5, 2025
@cjnolet cjnolet moved this from Todo to In Progress in Vector Search, ML, & Data Mining Release Board Sep 5, 2025
@ldematte ldematte changed the title [WIP][Java] Expand CagraIndex to accept more types (int8 and int32) [Review][Java] Expand CagraIndex#search to accept more types (int8 and int32) Sep 23, 2025
@ldematte ldematte marked this pull request as ready for review September 23, 2025 16:18
@ldematte ldematte requested a review from a team as a code owner September 23, 2025 16:18
@ldematte ldematte marked this pull request as draft September 23, 2025 19:54
@ldematte
Copy link
Contributor Author

Changing this back to draft as we need #1361 as preliminary work

rapids-bot bot pushed a commit that referenced this pull request Sep 24, 2025
…1361)

This PR extract an internal interface that is used as a base to implement all internal CuVSMatrix types; the interface introduces commonly used field accessors like `memorySegment()` and `toTensor()` that we do not want/could not appear on the public interface (e.g. because they expose or require Panama types or internal types).

The new interface is implemented by all concrete matrix types, closing a gap that we had in #1328 (which I realized while working on separate PRs like #1283)

Follow-up of #1328

Authors:
  - Lorenzo Dematté (https://github.com/ldematte)

Approvers:
  - Ben Frederickson (https://github.com/benfred)

URL: #1361
…index-int8

# Conflicts:
#	java/cuvs-java/src/main/java22/com/nvidia/cuvs/internal/CuVSMatrixBaseImpl.java
#	java/cuvs-java/src/test/java/com/nvidia/cuvs/CagraBuildAndSearchIT.java
#	java/cuvs-java/src/test/java/com/nvidia/cuvs/CagraRandomizedIT.java
@ldematte ldematte marked this pull request as ready for review September 25, 2025 10:49
@benfred
Copy link
Member

benfred commented Sep 25, 2025

/ok to test 3e3212f


returnValue = cuvsStreamSync(cuvsRes);
checkCuVSError(returnValue, "cuvsStreamSync");
// TODO: do we need this stream sync here?
Copy link
Member

Choose a reason for hiding this comment

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

I don't think you need to do this sync here - since cuvsCagraSearch is operating on the same stream

Copy link
Contributor

@ChrisHegarty ChrisHegarty left a comment

Choose a reason for hiding this comment

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

LGTM

@cjnolet
Copy link
Member

cjnolet commented Sep 26, 2025

/merge

@rapids-bot rapids-bot bot merged commit f328ff1 into rapidsai:branch-25.10 Sep 26, 2025
84 checks passed
enp1s0 pushed a commit to enp1s0/cuvs that referenced this pull request Oct 22, 2025
…apidsai#1361)

This PR extract an internal interface that is used as a base to implement all internal CuVSMatrix types; the interface introduces commonly used field accessors like `memorySegment()` and `toTensor()` that we do not want/could not appear on the public interface (e.g. because they expose or require Panama types or internal types).

The new interface is implemented by all concrete matrix types, closing a gap that we had in rapidsai#1328 (which I realized while working on separate PRs like rapidsai#1283)

Follow-up of rapidsai#1328

Authors:
  - Lorenzo Dematté (https://github.com/ldematte)

Approvers:
  - Ben Frederickson (https://github.com/benfred)

URL: rapidsai#1361
enp1s0 pushed a commit to enp1s0/cuvs that referenced this pull request Oct 22, 2025
…and int32) (rapidsai#1283)

With the introduction of `CuVSMatrix` as the type to provide an input dataset, we expanded the types that can be used in indexing.
With this PR we aim to do the same query/search:
- Use a `CuVSMatrix` for `CagraQuery` too
- Use the correct types for sizes in `CagraIndex#search`

There is more we can do there, e.g. use `CuVSDeviceMatrix` for storing the results so we don't have to explicitly copy them (all duplicated code). That would be follow-up work.

Authors:
  - Lorenzo Dematté (https://github.com/ldematte)
  - Ben Frederickson (https://github.com/benfred)

Approvers:
  - Ben Frederickson (https://github.com/benfred)
  - Chris Hegarty (https://github.com/ChrisHegarty)

URL: rapidsai#1283
rapids-bot bot pushed a commit that referenced this pull request Oct 26, 2025
…1366)

Some additional tests to increase our test coverage.

Good to review, but we might want to expand this after #1283 (or vice-versa, whichever comes first).

Authors:
  - Lorenzo Dematté (https://github.com/ldematte)
  - MithunR (https://github.com/mythrocks)

Approvers:
  - MithunR (https://github.com/mythrocks)

URL: #1366
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Development

Successfully merging this pull request may close these issues.

4 participants