mirror of https://github.com/milvus-io/milvus.git
parent
237ce2aba3
commit
e397dd20b9
|
@ -238,6 +238,7 @@ GpuIndexIVFFlat::searchImpl_(int n,
|
|||
// Device is already set in GpuIndex::search
|
||||
FAISS_ASSERT(index_);
|
||||
FAISS_ASSERT(n > 0);
|
||||
const bool enableQuerySlicing = false;
|
||||
|
||||
auto stream = resources_->getDefaultStream(device_);
|
||||
|
||||
|
@ -250,7 +251,11 @@ GpuIndexIVFFlat::searchImpl_(int n,
|
|||
|
||||
if (!bitset) {
|
||||
auto bitsetDevice = toDevice<uint8_t, 1>(resources_, device_, nullptr, stream, {0});
|
||||
index_->query(queries, bitsetDevice, nprobe, k, outDistances, outLabels, distances, labels);
|
||||
if (enableQuerySlicing) {
|
||||
index_->query(queries, bitsetDevice, nprobe, k, outDistances, outLabels, distances, labels);
|
||||
} else {
|
||||
index_->query(queries, bitsetDevice, nprobe, k, outDistances, outLabels);
|
||||
}
|
||||
} else {
|
||||
auto bitsetDevice = toDevice<uint8_t, 1>(resources_, device_,
|
||||
const_cast<uint8_t*>(bitset->data()), stream,
|
||||
|
|
Loading…
Reference in New Issue