NVIDIA / NVIDIA/cuvs

[FEA] Indexes to accept `Dataset` directly

Open
#1,571 0 comments 0 reactions 2 assignees View on GitHub

@seunghwak is already working on this.

Since Jan 30, 2026.

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

Description

The intention here is to provide a layer of indirection between the actual mdspan / training matrices and the indexes. One of the immediate benefits is to faciliate consistent ownership agreement between the user and the APIs. For example, CAGRA today will copy the entire training dataset into a strided/padded form, which now blurs the line between ownership- most users don't realize this copy has been made or even that the dataset needed to be strided/padded at all, which causes an unexpected memory spike and means the CAGRA index is now responsible for owning the copied dataset. This starts to introduce "sometimes owning" semantics, which we should avoid doing implicitly at all costs.

The solution here is to have a PaddedDataset that a user can construct with their data. The PaddedDataset would then be accepted directly (as a view) by CAGRA. This makes the contract between the index and user very explicit and puts the control back in the user's hands.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.