NVIDIA / NVIDIA/cuvs

[BUG] Lucene: close per-query CAGRA device matrices

Open
#2,621 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Problem

CuVS2510GPUVectorsReader.search() creates a device-backed CuVSMatrix for each CAGRA query and does not close it. The matrix owns an RMM allocation, so repeated per-segment searches can accumulate device memory until the reader is closed.

Proposed change
  • Scope the query matrix with try-with-resources across synchronous CAGRA search and result materialization.
  • Preserve the existing CAGRA/brute-force routing, filtering, scores, and public APIs.
  • Add repeated-query GPU coverage that checks correctness and stable resource usage.

This is an implementation-lifecycle fix with no intended source, binary, SPI, or persisted-format change.

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 at CuVS2510GPUVectorsReader.search() and trace the synchronous CAGRA query and result-materialization paths. Review the existing CAGRA/brute-force routing and filtering behavior, then run or extend repeated-query GPU coverage. Done means query matrices are released per search while correctness, resource stability, scores, and public APIs remain unchanged.

Written by the indexing model from the issue text.

Assessment

Domain
search
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.