Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PR problems #2839

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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