Optimizer specify wrong gpu_id

pull/603/head
fishpenguin 2019-11-28 19:08:15 +08:00
parent 8fa80c1e88
commit a718c7c9bb
7 changed files with 9 additions and 7 deletions

View File

@ -36,6 +36,7 @@ Please mark all change in change log and use the ticket from JIRA.
- \#552 - Server down during building index_type: IVF_PQ using GPU-edition
- \#561 - Milvus server should report exception/error message or terminate on mysql metadata backend error
- \#599 - Build index log is incorrect
- \#602 - Optimizer specify wrong gpu_id
## Feature
- \#12 - Pure CPU version for Milvus

View File

@ -1639,7 +1639,8 @@ MySQLMetaImpl::FilesByType(const std::string& table_id, const std::vector<int>&
case (int)TableFileSchema::BACKUP:
msg = msg + " backup files:" + std::to_string(backup_count);
break;
default:break;
default:
break;
}
}
ENGINE_LOG_DEBUG << msg;

View File

@ -60,7 +60,7 @@ FaissFlatPass::Run(const TaskPtr& task) {
auto best_device_id = count_ % gpus.size();
SERVER_LOG_DEBUG << "FaissFlatPass: nq > gpu_search_threshold, specify gpu" << best_device_id << " to search!";
count_++;
res_ptr = ResMgrInst::GetInstance()->GetResource(ResourceType::GPU, best_device_id);
res_ptr = ResMgrInst::GetInstance()->GetResource(ResourceType::GPU, gpus[best_device_id]);
}
auto label = std::make_shared<SpecResLabel>(res_ptr);
task->label() = label;

View File

@ -63,7 +63,7 @@ FaissIVFFlatPass::Run(const TaskPtr& task) {
SERVER_LOG_DEBUG << "FaissIVFFlatPass: nq > gpu_search_threshold, specify gpu" << best_device_id
<< " to search!";
count_++;
res_ptr = ResMgrInst::GetInstance()->GetResource(ResourceType::GPU, best_device_id);
res_ptr = ResMgrInst::GetInstance()->GetResource(ResourceType::GPU, gpus[best_device_id]);
}
auto label = std::make_shared<SpecResLabel>(res_ptr);
task->label() = label;

View File

@ -61,7 +61,7 @@ FaissIVFSQ8HPass::Run(const TaskPtr& task) {
SERVER_LOG_DEBUG << "FaissIVFSQ8HPass: nq > gpu_search_threshold, specify gpu" << best_device_id
<< " to search!";
count_++;
res_ptr = ResMgrInst::GetInstance()->GetResource(ResourceType::GPU, best_device_id);
res_ptr = ResMgrInst::GetInstance()->GetResource(ResourceType::GPU, gpus[best_device_id]);
}
auto label = std::make_shared<SpecResLabel>(res_ptr);
task->label() = label;

View File

@ -63,7 +63,7 @@ FaissIVFSQ8Pass::Run(const TaskPtr& task) {
SERVER_LOG_DEBUG << "FaissIVFSQ8Pass: nq > gpu_search_threshold, specify gpu" << best_device_id
<< " to search!";
count_++;
res_ptr = ResMgrInst::GetInstance()->GetResource(ResourceType::GPU, best_device_id);
res_ptr = ResMgrInst::GetInstance()->GetResource(ResourceType::GPU, gpus[best_device_id]);
}
auto label = std::make_shared<SpecResLabel>(res_ptr);
task->label() = label;

View File

@ -85,8 +85,8 @@ struct RowRecord {
* @brief TopK query result
*/
struct QueryResult {
std::vector<int64_t> ids; ///< Query ids result
std::vector<float> distances; ///< Query distances result
std::vector<int64_t> ids; ///< Query ids result
std::vector<float> distances; ///< Query distances result
};
using TopKQueryResult = std::vector<QueryResult>; ///< Topk query result