Fix FPGA compile (#6371)

Signed-off-by: shengjun.li <shengjun.li@zilliz.com>
This commit is contained in:
shengjun.li 2021-07-08 16:47:13 +08:00 committed by GitHub
parent a34cb9602d
commit 52a8d24d1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 5 deletions

View File

@ -1146,7 +1146,5 @@ if(MILVUS_FPGA_VERSION)
include_directories(SYSTEM ${ARMADILLO_INCLUDE_DIR})
install(FILES
${INSTALL_DIR}/lib/libarmadillo.so
${INSTALL_DIR}/lib/libarmadillo.so.9
${INSTALL_DIR}/lib/libarmadillo.so.9.900.4
DESTINATION lib)
endif()

View File

@ -624,7 +624,6 @@ ExecutionEngineImpl::CopyToFpga() {
std::shared_ptr<knowhere::FPGAIVFPQ> indexFpga = std::make_shared<knowhere::FPGAIVFPQ>(ivfpq->index_);
indexFpga->SetIndexSize(indexsize);
indexFpga->CopyIndexToFpga();
indexFpga->SetBlacklist(index_->GetBlacklist());
indexFpga->SetUids(index_->GetUids());
index_ = indexFpga;

View File

@ -60,7 +60,8 @@ FPGAIVFPQ::CopyIndexToFpga() {
LOG_ENGINE_DEBUG_ << " copy index to fpga end";
}
void
FPGAIVFPQ::QueryImpl(int64_t n, const float* data, int64_t k, float* distances, int64_t* labels, const Config& config) {
FPGAIVFPQ::QueryImpl(int64_t n, const float* data, int64_t k, float* distances, int64_t* labels, const Config& config,
faiss::ConcurrentBitsetPtr blacklist) {
try {
LOG_ENGINE_DEBUG_ << " run fpga search QueryImpl";
auto params = GenParams(config);

View File

@ -41,7 +41,8 @@ class FPGAIVFPQ : public IVFPQ {
CopyIndexToFpga();
void
QueryImpl(int64_t, const float*, int64_t, float*, int64_t*, const Config&) override;
QueryImpl(int64_t, const float*, int64_t, float*, int64_t*, const Config&,
faiss::ConcurrentBitsetPtr blacklist) override;
};
using FPGAIVFPQPtr = std::shared_ptr<FPGAIVFPQ>;

View File

@ -12,6 +12,9 @@
#include "utils/CommonUtil.h"
#include "cache/CpuCacheMgr.h"
#include "cache/GpuCacheMgr.h"
#ifdef MILVUS_FPGA_VERSION
#include "cache/FpgaCacheMgr.h"
#endif
#include "config/Config.h"
#include "db/Utils.h"
#include "utils/Log.h"