NVIDIA / NVIDIA/cuvs

[FEA] Add memory tracking resources as a CLI option in ANN_BENCH

Open
#1,930 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

RAFT PR #2973 introduces a new raft::memory_tracking_resources that samples all resource-based memory usage:

  // optionally pass an existing resource handle
  raft::resources res;

  // The tracking handle is a child of resource handle; it wraps all memory resources with statistics adaptors
  raft::memory_tracking_resources tracked(res, "allocations.csv", std::chrono::milliseconds(1));

  // All allocations are logged to a .csv as long as `tracked` is alive
  cuvs::neighbors::cagra::build(tracked, ...);

It would be nice to have this feature integrated in the ANN_BENCH executable. A reasonable place to put it is the common cuvs pre-configured shared_raft_resources that is used by all cuVS algorithms. The tricky part is how to pass the argument, such as whether to enable memory tracking, sampling rate, and the log file. One way is to make them explicit and pass through all use-sites from the algo parameters. Another way is to set these as ENV variables (e.g. CUVS_BENCH_RAFT_MEMORY_TRACKING_OUTPUT=<path.csv>) - also reasonable if we consider this a debugging tool rather than an algorithm toggle.

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 with the shared_raft_resources definition in cpp/bench/ann/src/cuvs/cuvs_ann_bench_utils.h and the ANN_BENCH executable's algorithm use-sites. Review RAFT PR #2973, then determine whether tracking settings should be CLI arguments or environment variables; done means ANN_BENCH can enable sampling and write the requested CSV for all cuVS algorithms.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli, performance, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.