mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-04 04:49:08 +08:00
fix sq8h deletion (#1830)
Signed-off-by: sahuang <xiaohai.xu@zilliz.com>
This commit is contained in:
parent
a15124d6ab
commit
2fcf2855ce
@ -340,9 +340,14 @@ GpuIndexIVFSQHybrid::searchImpl_(int n,
|
||||
static_assert(sizeof(long) == sizeof(Index::idx_t), "size mismatch");
|
||||
Tensor<long, 2, true> outLabels(const_cast<long*>(labels), {n, k});
|
||||
|
||||
if (!bitset) {
|
||||
auto bitsetDevice = toDevice<uint8_t, 1>(resources_, device_, nullptr, stream, {0});
|
||||
|
||||
index_->query(queries, bitsetDevice, nprobe, k, outDistances, outLabels);
|
||||
} else {
|
||||
auto bitsetDevice = toDevice<uint8_t, 1>(resources_, device_,
|
||||
const_cast<uint8_t*>(bitset->data()), stream,{(int) bitset->size()});
|
||||
index_->query(queries, bitsetDevice, nprobe, k, outDistances, outLabels);
|
||||
}
|
||||
}
|
||||
|
||||
} } // namespace
|
||||
|
@ -166,7 +166,6 @@ TEST_P(IVFTest, ivf_basic_gpu) {
|
||||
AssertAnns(result, nq, k);
|
||||
// PrintResult(result, nq, k);
|
||||
|
||||
if (index_type_ != milvus::knowhere::IndexEnum::INDEX_FAISS_IVFSQ8H) {
|
||||
faiss::ConcurrentBitsetPtr concurrent_bitset_ptr = std::make_shared<faiss::ConcurrentBitset>(nb);
|
||||
for (int64_t i = 0; i < nq; ++i) {
|
||||
concurrent_bitset_ptr->set(i);
|
||||
@ -176,7 +175,6 @@ TEST_P(IVFTest, ivf_basic_gpu) {
|
||||
auto result_bs_1 = index_->Query(query_dataset, conf_);
|
||||
AssertAnns(result_bs_1, nq, k, CheckMode::CHECK_NOT_EQUAL);
|
||||
// PrintResult(result, nq, k);
|
||||
}
|
||||
|
||||
#ifdef MILVUS_GPU_VERSION
|
||||
milvus::knowhere::FaissGpuResourceMgr::GetInstance().Dump();
|
||||
|
@ -75,7 +75,8 @@ DeleteByIDRequest::OnExecute() {
|
||||
table_schema.engine_type_ != (int32_t)engine::EngineType::FAISS_IVFFLAT &&
|
||||
table_schema.engine_type_ != (int32_t)engine::EngineType::FAISS_BIN_IVFFLAT &&
|
||||
table_schema.engine_type_ != (int32_t)engine::EngineType::FAISS_IVFSQ8 &&
|
||||
table_schema.engine_type_ != (int32_t)engine::EngineType::FAISS_PQ) {
|
||||
table_schema.engine_type_ != (int32_t)engine::EngineType::FAISS_PQ &&
|
||||
table_schema.engine_type_ != (int32_t)engine::EngineType::FAISS_IVFSQ8H) {
|
||||
std::string err_msg =
|
||||
"Index type " + std::to_string(table_schema.engine_type_) + " does not support delete operation";
|
||||
SERVER_LOG_ERROR << err_msg;
|
||||
|
Loading…
Reference in New Issue
Block a user