| @@ -557,71 +557,6 @@ bool GeGenerator::Impl::SetOmSystemInfo(AttrHolder &obj) { | |||||
| return true; | return true; | ||||
| } | } | ||||
| void GeGenerator::Impl::DisplayModelInfo(AttrHolder &obj) { | |||||
| std::string display_model; | |||||
| (void)ge::GetContext().GetOption(ge::DISPLAY_MODEL_INFO, display_model); | |||||
| if (display_model != "1") { | |||||
| GELOGD("display_model not 1"); | |||||
| return; | |||||
| } | |||||
| std::cout << "------------ Display Model Info start ------------" << std::endl; | |||||
| // system info | |||||
| std::string atc_version; | |||||
| (void)ge::AttrUtils::GetStr(obj, ATTR_MODEL_ATC_VERSION, atc_version); | |||||
| std::string soc_version; | |||||
| (void)ge::AttrUtils::GetStr(obj, "soc_version", soc_version); | |||||
| std::string framework_type; | |||||
| (void)ge::AttrUtils::GetStr(obj, "framework_type", framework_type); | |||||
| std::cout << "system info: " | |||||
| << ATTR_MODEL_ATC_VERSION | |||||
| << "[" << atc_version << "], " | |||||
| << "soc_version" | |||||
| << "[" << soc_version << "], " | |||||
| << "framework_type" | |||||
| << "[" << framework_type << "]." << std::endl; | |||||
| // resource info | |||||
| int64_t memory_size; | |||||
| (void)ge::AttrUtils::GetInt(obj, ATTR_MODEL_MEMORY_SIZE, memory_size); | |||||
| int64_t weight_size; | |||||
| (void)ge::AttrUtils::GetInt(obj, ATTR_MODEL_WEIGHT_SIZE, weight_size); | |||||
| int64_t stream_num; | |||||
| (void)ge::AttrUtils::GetInt(obj, ATTR_MODEL_STREAM_NUM, stream_num); | |||||
| int64_t event_num; | |||||
| (void)ge::AttrUtils::GetInt(obj, ATTR_MODEL_EVENT_NUM, event_num); | |||||
| std::cout << "resource info: " | |||||
| << ATTR_MODEL_MEMORY_SIZE | |||||
| << "[" << memory_size << "], " | |||||
| << ATTR_MODEL_WEIGHT_SIZE | |||||
| << "[" << weight_size << "], " | |||||
| << ATTR_MODEL_STREAM_NUM | |||||
| << "[" << stream_num << "], " | |||||
| << ATTR_MODEL_EVENT_NUM | |||||
| << "[" << event_num << "]." | |||||
| << std::endl; | |||||
| vector<int64_t> om_info; | |||||
| (void)ge::AttrUtils::GetListInt(obj, "om_info_list", om_info); | |||||
| if (om_info.size() == kOmInfoSize) { | |||||
| std::cout << "om info: " | |||||
| << "modeldef_size" | |||||
| << "[" << om_info[0] << "], " | |||||
| << "weight_data_size" | |||||
| << "[" << om_info[1] << "], " | |||||
| << "tbe_kernels_size" | |||||
| << "[" << om_info[2] << "], " | |||||
| << "cust_aicpu_kernel_store_size" | |||||
| << "[" << om_info[3] << "], " | |||||
| << "task_info_size" | |||||
| << "[" << om_info[4] << "]." << std::endl; | |||||
| } else { | |||||
| std::cout << "Display Model Info failed, please check!" << std::endl; | |||||
| }; | |||||
| std::cout << "------------ Display Model Info end ------------" << std::endl; | |||||
| } | |||||
| Status GeGenerator::GenerateModel(const Graph &graph, const string &file_name_prefix, const vector<GeTensor> &inputs, | Status GeGenerator::GenerateModel(const Graph &graph, const string &file_name_prefix, const vector<GeTensor> &inputs, | ||||
| ModelBufferData &model, bool is_offline) { | ModelBufferData &model, bool is_offline) { | ||||
| rtContext_t ctx = nullptr; | rtContext_t ctx = nullptr; | ||||
| @@ -928,7 +863,6 @@ Status GeGenerator::Impl::SaveRootModel(const string &file_name_prefix, GeRootMo | |||||
| GELOGE(ret, "Save to om model failed"); | GELOGE(ret, "Save to om model failed"); | ||||
| return ret; | return ret; | ||||
| } | } | ||||
| // DisplayModelInfo(*(model_root.get())); | |||||
| return SUCCESS; | return SUCCESS; | ||||
| } | } | ||||