mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-06 02:42:53 +08:00
[skip ci]Add more log msg
This commit is contained in:
parent
288490f980
commit
8a4cc9263e
@ -106,6 +106,25 @@ class OptimizerInst {
|
||||
server::Config& config = server::Config::GetInstance();
|
||||
config.GetGpuResourceConfigEnable(enable_gpu);
|
||||
if (enable_gpu) {
|
||||
std::vector<int64_t> build_gpus;
|
||||
std::vector<int64_t> search_gpus;
|
||||
int64_t gpu_search_threshold;
|
||||
config.GetGpuResourceConfigBuildIndexResources(build_gpus);
|
||||
config.GetGpuResourceConfigSearchResources(search_gpus);
|
||||
config.GetEngineConfigGpuSearchThreshold(gpu_search_threshold);
|
||||
std::string build_msg = "Build index gpu:";
|
||||
for (auto build_id : build_gpus) {
|
||||
build_msg.append(" gpu" + std::to_string(build_id));
|
||||
}
|
||||
SERVER_LOG_DEBUG << build_msg;
|
||||
|
||||
std::string search_msg = "Search gpu:";
|
||||
for (auto search_id : search_gpus) {
|
||||
search_msg.append(" gpu" + std::to_string(search_id));
|
||||
}
|
||||
search_msg.append(". gpu_search_threshold:" + std::to_string(gpu_search_threshold));
|
||||
SERVER_LOG_DEBUG << search_msg;
|
||||
|
||||
pass_list.push_back(std::make_shared<BuildIndexPass>());
|
||||
pass_list.push_back(std::make_shared<FaissFlatPass>());
|
||||
pass_list.push_back(std::make_shared<FaissIVFFlatPass>());
|
||||
|
||||
@ -38,7 +38,7 @@ BuildIndexPass::Run(const TaskPtr& task) {
|
||||
return false;
|
||||
|
||||
if (build_gpu_ids_.empty()) {
|
||||
SERVER_LOG_WARNING << "BUildIndexPass cannot get build index gpu!";
|
||||
SERVER_LOG_WARNING << "BuildIndexPass cannot get build index gpu!";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -85,7 +85,7 @@ XBuildIndexTask::Load(milvus::scheduler::LoadType type, uint8_t device_id) {
|
||||
|
||||
size_t file_size = to_index_engine_->PhysicalSize();
|
||||
|
||||
std::string info = "Load file id:" + std::to_string(file_->id_) +
|
||||
std::string info = "Load file id:" + std::to_string(file_->id_) + " " + type_str +
|
||||
" file type:" + std::to_string(file_->file_type_) + " size:" + std::to_string(file_size) +
|
||||
" bytes from location: " + file_->location_ + " totally cost";
|
||||
double span = rc.ElapseFromBegin(info);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user