Skip to content

[FEA] Python API for memory tracking resources #2982

@achirkin

Description

@achirkin

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 exposed in the python API as well. The memory tracking resource handle can be exposed exactly the same way as the normal resource handle, so the implementation shouldn't be too complicated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions