Skip to content

Forward-merge branch-25.08 into branch-25.10#1186

Merged
GPUtester merged 1 commit into
branch-25.10from
branch-25.08
Jul 26, 2025
Merged

Forward-merge branch-25.08 into branch-25.10#1186
GPUtester merged 1 commit into
branch-25.10from
branch-25.08

Conversation

@rapids-bot

@rapids-bot rapids-bot Bot commented Jul 26, 2025

Copy link
Copy Markdown
Contributor

Forward-merge triggered by push to branch-25.08 that creates a PR to keep branch-25.10 up-to-date. If this PR is unable to be immediately merged due to conflicts, it will remain open for the team to manually merge. See forward-merger docs for more info.

In #902 and #1034 we introduced a `Dataset` interface to support on-heap and off-heap ("native") memory seamlessly as inputs for cagra and bruteforce index building.

As we expand the functionality of cuvs-java, we realized we have similar needs for outputs (see e.g. #1105 / #1102 or #1104).

This PR extends `Dataset` to support being used as an output, wrapping native (off-heap) memory in a convenient and efficient way, and providing common utilities to transform to and from on-heap memory.
This work is inspired by the existing raft `mdspan` and `DLTensor` data structures, but tailored to our needs (2d only, just 3 data types, etc.). The PR keeps the current implementation simple and minimal on purpose, but structured in a way that is simple to extend.

By itself, the PR is just a refactoring to extend the `Dataset` implementation and reorganize the implementation classes; its real usefulness will be in using it in the PRs mentioned above (in fact, this PR has been extracted from #1105).
The implementation class hierarchy is implemented with future extensions in mind: atm we have one `HostMemoryDatasetImpl`, but we are already thinking to have a corresponding `DeviceMemoryDatasetImpl` that will wrap and manage (views) on GPU memory to avoid (in some cases) extra copies of data from GPU memory to CPU memory only to process them or forward them to another algorithm (e.g quantization followed by indexing).

Future work will also include add support/refactoring to allocate and manage GPU memory and DLTensors (e.g. working better with/refactoring `prepareTensor`).

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

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

URL: #1111
@rapids-bot rapids-bot Bot requested a review from a team as a code owner July 26, 2025 01:58
@GPUtester GPUtester merged commit 63dad1f into branch-25.10 Jul 26, 2025
2 checks passed
@rapids-bot

rapids-bot Bot commented Jul 26, 2025

Copy link
Copy Markdown
Contributor Author

SUCCESS - forward-merge complete.

landrumb pushed a commit to landrumb/cuvs that referenced this pull request Jul 8, 2026
Forward-merge branch-25.08 into branch-25.10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants