mirror of https://github.com/milvus-io/milvus.git
Merge branch 'fix_hybrid' into 'branch-0.5.0'
Fix hybrid See merge request megasearch/milvus!717 Former-commit-id: 686e6891173231a78bcf4be1b66ee3f3977a8004pull/191/head
commit
17e97a3b75
|
@ -20,6 +20,7 @@ Please mark all change in change log and use the ticket from JIRA.
|
|||
- MS-647 - [monitor] grafana display average cpu-temp
|
||||
- MS-644 - Search crashed with index-type: flat
|
||||
- MS-624 - Search vectors failed if time ranges long enough
|
||||
- MS-652 - IVFSQH quantization double free
|
||||
|
||||
## Improvement
|
||||
- MS-552 - Add and change the easylogging library
|
||||
|
|
|
@ -79,8 +79,24 @@ IVFSQHybrid::CopyGpuToCpu(const Config& config) {
|
|||
|
||||
VectorIndexPtr
|
||||
IVFSQHybrid::CopyCpuToGpu(const int64_t& device_id, const Config& config) {
|
||||
auto p = CopyCpuToGpuWithQuantizer(device_id, config);
|
||||
return p.first;
|
||||
if (auto res = FaissGpuResourceMgr::GetInstance().GetRes(device_id)) {
|
||||
ResScope rs(res, device_id, false);
|
||||
faiss::gpu::GpuClonerOptions option;
|
||||
option.allInGpu = true;
|
||||
|
||||
faiss::IndexComposition index_composition;
|
||||
index_composition.index = index_.get();
|
||||
index_composition.quantizer = nullptr;
|
||||
index_composition.mode = 0; // copy all
|
||||
|
||||
auto gpu_index = faiss::gpu::index_cpu_to_gpu(res->faiss_res.get(), device_id, &index_composition, &option);
|
||||
|
||||
std::shared_ptr<faiss::Index> device_index = std::shared_ptr<faiss::Index>(gpu_index);;
|
||||
auto new_idx = std::make_shared<IVFSQHybrid>(device_index, device_id, res);
|
||||
return new_idx;
|
||||
} else {
|
||||
KNOWHERE_THROW_MSG("CopyCpuToGpu Error, can't get gpu_resource");
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue