Skip to content

Commit bc12015

Browse files
Alexandr Guzhvafacebook-github-bot
Alexandr Guzhva
authored andcommitted
Fix PR problems (facebookresearch#2839)
Summary: Pull Request resolved: facebookresearch#2839 Reviewed By: algoriddle Differential Revision: D45054275 fbshipit-source-id: 7eca136a6baff97e244d570c3ba7ab3171ccca48
1 parent 1fb6968 commit bc12015

File tree

4 files changed

+12
-13
lines changed

4 files changed

+12
-13
lines changed

faiss/gpu/GpuDistance.cu

-2
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,6 @@ void bfKnn(GpuResourcesProvider* prov, const GpuDistanceParams& args) {
293293
search.view(),
294294
inds.view(),
295295
dists.view(),
296-
k,
297296
distance,
298297
metric_arg);
299298
}
@@ -328,7 +327,6 @@ void bfKnn(GpuResourcesProvider* prov, const GpuDistanceParams& args) {
328327
search.view(),
329328
inds.view(),
330329
dists.view(),
331-
k,
332330
distance,
333331
metric_arg);
334332
}

faiss/gpu/StandardGpuResources.cpp

+8-9
Original file line numberDiff line numberDiff line change
@@ -89,22 +89,21 @@ std::string allocsToString(const std::unordered_map<void*, AllocRequest>& map) {
8989
//
9090

9191
StandardGpuResourcesImpl::StandardGpuResourcesImpl()
92-
: pinnedMemAlloc_(nullptr),
92+
:
93+
#if defined USE_NVIDIA_RAFT
94+
cmr(new rmm::mr::cuda_memory_resource),
95+
mmr(new rmm::mr::managed_memory_resource),
96+
pmr(new rmm::mr::pinned_memory_resource),
97+
#endif
98+
pinnedMemAlloc_(nullptr),
9399
pinnedMemAllocSize_(0),
94100
// let the adjustment function determine the memory size for us by
95101
// passing in a huge value that will then be adjusted
96102
tempMemSize_(getDefaultTempMemForGPU(
97103
-1,
98104
std::numeric_limits<size_t>::max())),
99105
pinnedMemSize_(kDefaultPinnedMemoryAllocation),
100-
allocLogging_(false)
101-
#if defined USE_NVIDIA_RAFT
102-
,
103-
cmr(new rmm::mr::cuda_memory_resource),
104-
mmr(new rmm::mr::managed_memory_resource),
105-
pmr(new rmm::mr::pinned_memory_resource)
106-
#endif
107-
{
106+
allocLogging_(false) {
108107
}
109108

110109
StandardGpuResourcesImpl::~StandardGpuResourcesImpl() {

faiss/gpu/impl/RaftFlatIndex.cu

-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ void RaftFlatIndex::query(
109109
search,
110110
inds,
111111
dists,
112-
k,
113112
distance,
114113
metricArg);
115114
}

faiss/gpu/impl/RaftUtils.h

+4-1
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,16 @@
2020
* limitations under the License.
2121
*/
2222

23+
#pragma once
24+
2325
#include <faiss/MetricType.h>
26+
#include <raft/core/error.hpp>
2427
#include <raft/distance/distance_types.hpp>
2528

2629
namespace faiss {
2730
namespace gpu {
2831

29-
raft::distance::DistanceType faiss_to_raft(
32+
inline raft::distance::DistanceType faiss_to_raft(
3033
MetricType metric,
3134
bool exactDistance) {
3235
switch (metric) {

0 commit comments

Comments
 (0)