#1781 fix search hang with SQ8H (#1783)

Signed-off-by: yudong.cai <yudong.cai@zilliz.com>
pull/1790/head
Cai Yudong 2020-03-28 13:08:42 +08:00 committed by GitHub
parent af73dccb1c
commit a7932b0365
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -21,6 +21,7 @@ Please mark all change in change log and use the issue from GitHub
- \#1735 Fix search out of memory with ivf_flat - \#1735 Fix search out of memory with ivf_flat
- \#1747 Expected error status if search with partition_tag not existed - \#1747 Expected error status if search with partition_tag not existed
- \#1756 Fix memory exhausted during searching - \#1756 Fix memory exhausted during searching
- \#1781 Fix search hang with SQ8H
## Feature ## Feature
- \#1603 BinaryFlat add 2 Metric: Substructure and Superstructure - \#1603 BinaryFlat add 2 Metric: Substructure and Superstructure

View File

@ -551,11 +551,11 @@ ExecutionEngineImpl::CopyToGpu(uint64_t device_id, bool hybrid) {
*/ */
ENGINE_LOG_DEBUG << "CPU to GPU" << device_id << " start"; ENGINE_LOG_DEBUG << "CPU to GPU" << device_id << " start";
auto gpu_cache_mgr = cache::GpuCacheMgr::GetInstance(device_id); auto gpu_cache_mgr = cache::GpuCacheMgr::GetInstance(device_id);
gpu_cache_mgr->Lock(); // gpu_cache_mgr->Lock();
gpu_cache_mgr->Reserve(index_->Size()); // gpu_cache_mgr->Reserve(index_->Size());
index_ = knowhere::cloner::CopyCpuToGpu(index_, device_id, knowhere::Config()); index_ = knowhere::cloner::CopyCpuToGpu(index_, device_id, knowhere::Config());
gpu_cache_mgr->InsertItem(location_, std::static_pointer_cast<cache::DataObj>(index_)); // gpu_cache_mgr->InsertItem(location_, std::static_pointer_cast<cache::DataObj>(index_));
gpu_cache_mgr->Unlock(); // gpu_cache_mgr->Unlock();
ENGINE_LOG_DEBUG << "CPU to GPU" << device_id << " finished"; ENGINE_LOG_DEBUG << "CPU to GPU" << device_id << " finished";
} catch (std::exception& e) { } catch (std::exception& e) {
ENGINE_LOG_ERROR << e.what(); ENGINE_LOG_ERROR << e.what();