From eeac44786949e12f5a4f4cbd326f1552fd785ec2 Mon Sep 17 00:00:00 2001 From: "lianghao24@hisilicon.com" Date: Sat, 6 Mar 2021 15:39:58 +0800 Subject: [PATCH] warn check --- ge/executor/ge_executor.cc | 2 +- ge/graph/load/model_manager/davinci_model.cc | 22 +++++++++---------- ge/graph/manager/graph_manager.cc | 4 ++-- ge/graph/partition/dynamic_shape_partition.cc | 2 ++ .../same_transdata_breadth_fusion_pass.cc | 2 +- ge/graph/preprocess/multi_batch_copy_graph.cc | 2 +- ge/init/gelib.cc | 1 + 7 files changed, 19 insertions(+), 16 deletions(-) diff --git a/ge/executor/ge_executor.cc b/ge/executor/ge_executor.cc index 75211500..44b2dbfa 100755 --- a/ge/executor/ge_executor.cc +++ b/ge/executor/ge_executor.cc @@ -47,7 +47,7 @@ void GetGeTensorDescFromDomiInfo(std::vector &ge_descs, uint32_t idx = 0; for (auto desc_item : domi_descs) { ge::TensorDesc ge_desc; - ge_desc.SetName(desc_item.name); + ge_desc.SetName(desc_item.name.c_str()); ge_desc.SetDataType(static_cast(desc_item.data_type)); ge_desc.SetFormat(static_cast(formats[idx])); std::vector shape_dims; diff --git a/ge/graph/load/model_manager/davinci_model.cc b/ge/graph/load/model_manager/davinci_model.cc index d228f2fa..950ae5ca 100755 --- a/ge/graph/load/model_manager/davinci_model.cc +++ b/ge/graph/load/model_manager/davinci_model.cc @@ -527,25 +527,25 @@ Status DavinciModel::DoTaskSink() { } GE_CHK_RT_RET(rtGetAicpuDeploy(&deploy_type_)); - GELOGI("do task_sink. AiCpu deploy type is: %x.", deploy_type_); + GELOGI("Do task_sink. AiCpu deploy type is: %x.", deploy_type_); - GE_CHK_STATUS_RET(BindModelStream(), "Bind model stream failed"); + GE_CHK_STATUS_RET(BindModelStream(), "Bind model stream failed."); if (known_node_) { - GE_CHK_STATUS_RET(MallocKnownArgs(), "Mallloc known node args failed"); + GE_CHK_STATUS_RET(MallocKnownArgs(), "Mallloc known node args failed."); } - GE_CHK_STATUS_RET(InitTaskInfo(*model_task_def.get()), "InitTaskInfo failed"); + GE_CHK_STATUS_RET(InitTaskInfo(*model_task_def.get()), "InitTaskInfo failed."); - GE_CHK_STATUS_RET(ModelManager::GetInstance()->LaunchCustAicpuSo(), "Launch cust aicpu so failed"); + GE_CHK_STATUS_RET(ModelManager::GetInstance()->LaunchCustAicpuSo(), "Launch cust aicpu so failed."); - GE_CHK_STATUS_RET(ModelManager::GetInstance()->CheckAicpuOpList(ge_model_), "Check aicpu op type failed"); + GE_CHK_STATUS_RET(ModelManager::GetInstance()->CheckAicpuOpList(ge_model_), "Check aicpu op type failed."); - GE_CHK_STATUS_RET(InitEntryTask(), "InitEntryTask failed"); + GE_CHK_STATUS_RET(InitEntryTask(), "InitEntryTask failed."); - GE_CHK_STATUS_RET(InitL1DataDumperArgs(), "InitL1DataDumperArgs failed"); + GE_CHK_STATUS_RET(InitL1DataDumperArgs(), "InitL1DataDumperArgs failed."); - GE_CHK_STATUS_RET(DistributeTask(), "Distribute failed"); + GE_CHK_STATUS_RET(DistributeTask(), "Distribute failed."); GE_CHK_RT_RET(rtModelLoadComplete(rt_model_handle_)); @@ -558,7 +558,7 @@ Status DavinciModel::SetTSDevice() { int64_t value = 0; bool ret = ge::AttrUtils::GetInt(ge_model_, ATTR_MODEL_CORE_TYPE, value); uint32_t core_type = ret ? static_cast(value) : 0; - GELOGD("SetTSDevice: %u", core_type); + GELOGD("SetTSDevice: %u.", core_type); rtError_t rt_ret = rtSetTSDevice(core_type); if (rt_ret != RT_ERROR_NONE) { GELOGE(RT_FAILED, "SetTSDevice failed, ret: 0x%X", rt_ret); @@ -570,7 +570,7 @@ Status DavinciModel::SetTSDevice() { Status DavinciModel::OpDebugRegister() { bool is_op_debug = false; (void)ge::AttrUtils::GetBool(ge_model_, ATTR_OP_DEBUG_FLAG, is_op_debug); - GELOGD("The value of op debug in ge_model is %d", is_op_debug); + GELOGD("The value of op debug in ge_model is %d.", is_op_debug); if (is_op_debug) { debug_reg_mutex_.lock(); rtError_t rt_ret = rtMalloc(&op_debug_addr_, kOpDebugMemorySize, RT_MEMORY_DDR); diff --git a/ge/graph/manager/graph_manager.cc b/ge/graph/manager/graph_manager.cc index 131765ed..1cbb3fc8 100755 --- a/ge/graph/manager/graph_manager.cc +++ b/ge/graph/manager/graph_manager.cc @@ -3196,7 +3196,7 @@ Status GraphManager::SaveVariables(const Graph &graph, const std::vectorfirst; auto var_tensor = iter->second.GetTensorDesc(); - var_tensor.SetName(var_name); + var_tensor.SetName(var_name.c_str()); iter->second.SetTensorDesc(var_tensor); var_values.emplace_back(iter->second); } diff --git a/ge/graph/partition/dynamic_shape_partition.cc b/ge/graph/partition/dynamic_shape_partition.cc index 2a60765f..5736e39a 100755 --- a/ge/graph/partition/dynamic_shape_partition.cc +++ b/ge/graph/partition/dynamic_shape_partition.cc @@ -601,6 +601,8 @@ std::string Cluster::DebugString() const { case KNOWN_SHAPE: ss << "KNOW"; break; + default: + break; } ss << "[" << id_ << "](size:" << nodes_.size() << ")"; ss << "(" << min_ << "," << max_ << ")("; diff --git a/ge/graph/passes/same_transdata_breadth_fusion_pass.cc b/ge/graph/passes/same_transdata_breadth_fusion_pass.cc index ad8819e5..44778dd3 100644 --- a/ge/graph/passes/same_transdata_breadth_fusion_pass.cc +++ b/ge/graph/passes/same_transdata_breadth_fusion_pass.cc @@ -67,7 +67,7 @@ OpDescPtr SameTransdataBreadthFusionPass::GetCastOp(const GeTensorDesc &in_desc, auto fusion_cast_op_count = atomic_fusion_cast_op_count.fetch_add(1); std::stringstream cast_op_name; cast_op_name << "fusion_cast_" << fusion_cast_op_count; - auto node_op = ge::OperatorFactory::CreateOperator(cast_op_name.str(), CAST); + auto node_op = ge::OperatorFactory::CreateOperator(cast_op_name.str().c_str(), CAST); auto cast_op = ge::OpDescUtils::GetOpDescFromOperator(node_op); node_op.BreakConnect(); if (cast_op == nullptr) { diff --git a/ge/graph/preprocess/multi_batch_copy_graph.cc b/ge/graph/preprocess/multi_batch_copy_graph.cc index 215b31ee..12987f29 100644 --- a/ge/graph/preprocess/multi_batch_copy_graph.cc +++ b/ge/graph/preprocess/multi_batch_copy_graph.cc @@ -600,7 +600,7 @@ Status MultiBatchGraphCopyer::LabelInBatchBranchStatus() { for (auto &in_node : node->GetInDataNodes()) { if (origin_nodes_status_.find(in_node.get()) != origin_nodes_status_.end()) { if (origin_nodes_status_.find(node.get()) == origin_nodes_status_.end()) { - origin_nodes_status_[node.get()] == kNodeInBatchBranch; + origin_nodes_status_[node.get()] = kNodeInBatchBranch; ResetEnterStatus(frame_enters, node); changed = true; } diff --git a/ge/init/gelib.cc b/ge/init/gelib.cc index f754c71b..17e257c0 100644 --- a/ge/init/gelib.cc +++ b/ge/init/gelib.cc @@ -554,6 +554,7 @@ Status GEInit::Finalize() { if (instance_ptr != nullptr) { return instance_ptr->Finalize(); } + return SUCCESS; } string GEInit::GetPath() {