From 82fbac320ffdbfa4bfe407c0ca7365d13755a284 Mon Sep 17 00:00:00 2001 From: Tamas Bela Feher Date: Thu, 6 Jul 2023 18:36:22 +0200 Subject: [PATCH] Enable conservative memory allocations for RAFT IVF-Flat benchmarks. (#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: https://github.com/rapidsai/raft/pull/1634 --- cpp/bench/ann/src/raft/raft_ivf_flat_wrapper.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpp/bench/ann/src/raft/raft_ivf_flat_wrapper.h b/cpp/bench/ann/src/raft/raft_ivf_flat_wrapper.h index cf04e07d19..bdd688f29b 100644 --- a/cpp/bench/ann/src/raft/raft_ivf_flat_wrapper.h +++ b/cpp/bench/ann/src/raft/raft_ivf_flat_wrapper.h @@ -96,7 +96,8 @@ RaftIvfFlatGpu::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_)); }