Browse Source

display model info

pull/647/head
wangwenhua1@huawei.com 4 years ago
parent
commit
b723f2fff1
1 changed files with 13 additions and 13 deletions
  1. +13
    -13
      ge/generator/ge_generator.cc

+ 13
- 13
ge/generator/ge_generator.cc View File

@@ -511,13 +511,13 @@ bool GeGenerator::Impl::SetOmSystemInfo(AttrHolder &obj) {

void GeGenerator::Impl::DisplayModelInfo(AttrHolder &obj) {
//
size_t memory_size;
int64_t memory_size;
(void)ge::AttrUtils::GetInt(obj, ATTR_MODEL_MEMORY_SIZE, memory_size);
size_t weight_size;
int64_t weight_size;
(void)ge::AttrUtils::GetInt(obj, ATTR_MODEL_WEIGHT_SIZE, weight_size);
size_t stream_num;
int64_t stream_num;
(void)ge::AttrUtils::GetInt(obj, ATTR_MODEL_STREAM_NUM, stream_num);
size_t event_num;
int64_t event_num;
(void)ge::AttrUtils::GetInt(obj, ATTR_MODEL_EVENT_NUM, event_num);
std::cout << ATTR_MODEL_MEMORY_SIZE << "[" << memory_size << "], " << ATTR_MODEL_WEIGHT_SIZE << "[" << weight_size <<
"], " << ATTR_MODEL_STREAM_NUM << "[" << stream_num << "], " << ATTR_MODEL_EVENT_NUM << "[" << event_num << "]." <<
@@ -525,24 +525,24 @@ void GeGenerator::Impl::DisplayModelInfo(AttrHolder &obj) {

//
std::string atc_version;
(void)ge::AttrUtils::GetStr(obj, ATTR_MODEL_ATC_VERSION, 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)
(void)ge::AttrUtils::GetStr(obj, "soc_version", soc_version);
std::string framework_type;
(void)ge::AttrUtils::GetStr(obj, "framework_type", framework_type)
(void)ge::AttrUtils::GetStr(obj, "framework_type", framework_type);
std::cout << ATTR_MODEL_ATC_VERSION << "[" << atc_version << "], " << "soc_version" << "[" << soc_version <<
"], " << "framework_type" << "[" << framework_type << "]." << std::endl;

//
size_t modeldef_size;
int64_t modeldef_size;
(void)ge::AttrUtils::GetInt(obj, "modeldef_size", modeldef_size);
size_t weight_data_size;
int64_t weight_data_size;
(void)ge::AttrUtils::GetInt(obj, "weight_data_size", weight_data_size);
size_t tbe_kernels_size;
int64_t tbe_kernels_size;
(void)ge::AttrUtils::GetInt(obj, "tbe_kernels_size", tbe_kernels_size);
size_t cust_aicpu_kernel_store_size;
int64_t cust_aicpu_kernel_store_size;
(void)ge::AttrUtils::GetInt(obj, "cust_aicpu_kernel_store_size", cust_aicpu_kernel_store_size);
size_t task_info_size;
int64_t task_info_size;
(void)ge::AttrUtils::GetInt(obj, "task_info_size", task_info_size);
std::cout << "modeldef_size" << "[" << modeldef_size << "], " << "weight_data_size" << "[" << weight_data_size <<
"], " << "tbe_kernels_size" << "[" << tbe_kernels_size << "], " << "cust_aicpu_kernel_store_size" << "[" <<
@@ -821,7 +821,7 @@ Status GeGenerator::Impl::SaveRootModel(const string &file_name_prefix, GeRootMo
if (!SetOppVersionInfo(*(model_root.get()))) {
GELOGW("SetPackageVersionInfo of ops failed!");
}
if (!SetOmystemInfo(*(model_root.get()))) {
if (!SetOmSystemInfo(*(model_root.get()))) {
GELOGW("SetOmsystemInfo failed!");
}
ModelHelper model_helper;


Loading…
Cancel
Save