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.
PR #2973 introduces a new
raft::memory_tracking_resourcesthat samples all resource-based memory usage: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.