[FEA] Add memory tracking resources as a CLI option in ANN_BENCH
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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