mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-02-02 01:06:41 +08:00
Fix FPGA compile (#6371)
Signed-off-by: shengjun.li <shengjun.li@zilliz.com>
This commit is contained in:
parent
a34cb9602d
commit
52a8d24d1e
@ -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()
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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>;
|
||||
|
||||
@ -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"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user