NVIDIA / NVIDIA/cuvs

[BUG] CAGRA search_params::team_size is ignored

Open
#306 0 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

The team_size parameter set by the user is ignored, as it is overwritten in set_dataset_block_and_team_size. That is, the team_size and dataset_block_dim parameters are always set based on the data dimension dim().

This also affects the tests, where setting the team_size parameter does nothing except multiplying the number of identical tests. Funny enough, the referenced test tries the team_size value 4, for which we don't have a compiled kernel instance.

A simple workaround could be to update the set_dataset_block_and_team_size function as I did in the persistent kernel PR.

A more flexible way to fix this and handle the available-instances problem is available in the separable compilation PR.

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/detail/cagra/search_plan.cuh at set_dataset_block_and_team_size and compare it with the workaround in the persistent kernel PR. Then inspect cpp/test/neighbors/ann_cagra.cuh around the team_size test and the available kernel instances described in compute_distance.hpp. Done means a user-selected team_size is preserved and the tests exercise supported values without duplicating identical cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.