Skip to content

Commit

Permalink
Fix PR problems (facebookresearch#2839)
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: facebookresearch#2839

Reviewed By: algoriddle

Differential Revision: D45054275

fbshipit-source-id: 7eca136a6baff97e244d570c3ba7ab3171ccca48
  • Loading branch information
Alexandr Guzhva authored and facebook-github-bot committed May 4, 2023
1 parent 1fb6968 commit bc12015
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
2 changes: 0 additions & 2 deletions faiss/gpu/GpuDistance.cu
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,6 @@ void bfKnn(GpuResourcesProvider* prov, const GpuDistanceParams& args) {
search.view(),
inds.view(),
dists.view(),
k,
distance,
metric_arg);
}
Expand Down Expand Up @@ -328,7 +327,6 @@ void bfKnn(GpuResourcesProvider* prov, const GpuDistanceParams& args) {
search.view(),
inds.view(),
dists.view(),
k,
distance,
metric_arg);
}
Expand Down
17 changes: 8 additions & 9 deletions faiss/gpu/StandardGpuResources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,22 +89,21 @@ std::string allocsToString(const std::unordered_map<void*, AllocRequest>& map) {
//

StandardGpuResourcesImpl::StandardGpuResourcesImpl()
: pinnedMemAlloc_(nullptr),
:
#if defined USE_NVIDIA_RAFT
cmr(new rmm::mr::cuda_memory_resource),
mmr(new rmm::mr::managed_memory_resource),
pmr(new rmm::mr::pinned_memory_resource),
#endif
pinnedMemAlloc_(nullptr),
pinnedMemAllocSize_(0),
// let the adjustment function determine the memory size for us by
// passing in a huge value that will then be adjusted
tempMemSize_(getDefaultTempMemForGPU(
-1,
std::numeric_limits<size_t>::max())),
pinnedMemSize_(kDefaultPinnedMemoryAllocation),
allocLogging_(false)
#if defined USE_NVIDIA_RAFT
,
cmr(new rmm::mr::cuda_memory_resource),
mmr(new rmm::mr::managed_memory_resource),
pmr(new rmm::mr::pinned_memory_resource)
#endif
{
allocLogging_(false) {
}

StandardGpuResourcesImpl::~StandardGpuResourcesImpl() {
Expand Down
1 change: 0 additions & 1 deletion faiss/gpu/impl/RaftFlatIndex.cu
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ void RaftFlatIndex::query(
search,
inds,
dists,
k,
distance,
metricArg);
}
Expand Down
5 changes: 4 additions & 1 deletion faiss/gpu/impl/RaftUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,16 @@
* limitations under the License.
*/

#pragma once

#include <faiss/MetricType.h>
#include <raft/core/error.hpp>
#include <raft/distance/distance_types.hpp>

namespace faiss {
namespace gpu {

raft::distance::DistanceType faiss_to_raft(
inline raft::distance::DistanceType faiss_to_raft(
MetricType metric,
bool exactDistance) {
switch (metric) {
Expand Down

0 comments on commit bc12015

Please sign in to comment.