Skip to content

Commit c515536

Browse files
authored
Replace custom cuda_pinned_resource with RMM's pinned_host_memory_resource (#1466)
Removes custom `cuda_pinned_resource` implementation and uses `rmm::mr::pinned_host_memory_resource` directly. Depends on rapidsai/rmm#2102. Closes #754. Authors: - Bradley Dice (https://github.com/bdice) - Artem M. Chirkin (https://github.com/achirkin) Approvers: - Artem M. Chirkin (https://github.com/achirkin) URL: #1466
1 parent d6b7aef commit c515536

2 files changed

Lines changed: 2 additions & 90 deletions

File tree

cpp/bench/ann/src/common/cuda_pinned_resource.hpp

Lines changed: 0 additions & 88 deletions
This file was deleted.

cpp/bench/ann/src/cuvs/cuvs_cagra_wrapper.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
#include "../../../../src/neighbors/detail/cagra/utils.hpp"
88
#include "../common/ann_types.hpp"
99
#include "../common/cuda_huge_page_resource.hpp"
10-
#include "../common/cuda_pinned_resource.hpp"
1110
#include "cuvs_ann_bench_utils.h"
11+
#include <rmm/mr/pinned_host_memory_resource.hpp>
1212

1313
#include <cuvs/distance/distance.hpp>
1414
#include <cuvs/neighbors/cagra.hpp>
@@ -142,7 +142,7 @@ class cuvs_cagra : public algo<T>, public algo_gpu {
142142
private:
143143
// handle_ must go first to make sure it dies last and all memory allocated in pool
144144
configured_raft_resources handle_{};
145-
raft::mr::cuda_pinned_resource mr_pinned_;
145+
rmm::mr::pinned_host_memory_resource mr_pinned_;
146146
raft::mr::cuda_huge_page_resource mr_huge_page_;
147147
AllocatorType graph_mem_{AllocatorType::kDevice};
148148
AllocatorType dataset_mem_{AllocatorType::kDevice};

0 commit comments

Comments
 (0)