From a40166e4bf9622f8bb351e4df11415968bab56bb Mon Sep 17 00:00:00 2001 From: presburger Date: Thu, 2 Jun 2022 19:40:01 +0800 Subject: [PATCH] Fix gpu compile error (#196) Signed-off-by: Yusheng.Ma --- knowhere/index/VecIndexFactory.cpp | 2 +- knowhere/index/vector_offset_index/gpu/IndexGPUIVF_NM.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/knowhere/index/VecIndexFactory.cpp b/knowhere/index/VecIndexFactory.cpp index 7f1dec195..0a65b79f0 100644 --- a/knowhere/index/VecIndexFactory.cpp +++ b/knowhere/index/VecIndexFactory.cpp @@ -108,7 +108,7 @@ VecIndexFactory::CreateVecIndex(const IndexType& type, const IndexMode mode) { } else if (type == IndexEnum::INDEX_FAISS_IDMAP) { return std::make_shared(gpu_device); } else if (type == IndexEnum::INDEX_FAISS_IVFFLAT) { - return std::make_shared(gpu_device); + return std::make_shared(gpu_device); } else if (type == IndexEnum::INDEX_FAISS_IVFPQ) { return std::make_shared(gpu_device); } else if (type == IndexEnum::INDEX_FAISS_IVFSQ8) { diff --git a/knowhere/index/vector_offset_index/gpu/IndexGPUIVF_NM.h b/knowhere/index/vector_offset_index/gpu/IndexGPUIVF_NM.h index c3bb50062..ce2980c22 100644 --- a/knowhere/index/vector_offset_index/gpu/IndexGPUIVF_NM.h +++ b/knowhere/index/vector_offset_index/gpu/IndexGPUIVF_NM.h @@ -36,9 +36,6 @@ class GPUIVF_NM : public IVF, public GPUIndex { void AddWithoutIds(const DatasetPtr&, const Config&) override; - void - Load(const BinarySet&) override; - VecIndexPtr CopyGpuToCpu(const Config&) override; @@ -55,6 +52,9 @@ class GPUIVF_NM : public IVF, public GPUIndex { BinarySet SerializeImpl(const IndexType&) override; + void + LoadImpl(const BinarySet&, const IndexType&); + void QueryImpl(int64_t, const float*, int64_t, float*, int64_t*, const Config&, const faiss::BitsetView) override;