NVIDIA / NVIDIA/cuvs

[BUG] mg_index doesn't write output values when used on single GPU with default parameters

Open
#904 2 comments 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

When built for a single GPU, mg_index doesn't write the outputs during search with default parameters.

The culprit is the sharded-tree-merge search implementation that is designed for even number of GPUs.
With rank == 1 (single GPU) the code for copying the data to output is never reached:
https://github.com/rapidsai/cuvs/blob/2db85161fb59ce196c1cd03634622d41d4d60650/cpp/src/neighbors/mg/snmg.cuh#L427-L438
...because it's nested under the following loop:
https://github.com/rapidsai/cuvs/blob/2db85161fb59ce196c1cd03634622d41d4d60650/cpp/src/neighbors/mg/snmg.cuh#L367-L370

That is, if one builds and searches an SNMG index using ANN_BENCH tool with default parameters and a single GPU, the recall is always zero.

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 in cpp/src/neighbors/mg/snmg.cuh, especially the single-GPU path around the linked lines, and reproduce the issue with ANN_BENCH using default parameters on one GPU. The fix is complete when SNMG search writes output values and the resulting recall is no longer always zero.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
search
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.