Skip to content

Commit

Permalink
Enable conservative memory allocations for RAFT IVF-Flat benchmarks. (#…
Browse files Browse the repository at this point in the history
…1634)

In the benchmark we add the whole dataset at once to the index, there is no need to allocate extra space to amortize future extension of the dataset.  We can save memory by enabling the conservative allocation, and this enables running larger benchmarks.

Authors:
  - Tamas Bela Feher (https://github.com/tfeher)

Approvers:
  - Corey J. Nolet (https://github.com/cjnolet)

URL: #1634
  • Loading branch information
tfeher authored Jul 6, 2023
1 parent c9052f8 commit 82fbac3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cpp/bench/ann/src/raft/raft_ivf_flat_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ RaftIvfFlatGpu<T, IdxT>::RaftIvfFlatGpu(Metric metric, int dim, const BuildParam
dimension_(dim),
mr_(rmm::mr::get_current_device_resource(), 1024 * 1024 * 1024ull)
{
index_params_.metric = parse_metric_type(metric);
index_params_.metric = parse_metric_type(metric);
index_params_.conservative_memory_allocation = true;
rmm::mr::set_current_device_resource(&mr_);
RAFT_CUDA_TRY(cudaGetDevice(&device_));
}
Expand Down

0 comments on commit 82fbac3

Please sign in to comment.