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

Using expanded distance forms in RaftFlatIndex.cu #3021

Closed
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
3 changes: 3 additions & 0 deletions faiss/gpu/StandardGpuResources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,9 @@ raft::device_resources& StandardGpuResourcesImpl::getRaftHandle(int device) {
// Make sure we are using the stream the user may have already assigned
// to the current GpuResources
raftHandles_.emplace(std::make_pair(device, getDefaultStream(device)));

// Initialize cublas handle
raftHandles_[device].get_cublas_handle();
}

// Otherwise, our base default handle
Expand Down
3 changes: 1 addition & 2 deletions faiss/gpu/impl/RaftUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ inline raft::distance::DistanceType faiss_to_raft(
case MetricType::METRIC_INNER_PRODUCT:
return raft::distance::DistanceType::InnerProduct;
case MetricType::METRIC_L2:
return exactDistance ? raft::distance::DistanceType::L2Unexpanded
: raft::distance::DistanceType::L2Expanded;
return raft::distance::DistanceType::L2Expanded;
case MetricType::METRIC_L1:
return raft::distance::DistanceType::L1;
case MetricType::METRIC_Linf:
Expand Down