mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-29 06:55:27 +08:00
Merge remote-tracking branch 'github/0.5.1' into 0.5.1
Former-commit-id: c4dfc96120e3fe49bc13fadeb04bd62da1e62406
This commit is contained in:
commit
cbdb9002fe
@ -7,6 +7,7 @@ Please mark all change in change log and use the ticket from JIRA.
|
||||
## Bug
|
||||
- \#134 - JFrog cache error
|
||||
- \#161 - Search IVFSQHybrid crash on gpu
|
||||
- \#169 - IVF_FLAT search out of memory
|
||||
|
||||
## Feature
|
||||
- \#90 - The server start error messages could be improved to enhance user experience
|
||||
|
||||
@ -309,30 +309,13 @@ ExecutionEngineImpl::CopyToGpu(uint64_t device_id, bool hybrid) {
|
||||
return Status::OK();
|
||||
}
|
||||
#endif
|
||||
|
||||
auto index = std::static_pointer_cast<VecIndex>(cache::GpuCacheMgr::GetInstance(device_id)->GetIndex(location_));
|
||||
bool already_in_cache = (index != nullptr);
|
||||
if (already_in_cache) {
|
||||
index_ = index;
|
||||
} else {
|
||||
if (index_ == nullptr) {
|
||||
ENGINE_LOG_ERROR << "ExecutionEngineImpl: index is null, failed to copy to gpu";
|
||||
return Status(DB_ERROR, "index is null");
|
||||
}
|
||||
|
||||
try {
|
||||
index_ = index_->CopyToGpu(device_id);
|
||||
ENGINE_LOG_DEBUG << "CPU to GPU" << device_id;
|
||||
} catch (std::exception& e) {
|
||||
ENGINE_LOG_ERROR << e.what();
|
||||
return Status(DB_ERROR, e.what());
|
||||
}
|
||||
try {
|
||||
index_ = index_->CopyToGpu(device_id);
|
||||
ENGINE_LOG_DEBUG << "CPU to GPU" << device_id;
|
||||
} catch (std::exception& e) {
|
||||
ENGINE_LOG_ERROR << e.what();
|
||||
return Status(DB_ERROR, e.what());
|
||||
}
|
||||
|
||||
if (!already_in_cache) {
|
||||
GpuCache(device_id);
|
||||
}
|
||||
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user