From 6a4323c444a44f6621413a628f0f95f2588753c2 Mon Sep 17 00:00:00 2001 From: liudingyan Date: Thu, 6 May 2021 16:14:26 +0800 Subject: [PATCH] modify geloge info --- ge/graph/build/graph_builder.cc | 112 +++++------ ge/graph/build/label_allocator.cc | 12 +- ge/graph/build/logical_stream_allocator.cc | 22 +-- ge/graph/build/memory/block_mem_assigner.cc | 32 ++- ge/graph/build/memory/graph_mem_assigner.cc | 13 +- ge/graph/build/memory/hybrid_mem_assigner.cc | 8 +- ge/graph/build/memory/memory_assigner.cc | 17 +- ge/graph/build/memory/var_mem_assign_util.cc | 40 ++-- ge/graph/build/model_builder.cc | 156 ++++++++------- ge/graph/build/run_context.cc | 40 ++-- ge/graph/build/stream_allocator.cc | 146 +++++++------- ge/graph/build/stream_graph_optimizer.cc | 12 +- ge/graph/build/task_generator.cc | 135 +++++++------ ge/graph/common/bcast.cc | 4 +- ge/graph/common/omg_util.cc | 32 +-- ge/graph/execute/graph_execute.cc | 125 ++++++------ ge/graph/label/case_label_maker.cc | 22 ++- ge/graph/label/if_label_maker.cc | 20 +- ge/graph/label/label_maker.cc | 38 ++-- .../label/partitioned_call_label_maker.cc | 6 +- ge/graph/label/while_label_maker.cc | 20 +- .../load/model_manager/cpu_queue_schedule.cc | 68 +++---- ge/graph/load/model_manager/data_dumper.cc | 53 ++--- ge/graph/load/model_manager/davinci_model.cc | 6 +- .../task_info/end_graph_task_info.cc | 10 +- .../task_info/event_record_task_info.cc | 6 +- .../task_info/event_wait_task_info.cc | 8 +- .../task_info/fusion_start_task_info.cc | 4 +- .../task_info/fusion_stop_task_info.cc | 4 +- .../model_manager/task_info/hccl_task_info.cc | 38 ++-- .../task_info/kernel_ex_task_info.cc | 65 ++++--- .../task_info/kernel_task_info.cc | 182 +++++++++--------- .../task_info/label_goto_ex_task_info.cc | 14 +- .../task_info/label_set_task_info.cc | 9 +- .../label_switch_by_index_task_info.cc | 23 +-- .../task_info/memcpy_addr_async_task_info.cc | 8 +- .../task_info/memcpy_async_task_info.cc | 8 +- .../task_info/model_exit_task_info.cc | 6 +- .../task_info/profiler_trace_task_info.cc | 4 +- .../task_info/stream_active_task_info.cc | 12 +- .../task_info/stream_switch_task_info.cc | 22 ++- .../task_info/stream_switchn_task_info.cc | 35 ++-- .../task_info/super_kernel/super_kernel.cc | 6 +- .../super_kernel/super_kernel_factory.cc | 14 +- .../load/model_manager/task_info/task_info.cc | 2 +- 45 files changed, 853 insertions(+), 766 deletions(-) diff --git a/ge/graph/build/graph_builder.cc b/ge/graph/build/graph_builder.cc index bcd80b0c..961600bd 100644 --- a/ge/graph/build/graph_builder.cc +++ b/ge/graph/build/graph_builder.cc @@ -79,7 +79,8 @@ Status HandleSubgraphDataNode(NodePtr &src_node, OutDataAnchorPtr &src_out_ancho if (!AttrUtils::GetInt(src_node->GetOpDesc(), ATTR_NAME_PARENT_NODE_INDEX, index)) { REPORT_INNER_ERROR("E19999", "get attr:%s failed from node:%s", ATTR_NAME_PARENT_NODE_INDEX.c_str(), src_node->GetName().c_str()); - GELOGE(FAILED, "Get attr ATTR_NAME_PARENT_NODE_INDEX failed, node:%s.", src_node->GetName().c_str()); + GELOGE(FAILED, "[Get][Attr] %s failed, node:%s.", ATTR_NAME_PARENT_NODE_INDEX.c_str(), + src_node->GetName().c_str()); return FAILED; } const NodePtr &parent_node = src_node->GetOwnerComputeGraph()->GetParentNode(); @@ -113,7 +114,8 @@ Status GraphBuilder::CalcOpParam(const ge::ComputeGraphPtr &graph) { if (instance_ptr == nullptr || !instance_ptr->InitFlag()) { REPORT_INNER_ERROR("E19999", "check gelib instance null, graph:%s", graph->GetName().c_str()); - GELOGE(GE_CLI_GE_NOT_INITIALIZED, "GraphBuilder: GE is not initialized"); + GELOGE(GE_CLI_GE_NOT_INITIALIZED, "[Check][GELib] GraphBuilder: GE is not initialized, graph:%s", + graph->GetName().c_str()); return GE_CLI_GE_NOT_INITIALIZED; } @@ -127,7 +129,7 @@ Status GraphBuilder::CalcOpParam(const ge::ComputeGraphPtr &graph) { if (kernel_lib_name.empty()) { REPORT_INNER_ERROR("E19999", "op kernel lib is empty in node:%s(%s)", node_ptr->GetName().c_str(), node_ptr->GetType().c_str()); - GELOGE(INTERNAL_ERROR, "Get node:%s(%s) kernel lib failed.", node_ptr->GetName().c_str(), + GELOGE(INTERNAL_ERROR, "[Get][KernelLibName] of node:%s(%s) failed.", node_ptr->GetName().c_str(), node_ptr->GetType().c_str()); return INTERNAL_ERROR; } @@ -137,7 +139,7 @@ Status GraphBuilder::CalcOpParam(const ge::ComputeGraphPtr &graph) { if (ret != SUCCESS) { REPORT_CALL_ERROR("E19999", "Set node:%s(%s) inputDesc size failed", node_ptr->GetName().c_str(), node_ptr->GetType().c_str()); - GELOGE(ret, "Set node inputDesc size failed, node name is %s", node_ptr->GetName().c_str()); + GELOGE(ret, "[Set][InputSize] to node:%s failed.", node_ptr->GetName().c_str()); return ret; } @@ -145,7 +147,7 @@ Status GraphBuilder::CalcOpParam(const ge::ComputeGraphPtr &graph) { if (ret != SUCCESS) { REPORT_CALL_ERROR("E19999", "Call Calculate op:%s(%s) running param failed", node_ptr->GetName().c_str(), node_ptr->GetType().c_str()); - GELOGE(ret, "Calculate op running param failed, node name is %s", node_ptr->GetName().c_str()); + GELOGE(ret, "[Call][Calculate] op running param failed, node name is %s", node_ptr->GetName().c_str()); return ret; } GE_CHK_STATUS_RET(AddOutputMemTypeForNode(node_ptr)); @@ -202,7 +204,7 @@ Status GraphBuilder::UpdateParentNodeOutputSize(const ge::ComputeGraphPtr &graph Status GraphBuilder::Build(ComputeGraphPtr &comp_graph, GeRootModelPtr &ge_root_model_ptr, uint64_t session_id) { if (comp_graph == nullptr) { REPORT_INNER_ERROR("E19999", "check compute_graph nullptr, session_id:%lu", session_id); - GELOGE(GE_GRAPH_PARAM_NULLPTR, "Graph build comp_graph is null."); + GELOGE(GE_GRAPH_PARAM_NULLPTR, "[Check][Param] comp_graph is null, session_id:%lu", session_id); return GE_GRAPH_PARAM_NULLPTR; } ge_root_model_ptr = MakeShared(comp_graph); @@ -216,12 +218,13 @@ Status GraphBuilder::Build(ComputeGraphPtr &comp_graph, GeRootModelPtr &ge_root_ if (is_dynamic_shape || comp_graph->GetGraphUnknownFlag()) { GE_CHK_STATUS_RET( BuildForDynamicShapeGraph(comp_graph, ge_root_model_ptr, ge_model_ptr, session_id), - "Build for dynamic shape graph failed."); + "[Build][DynamicShapeGraph] failed, graph:%s, session id:%lu.", comp_graph->GetName().c_str(), session_id); return SUCCESS; } GE_CHK_STATUS_RET(BuildForKnownShapeGraph(comp_graph, ge_model_ptr, session_id), - "Build for known shape graph failed."); + "[Build][KnownShapeGraph] failed, graph:%s, session id:%lu.", + comp_graph->GetName().c_str(), session_id); ge_root_model_ptr->SetSubgraphInstanceNameToModel(comp_graph->GetName(), ge_model_ptr); return SUCCESS; } @@ -229,28 +232,29 @@ Status GraphBuilder::Build(ComputeGraphPtr &comp_graph, GeRootModelPtr &ge_root_ Status GraphBuilder::BuildForKnownShapeGraph(ComputeGraphPtr &comp_graph, GeModelPtr &ge_model_ptr, uint64_t session_id) { if (ge::GetContext().GetHostExecFlag()) { - GE_CHK_STATUS_RET(BuildForHostCpuGraph(comp_graph, ge_model_ptr, session_id), "Build for host-cpu graph failed."); + GE_CHK_STATUS_RET(BuildForHostCpuGraph(comp_graph, ge_model_ptr, session_id), + "[Build][HostCpuGraph] failed, graph:%s, session id:%lu.", + comp_graph->GetName().c_str(), session_id); return SUCCESS; } ErrorManager::GetInstance().SetStage(error_message::kModelCompile, error_message::kPreBuild); GELOGI("Begin to build known shape graph[%s].", comp_graph->GetName().c_str()); Status ret = SecondPartition(comp_graph); - GE_CHK_STATUS_RET(ret, "Graph[%s] second partition Failed.", comp_graph->GetName().c_str()); + GE_CHK_STATUS_RET(ret, "[Call][SecondPartition] for Graph[%s] failed.", comp_graph->GetName().c_str()); auto subgraph_map = graph_partitioner_.GetSubGraphMap(); GE_TIMESTAMP_START(BuildSubgraph); ge::ModelBuilder builder(session_id, comp_graph, subgraph_map, stream_max_parallel_num_, hcom_parallel_, build_mode_); GE_DUMP(comp_graph, "BeforePreBuildModel"); GE_TIMESTAMP_START(PreBuildModel); - GE_CHK_STATUS_RET(builder.PreBuildModel(), "Graph[%s] builder PreBuildModel() return fail.", + GE_CHK_STATUS_RET(builder.PreBuildModel(), "[PreBuild][Model] failed, Graph[%s].", comp_graph->GetName().c_str()); GE_TIMESTAMP_END(PreBuildModel, "GraphBuilder::PreBuildModel"); GE_DUMP(comp_graph, "AfterPreBuildModel"); GE_TIMESTAMP_START(CalcOpParam); - GE_CHK_STATUS_RET(CalcOpParam(comp_graph), "Graph[%s] builder CalcOpParam() return fail.", - comp_graph->GetName().c_str()); + GE_CHK_STATUS_RET(CalcOpParam(comp_graph), "[Calc][OpParam] fail, Graph[%s].", comp_graph->GetName().c_str()); GE_TIMESTAMP_END(CalcOpParam, "GraphBuilder::CalcOpParam"); GE_DUMP(comp_graph, "AfterCalcOpParam"); @@ -259,7 +263,7 @@ Status GraphBuilder::BuildForKnownShapeGraph(ComputeGraphPtr &comp_graph, return MEMALLOC_FAILED; } GE_TIMESTAMP_START(BuildModelForGetTask); - GE_CHK_STATUS_RET(builder.BuildModelForGetTask(*model_ptr), "Graph[%s] builder BuildModelForGetTask() return fail.", + GE_CHK_STATUS_RET(builder.BuildModelForGetTask(*model_ptr), "[Build][Model] ForGetTask fail, Graph[%s].", comp_graph->GetName().c_str()); GE_TIMESTAMP_END(BuildModelForGetTask, "GraphBuilder::BuildModelForGetTask"); GE_DUMP(comp_graph, "AfterBuildModel"); @@ -270,7 +274,7 @@ Status GraphBuilder::BuildForKnownShapeGraph(ComputeGraphPtr &comp_graph, GE_TIMESTAMP_END(GetTaskInfo, "GraphBuilder::GetTaskInfo"); GE_DUMP(comp_graph, "AfterGetTask"); if (ret != SUCCESS) { - GELOGE(ret, "Graph[%s] builder GetTaskInfo() return fail.", comp_graph->GetName().c_str()); + GELOGE(ret, "[Get][TaskInfo] fail, Graph[%s].", comp_graph->GetName().c_str()); return ret; } @@ -280,7 +284,7 @@ Status GraphBuilder::BuildForKnownShapeGraph(ComputeGraphPtr &comp_graph, return MEMALLOC_FAILED; } GE_CHK_STATUS_RET(builder.SaveDataToModel(*model_ptr, *ge_model_ptr), - "Graph[%s] builder SaveDataToModel() return fail.", comp_graph->GetName().c_str()); + "[Save][Data] ToModel fail, Graph[%s].", comp_graph->GetName().c_str()); GELOGD("Success to build graph[%s] model.", comp_graph->GetName().c_str()); GE_TIMESTAMP_END(BuildSubgraph, "GraphBuilder::Build"); return SUCCESS; @@ -315,7 +319,7 @@ Status GraphBuilder::SetConstantInputOffset(ComputeGraphPtr &comp_graph) { if (weights.empty()) { REPORT_INNER_ERROR("E19999", "check weights size of node %s(%s) is empty", node->GetName().c_str(), node->GetType().c_str()); - GELOGE(FAILED, "weights size of node %s is empty", node->GetName().c_str()); + GELOGE(FAILED, "[Check][Param] weights size of node %s is empty", node->GetName().c_str()); return FAILED; } GeTensorPtr weight = weights[0]; @@ -342,23 +346,21 @@ Status GraphBuilder::BuildForUnknownShapeGraph(ComputeGraphPtr &comp_graph, GeMo ge::ModelBuilder builder(session_id, comp_graph, subgraph_map, stream_max_parallel_num_, hcom_parallel_, build_mode_); GE_DUMP(comp_graph, "BeforePreBuildModel"); GE_TIMESTAMP_START(PreBuildModel); - GE_CHK_STATUS_RET(builder.PreBuildModel(), "Graph[%s] builder PreBuildModel() return fail.", - comp_graph->GetName().c_str()); + GE_CHK_STATUS_RET(builder.PreBuildModel(), "[PreBuild][Model] fail, Graph[%s].", comp_graph->GetName().c_str()); GE_TIMESTAMP_END(PreBuildModel, "GraphBuilder::PreBuildModel"); GE_DUMP(comp_graph, "AfterPreBuildModel"); GE_TIMESTAMP_START(CalcOpParam); - GE_CHK_STATUS_RET(CalcOpParam(comp_graph), "Graph[%s] builder CalcOpParam() return fail.", - comp_graph->GetName().c_str()); + GE_CHK_STATUS_RET(CalcOpParam(comp_graph), "[Calc][OpParam] fail, Graph[%s].", comp_graph->GetName().c_str()); GE_TIMESTAMP_END(CalcOpParam, "GraphBuilder::CalcOpParam"); GE_DUMP(comp_graph, "AfterCalcOpParam"); GE_TIMESTAMP_START(SetConstantInputOffset); GE_CHK_STATUS_RET(SetConstantInputOffset(comp_graph), - "Graph[%s] failed to set constant input offset.", comp_graph->GetName().c_str()); + "[Set][Offset] Graph[%s] failed to set constant input offset.", comp_graph->GetName().c_str()); GE_TIMESTAMP_END(SetConstantInputOffset, "GraphBuilder::SetConstantInputOffset"); GE_TIMESTAMP_START(MergeWeights); - GE_CHK_STATUS_RET(builder.MergeWeights(), "Graph[%s] failed to merge weights.", comp_graph->GetName().c_str()); + GE_CHK_STATUS_RET(builder.MergeWeights(), "[Merge][Weights] failed for Graph[%s].", comp_graph->GetName().c_str()); GE_TIMESTAMP_END(MergeWeights, "GraphBuilder::MergeWeights"); ModelPtr model_ptr = MakeShared(); @@ -367,7 +369,7 @@ Status GraphBuilder::BuildForUnknownShapeGraph(ComputeGraphPtr &comp_graph, GeMo } GE_TIMESTAMP_START(BuildModelForGetDynShapeTask); GE_CHK_STATUS_RET(builder.BuildModelForGetDynShapeTask(*model_ptr), - "Graph[%s] builder BuildModelForGetDynShapeTask() return fail.", comp_graph->GetName().c_str()); + "[Build][Model] ForGetDynShapeTask fail, Graph[%s].", comp_graph->GetName().c_str()); GE_TIMESTAMP_END(BuildModelForGetDynShapeTask, "GraphBuilder::BuildModelForGetDynShapeTask"); ErrorManager::GetInstance().SetStage(error_message::kModelCompile, error_message::kTaskGenerate); GE_TIMESTAMP_START(GetTaskInfo); @@ -378,7 +380,7 @@ Status GraphBuilder::BuildForUnknownShapeGraph(ComputeGraphPtr &comp_graph, GeMo GraphUtils::DumpGEGraph(comp_graph, "AfterGetTask"); GraphUtils::DumpGEGraphToOnnx(*comp_graph, "AfterGetTask"); if (ret != SUCCESS) { - GELOGE(ret, "Graph[%s] builder GetTaskInfo() return fail.", comp_graph->GetName().c_str()); + GELOGE(ret, "[Get][TaskInfo] fail, Graph[%s].", comp_graph->GetName().c_str()); return ret; } ge_model_ptr = MakeShared(); @@ -386,7 +388,7 @@ Status GraphBuilder::BuildForUnknownShapeGraph(ComputeGraphPtr &comp_graph, GeMo return MEMALLOC_FAILED; } GE_CHK_STATUS_RET(builder.SaveDataToModel(*model_ptr, *ge_model_ptr), - "Graph[%s] builder SaveDataToModel() return fail.", comp_graph->GetName().c_str()); + "[Save][Data] ToModel fail, Graph[%s].", comp_graph->GetName().c_str()); GELOGD("Success to build graph[%s] model.", comp_graph->GetName().c_str()); return SUCCESS; } @@ -433,8 +435,9 @@ Status GraphBuilder::MarkFpBpProfilingTaskAttr(ComputeGraphPtr &com_graph) { GE_IF_BOOL_EXEC(TypeUtils::CheckUint64MulOverflow(i, kProfilingArStep), REPORT_INNER_ERROR("E19999", "Multiply result is out of range when calc profiling ar log id " "for node:%s(%s)", op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(FAILED, "Multiply result is out of range."); - return FAILED); + GELOGE(FAILED, "[Check][Param] Multiply result is out of range, node:%s(%s)", + op_desc->GetName().c_str(), op_desc->GetType().c_str()); + return FAILED); int64_t log_id = i * kProfilingArStep + kProfilingArStartLogid; (void)ge::AttrUtils::SetInt(op_desc, ATTR_NAME_INSERT_PROFILILNG_TASK_LOG_ID, log_id); continue; @@ -458,14 +461,14 @@ Status GraphBuilder::BuildForDynamicShapeGraph(ComputeGraphPtr &comp_graph, GE_CHECK_NOTNULL(op_desc); op_desc->SetStreamId(kInvalidStream); if (node->GetType() == DATA) { - GE_CHK_STATUS_RET(CalcDynShapeRootGraphDataSize(op_desc), "Calc dynamic shape root graph data[%s] size failed.", + GE_CHK_STATUS_RET(CalcDynShapeRootGraphDataSize(op_desc), "[Calc][DynShapeRootGraphDataSize] failed, op:%s.", op_desc->GetName().c_str()); } } // Set fp bp profiling task attr for graph if (MarkFpBpProfilingTaskAttr(comp_graph) != SUCCESS) { - GELOGE(FAILED, "Set fp bp profiling task attr for graph."); + GELOGE(FAILED, "[Mark][TaskAttr]Set fp bp profiling task attr for graph:%s failed.", comp_graph-GetGraphUnknownFlag()) { // unknown shape build flow GE_CHK_STATUS_RET(BuildForUnknownShapeGraph(sub_graph, ge_model_ptr, session_id), - "Build for unknown shape graph failed."); + "[Build][Graph] as unknown shape failed, session id:%lu.", session_id); } else { // reset functional subgraph parent graph as known subgraph for (const auto &node : sub_graph->GetDirectNode()) { for (const auto &sub_graph_name : node->GetOpDesc()->GetSubgraphInstanceNames()) { auto sub_sub_graph = comp_graph->GetSubgraph(sub_graph_name); - GE_CHK_STATUS_RET(sub_graph->AddSubgraph(sub_sub_graph), "Failed add subgraph to known graph."); + GE_CHK_STATUS_RET(sub_graph->AddSubgraph(sub_sub_graph), + "[Add][SubGraph] %s to known graph:%s failed.", sub_sub_graph->GetName().c_str(), + sub_graph->GetName().c_str()); } } // known shape build flow GE_CHK_STATUS_RET(BuildForKnownShapeGraph(sub_graph, ge_model_ptr, session_id), - "Build for known shape graph failed."); + "[Build][Graph] for known shape failed, session id:%lu.", session_id); } ge_root_model_ptr->SetSubgraphInstanceNameToModel(sub_graph->GetName(), ge_model_ptr); } @@ -510,19 +515,20 @@ Status GraphBuilder::GetTaskInfo(const ge::ModelBuilder &builder, const ModelPtr int64_t memory_size = 0; if (!AttrUtils::GetInt(model_ptr, ATTR_MODEL_MEMORY_SIZE, memory_size)) { REPORT_INNER_ERROR("E19999", "Get Attr:%s fail in model", ATTR_MODEL_MEMORY_SIZE.c_str()); - GELOGE(INTERNAL_ERROR, "Get memory size fail."); + GELOGE(INTERNAL_ERROR, "[Get][Attr] memory size fail, graph:%s, session id:%lu.", comp_graph->GetName().c_str(), + session_id); return INTERNAL_ERROR; } int64_t p2p_memory_size = 0; if (!AttrUtils::GetInt(model_ptr, ATTR_MODEL_P2P_MEMORY_SIZE, p2p_memory_size)) { REPORT_INNER_ERROR("E19999", "Get Attr:%s fail in model", ATTR_MODEL_P2P_MEMORY_SIZE.c_str()); - GELOGE(INTERNAL_ERROR, "Get p2p memory size fail."); + GELOGE(INTERNAL_ERROR, "[Get][Attr] %s fail in model", ATTR_MODEL_P2P_MEMORY_SIZE.c_str()); return INTERNAL_ERROR; } int64_t weight_size = 0; if (!AttrUtils::GetInt(model_ptr, ATTR_MODEL_WEIGHT_SIZE, weight_size)) { REPORT_INNER_ERROR("E19999", "Get Attr:%s fail in model", ATTR_MODEL_WEIGHT_SIZE.c_str()); - GELOGE(INTERNAL_ERROR, "Get weight memory size fail."); + GELOGE(INTERNAL_ERROR, "[Get][Attr] %s fail in model", ATTR_MODEL_WEIGHT_SIZE.c_str()); return INTERNAL_ERROR; } @@ -548,20 +554,20 @@ Status GraphBuilder::GetTaskInfo(const ge::ModelBuilder &builder, const ModelPtr Status ret = run_context.InitMemInfo(get_mem_base, memory_size, mem_type_to_data_mem_base, mem_type_to_data_mem_size, get_weight_mem_base, weight_size); if (ret != SUCCESS) { - GELOGE(ret, "task_generator init mem info fail."); + GELOGE(ret, "[Init][MemInfo] fail, ret:%d.", ret); return ret; } auto weight_buffer = builder.GetWeightBuffer(); ret = run_context.CreateRunContext(*model_ptr, comp_graph, weight_buffer, session_id); if (ret != SUCCESS) { - GELOGE(ret, "runContext create run context fail."); + GELOGE(ret, "[Create][RunContext] fail, ret:%d, graph:%s.", ret, comp_graph->GetName().c_str()); return ret; } StreamGraphOptimizer stream_optimizer; ret = stream_optimizer.OptimizeStreamedSubGraph(comp_graph, subgraph_map, run_context.GetRunContext()); if (ret != SUCCESS) { - GELOGE(ret, "Optimize streamed subGraph fail."); + GELOGE(ret, "[Optimize][StreamedSubGraph] fail, graph:%s.", comp_graph->GetName().c_str()); return ret; } GE_DUMP(comp_graph, "AfterOptimizeStreamedSubGraph"); @@ -578,13 +584,13 @@ Status GraphBuilder::SetInputSize(const ge::NodePtr &node_ptr) { if (node_ptr->GetType() == DATA) { bool is_unknown_shape = false; GE_CHK_STATUS_RET(ge::NodeUtils::GetNodeUnknownShapeStatus(*node_ptr, is_unknown_shape), - "Get data node[%s] shape status failed!", node_ptr->GetName().c_str()); + "[Get][Status] of data node[%s] shape failed!", node_ptr->GetName().c_str()); if (is_unknown_shape) { GELOGD("data node: %s is unknown shape, do not set input size!", node_ptr->GetName().c_str()); return SUCCESS; } if (UpdateDataInputSize(node_ptr) != SUCCESS) { - GELOGE(FAILED, "Update data input size failed."); + GELOGE(FAILED, "[Update][Data] input size failed, node:%s.", node_ptr->GetName().c_str()); return FAILED; } } @@ -632,7 +638,7 @@ Status GraphBuilder::UpdateDataInputSize(const ge::NodePtr &node_ptr) { const auto &op_desc = node_ptr->GetOpDesc(); if (op_desc == nullptr) { REPORT_INNER_ERROR("E19999", "check op_desc is nullptr"); - GELOGE(FAILED, "Op desc is nullptr."); + GELOGE(FAILED, "[Check][Param] Op desc is nullptr."); return FAILED; } // data op only has one output anchor @@ -651,7 +657,7 @@ Status GraphBuilder::UpdateDataInputSize(const ge::NodePtr &node_ptr) { if (graph_status != GRAPH_SUCCESS) { REPORT_CALL_ERROR("E19999", "Get tensor size in bytes failed for op:%s(%s) index:0", op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(FAILED, "Get tensor size in bytes failed."); + GELOGE(FAILED, "[Get][TensorSize] in bytes failed, op:%s.", op_desc->GetName().c_str()); return FAILED; } // data op only has one input anchor @@ -660,7 +666,7 @@ Status GraphBuilder::UpdateDataInputSize(const ge::NodePtr &node_ptr) { if (op_desc->UpdateInputDesc(0, input_desc) != GRAPH_SUCCESS) { REPORT_CALL_ERROR("E19999", "Update input desc size failed for op:%s(%s) index:0", op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(FAILED, "Update input desc size failed."); + GELOGE(FAILED, "[Update][InputDesc] failed, op:%s.", op_desc->GetName().c_str()); return FAILED; } } @@ -690,7 +696,7 @@ Status GraphBuilder::CalcDynShapeRootGraphDataSize(const ge::OpDescPtr &op_desc) if (graph_status != GRAPH_SUCCESS) { REPORT_CALL_ERROR("E19999", "Get tensor size in bytes failed for op:%s(%s) index:0 ", op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(FAILED, "Get tensor size in bytes failed."); + GELOGE(FAILED, "[Get][TensorSize] in bytes failed, op:%s.", op_desc->GetName().c_str()); return FAILED; } @@ -699,7 +705,7 @@ Status GraphBuilder::CalcDynShapeRootGraphDataSize(const ge::OpDescPtr &op_desc) if (op_desc->UpdateOutputDesc(0, output_desc) != GRAPH_SUCCESS) { REPORT_CALL_ERROR("E19999", "Update output desc size failed for op:%s(%s) index:0 ", op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(FAILED, "Update dynamic shape graph data output desc size failed."); + GELOGE(FAILED, "[Update][OutputDesc] for dynamic shape graph data failed, op:%s.", op_desc->GetName().c_str()); return FAILED; } } @@ -710,15 +716,13 @@ Status GraphBuilder::SecondPartition(ge::ComputeGraphPtr &comp_graph) { GE_TIMESTAMP_START(GraphPartition2); auto ret = graph_partitioner_.Partition(comp_graph, GraphPartitioner::kSecondPartitioning); if (ret != SUCCESS) { - GELOGE(ret, "Graph partition Failed"); + GELOGE(ret, "[Call][Partition] for Graph Failed"); return ret; } - GE_CHK_STATUS_RET(ret, "Graph partition Failed."); const auto &graph_2_subgraphlist = graph_partitioner_.GetSubGraphMap(); if (graph_2_subgraphlist.find(comp_graph) == graph_2_subgraphlist.end()) { - REPORT_INNER_ERROR("E19999", "find subgraphlis in graph:%s failed", - comp_graph->GetName().c_str()); - GELOGE(FAILED, "Find subgraph failed."); + REPORT_INNER_ERROR("E19999", "find subgraphlis in graph:%s failed", comp_graph->GetName().c_str()); + GELOGE(FAILED, "[Check][Param] Find subgraph graph:%s failed.", comp_graph->GetName().c_str()); return FAILED; } GE_TIMESTAMP_END(GraphPartition2, "GraphPartitioner::Partition2"); @@ -749,17 +753,17 @@ Status GraphBuilder::AddOutputMemTypeForNode(const NodePtr &node) { REPORT_INNER_ERROR("E19999", "Set Attr:%s for node:%s(%s) out_index:%u failed", ATTR_OUTPUT_MEMORY_TYPE.c_str(), src_desc->GetName().c_str(), src_desc->GetType().c_str(), src_out_anchor->GetIdx()); - GELOGE(INTERNAL_ERROR, "Set out_memory_type attr for [%s:%d] failed.", src_desc->GetName().c_str(), + GELOGE(INTERNAL_ERROR, "[Set][Attr] out_memory_type for [%s:%d] failed.", src_desc->GetName().c_str(), src_out_anchor->GetIdx()); return INTERNAL_ERROR; } switch (TransferNodeType(src_node)) { case kSubgraphNode: - GE_CHK_STATUS_RET(HandleSubgraphNode(src_node, src_out_anchor), "Handle subgraph node %s failed", + GE_CHK_STATUS_RET(HandleSubgraphNode(src_node, src_out_anchor), "[Handle][Node] %s in subgraph failed", src_node->GetName().c_str()); break; case kSubgraphData: - GE_CHK_STATUS_RET(HandleSubgraphDataNode(src_node, src_out_anchor), "Handle Data node %s in subgraph failed", + GE_CHK_STATUS_RET(HandleSubgraphDataNode(src_node, src_out_anchor), "[Handle][DataNode] %s in subgraph failed", src_node->GetName().c_str()); break; case kOthers: diff --git a/ge/graph/build/label_allocator.cc b/ge/graph/build/label_allocator.cc index b6ef8dc9..32bdd0a3 100644 --- a/ge/graph/build/label_allocator.cc +++ b/ge/graph/build/label_allocator.cc @@ -29,7 +29,7 @@ LabelAllocator::LabelAllocator(const ComputeGraphPtr &graph) : compute_graph_(gr Status LabelAllocator::AssignFunctionalLabels() { if (compute_graph_ == nullptr) { REPORT_INNER_ERROR("E19999", "check param compute_graph nullptr"); - GELOGE(INTERNAL_ERROR, "ComputeGraph not set, Assign labels failed."); + GELOGE(INTERNAL_ERROR, "[Check][Param] ComputeGraph not set, Assign labels failed."); return INTERNAL_ERROR; } @@ -49,14 +49,14 @@ Status LabelAllocator::AssignFunctionalLabels() { if (maker == nullptr) { REPORT_CALL_ERROR("E19999", "Check Node:%s(%s) label maker not registed", node->GetName().c_str(), node->GetType().c_str()); - GELOGE(INTERNAL_ERROR, "Node: %s label maker not registed.", node->GetType().c_str()); + GELOGE(INTERNAL_ERROR, "[Create][LabelMaker] Node: %s label maker not registed.", node->GetType().c_str()); return INTERNAL_ERROR; } if (maker->Run(label_index) != SUCCESS) { REPORT_CALL_ERROR("E19999", "Node:%s(%s) run label maker failed", node->GetName().c_str(), node->GetType().c_str()); - GELOGE(INTERNAL_ERROR, "Node: %s run label maker failed.", node->GetType().c_str()); + GELOGE(INTERNAL_ERROR, "[Call][Run] Node: %s run label maker failed.", node->GetType().c_str()); return INTERNAL_ERROR; } } @@ -69,7 +69,7 @@ Status LabelAllocator::AssignFunctionalLabels() { bool LabelAllocator::CollectFunctionalNode(ComputeGraphPtr &graph, std::set &functional_nodes) { if (graph == nullptr) { REPORT_INNER_ERROR("E19999", "check param compute_graph nullptr"); - GELOGE(INTERNAL_ERROR, "Sub ComputeGraph is null."); + GELOGE(INTERNAL_ERROR, "[Check][Param] Sub ComputeGraph is null."); return false; } @@ -82,7 +82,7 @@ bool LabelAllocator::CollectFunctionalNode(ComputeGraphPtr &graph, std::setGetName().c_str(), func_node->GetType().c_str(), graph->GetName().c_str()); - GELOGE(INTERNAL_ERROR, "Parent functional node not set: %s.", graph->GetName().c_str()); + GELOGE(INTERNAL_ERROR, "[Get][Node] Parent functional node not set: %s.", graph->GetName().c_str()); return false; } @@ -90,7 +90,7 @@ bool LabelAllocator::CollectFunctionalNode(ComputeGraphPtr &graph, std::setGetName().c_str(), func_node->GetType().c_str(), graph->GetName().c_str()); - GELOGE(INTERNAL_ERROR, "ComputeGraph owner not set: %s.", func_node->GetName().c_str()); + GELOGE(INTERNAL_ERROR, "[Get][Graph] ComputeGraph owner not set: %s.", func_node->GetName().c_str()); return false; } diff --git a/ge/graph/build/logical_stream_allocator.cc b/ge/graph/build/logical_stream_allocator.cc index 88b4a97f..c74cdf7a 100644 --- a/ge/graph/build/logical_stream_allocator.cc +++ b/ge/graph/build/logical_stream_allocator.cc @@ -322,7 +322,7 @@ Status SingleStreamPass::Run(ComputeGraphPtr graph, const vector &s if (!stream_label.empty()) { REPORT_INNER_ERROR("E19999", "Stream labels are not supported in SingleStream mode " "(subgraph: %s, stream label: %s)", subgraph->name.c_str(), stream_label.c_str()); - GELOGE(INTERNAL_ERROR, "Stream labels are not supported (subgraph: %s, stream label: %s).", + GELOGE(INTERNAL_ERROR, "[Get][Label] Stream labels are not supported (subgraph: %s, stream label: %s).", subgraph->name.c_str(), stream_label.c_str()); return INTERNAL_ERROR; } @@ -341,8 +341,8 @@ Status NodeStreamUpdatePass::Run(ComputeGraphPtr graph, const vectorname.c_str(), engine_name.c_str()); - GELOGE(INTERNAL_ERROR, "Subgraph %s has not yet been assigned a stream (engine: %s).", subgraph->name.c_str(), - engine_name.c_str()); + GELOGE(INTERNAL_ERROR, "[Check][Param] Subgraph %s has not yet been assigned a stream (engine: %s).", + subgraph->name.c_str(), engine_name.c_str()); return INTERNAL_ERROR; } else { GELOGI("[Assign][StreamId] %ld for Subgraph %s (engine: %s).", subgraph->stream_id, subgraph->name.c_str(), @@ -402,7 +402,7 @@ Status UpdateForParallelGroupPass::Run(ComputeGraphPtr graph, const vectorGetName().c_str()); + GELOGE(FAILED, "[Get][Attr] ATTR_NAME_PARALLEL_GROUP of node %s failed.", op_desc->GetName().c_str()); REPORT_INNER_ERROR("E19999", "Get node %s ATTR_NAME_PARALLEL_GROUP failed.", op_desc->GetName().c_str()); return FAILED; } @@ -606,7 +606,7 @@ Status LogicalStreamAllocator::Assign(const ComputeGraphPtr &root_graph, const G Status status = DoAssign(root_graph, subgraph_map, engine_confs); if (status != SUCCESS) { - GELOGE(status, "Assign streams failed."); + GELOGE(status, "[Assign][Streams] failed, graph:%s.", root_graph->GetName().c_str()); return status; } @@ -614,7 +614,7 @@ Status LogicalStreamAllocator::Assign(const ComputeGraphPtr &root_graph, const G for (const ComputeGraphPtr &subgraph : subgraphs) { Status status = DoAssign(subgraph, subgraph_map, engine_confs); if (status != SUCCESS) { - GELOGE(status, "Assign streams failed."); + GELOGE(status, "[Assign][Streams] failed, graph:%s.", subgraph->GetName().c_str()); return status; } } @@ -642,7 +642,7 @@ Status LogicalStreamAllocator::DoAssign(const ComputeGraphPtr &graph, const Grap if (iter == subgraph_map.end()) { REPORT_INNER_ERROR("E19999", "Graph %s not found in subgraph_map when do logical stream assign ", graph->GetName().c_str()); - GELOGE(FAILED, "Graph %s not found.", graph->GetName().c_str()); + GELOGE(FAILED, "[Check][Param] Graph %s not found.", graph->GetName().c_str()); return FAILED; } @@ -652,7 +652,7 @@ Status LogicalStreamAllocator::DoAssign(const ComputeGraphPtr &graph, const Grap Status status = ConvertSubgraphs(subgraph_info_list, engine_confs, subgraphs); GE_TIMESTAMP_END(ConvertSubgraphs, "GraphBuilder::AssignStreamConvertSubgraphs"); if (status != SUCCESS) { - GELOGE(status, "Create subgraphs failed."); + GELOGE(status, "[Convert][SubGraphs] failed."); return status; } @@ -683,8 +683,8 @@ Status LogicalStreamAllocator::ConvertSubgraphs(const vector &s if ((engine_conf_iter == engine_confs.end()) || (engine_conf_iter->second == nullptr)) { REPORT_INNER_ERROR("E19999", "Engine conf of subgraph %s not found (engine name: %s)", subgraph_name.c_str(), engine_name.c_str()); - GELOGE(INTERNAL_ERROR, "Engine conf of subgraph %s not found (engine name: %s).", subgraph_name.c_str(), - engine_name.c_str()); + GELOGE(INTERNAL_ERROR, "[Check][Param] Engine conf of subgraph %s not found (engine name: %s).", + subgraph_name.c_str(), engine_name.c_str()); return INTERNAL_ERROR; } @@ -731,7 +731,7 @@ Status LogicalStreamAllocator::RunPasses(const ComputeGraphPtr &graph, const vec GELOGD("[Show][Status]Stream pass %s return NOT_CHANGED.", pass->GetName().c_str()); } else { REPORT_CALL_ERROR("E19999", "Stream pass %s run failed.", pass->GetName().c_str()); - GELOGE(status, "Stream pass %s failed.", pass->GetName().c_str()); + GELOGE(status, "[Call][Run] Stream pass %s failed.", pass->GetName().c_str()); return status; } } diff --git a/ge/graph/build/memory/block_mem_assigner.cc b/ge/graph/build/memory/block_mem_assigner.cc index 926ed30c..f1cad6d9 100755 --- a/ge/graph/build/memory/block_mem_assigner.cc +++ b/ge/graph/build/memory/block_mem_assigner.cc @@ -781,7 +781,8 @@ bool IsContinuousInputNodeMaxLife(const NodePtr &n, uint32_t out_index) { } auto peer_in_node_desc = peer_in_anchor->GetOwnerNode()->GetOpDesc(); GE_IF_BOOL_EXEC(peer_in_node_desc == nullptr, - GELOGE(FAILED, "Node[%s] output[%u] peer in node desc is null.", n->GetName().c_str(), out_index); + GELOGE(FAILED, "[Get][OpDesc] Node[%s] output[%u] peer in node desc is null.", + n->GetName().c_str(), out_index); return false;); if(peer_in_node_desc->GetId() > max_node_life_time) { @@ -1057,7 +1058,8 @@ void BlockMemAssigner::UpdateOpTensorMemType(std::list node_index_i bool BlockMemAssigner::IsContinuousOutput(const NodePtr &n) { if (n == nullptr) { - GELOGE(FAILED, "Node is null."); + REPORT_INNER_ERROR("E19999", "param n is nullptr, check invalid."); + GELOGE(FAILED, "[Check][Param] Node is null."); return false; } @@ -1065,7 +1067,8 @@ bool BlockMemAssigner::IsContinuousOutput(const NodePtr &n) { bool is_output_continuous = false; auto node_desc = n->GetOpDesc(); if (node_desc == nullptr) { - GELOGE(FAILED, "Node[%s] nodedesc is null.", n->GetName().c_str()); + REPORT_INNER_ERROR("E19999", "param node:%s opdesc is nullptr, check invalid.", n->GetName().c_str()); + GELOGE(FAILED, "[Get][OpDesc] Node[%s] nodedesc is null.", n->GetName().c_str()); return false; } @@ -1430,7 +1433,9 @@ MemoryBlock *BlockMemAssigner::ApplyOutMemory(const NodePtr &n, uint32_t index, auto op_desc = owner_node->GetOpDesc(); GE_IF_BOOL_EXEC(op_desc == nullptr, continue); Params *instance = Params::Instance(); - GE_CHK_BOOL_TRUE_EXEC_WITH_LOG(instance == nullptr, return nullptr, "Params instance is nullptr."); + GE_CHK_BOOL_TRUE_EXEC_WITH_LOG(instance == nullptr, + REPORT_INNER_ERROR("E19999", "Params instance is nullptr."); + return nullptr, "[Get][Instance] Params instance is nullptr."); if (!((instance->GetTarget() == TARGET_TYPE_TINY) && (op_desc->GetType() == NETOUTPUT))) { out_count++; } @@ -1442,7 +1447,9 @@ MemoryBlock *BlockMemAssigner::ApplyOutMemory(const NodePtr &n, uint32_t index, bool IsOutputBlock(const ge::InDataAnchorPtr &in_data_anchor) { auto peer_out_anchor = in_data_anchor->GetPeerOutAnchor(); - GE_IF_BOOL_EXEC(peer_out_anchor == nullptr, GELOGE(FAILED, "Peer out anchor is nullptr."); return false); + GE_IF_BOOL_EXEC(peer_out_anchor == nullptr, + REPORT_INNER_ERROR("E19999", "Peer out anchor is nullptr."); + GELOGE(FAILED, "[Check][Param] Peer out anchor is nullptr."); return false); auto src = peer_out_anchor->GetOwnerNode(); int32_t index = peer_out_anchor->GetIdx(); auto iter = GetLocalOmgContext().out_nodes_map.find(src->GetName()); @@ -1491,8 +1498,11 @@ bool IsKnownSubgraphData(const NodePtr &node) { void BlockMemAssigner::ReleaseMemory(MemoryBlock *to_release, vector &reusable_memory, bool same_stream) { - GE_CHK_BOOL_TRUE_EXEC_WITH_LOG(to_release == nullptr, return, "Input parameter to_release is null."); - GE_CHK_TRUE_EXEC_INFO(to_release->ref_count_ <= 0, return, "Release memory"); + GE_CHK_BOOL_TRUE_EXEC_WITH_LOG(to_release == nullptr, + return, "[Check][Param] Input parameter to_release is null."); + GE_CHK_TRUE_EXEC_INFO(to_release->ref_count_ <= 0, + return, "[Check][Param] to_release->ref_count_ must greater than 0"); + GE_CHK_TRUE_EXEC_INFO(!to_release->reuse_mem_, return, "[Check][Param] doesn't reuse memory"); --to_release->ref_count_; GE_CHK_TRUE_EXEC_INFO(!to_release->reuse_mem_, return, "doesn't reuse memory"); if (!same_stream) { @@ -1593,13 +1603,13 @@ void CheckAndGetOpReuseEnv(const string &env, vector &env_vec, bool &op_ string env_str; env_str = string(env); if (env_str.size() > kReuseMaxCharNum) { - GELOGE(FAILED, "The OP_NO_REUSE_MEM has more than %d characters.", kReuseMaxCharNum); + GELOGE(FAILED, "[Check][Param] The OP_NO_REUSE_MEM has more than %d characters.", kReuseMaxCharNum); return; } SplitStringByComma(env_str, env_vec); if (env_vec.size() > kReuseMaxOpNum) { - GELOGE(FAILED, "The OP_NO_REUSE_MEM has more than %d nodes.", kReuseMaxOpNum); + GELOGE(FAILED, "[Check][Param] The OP_NO_REUSE_MEM has more than %d nodes.", kReuseMaxOpNum); return; } @@ -1840,7 +1850,9 @@ void BlockMemAssigner::CheckWorkspaceReuse(const vector &workspace_reuse_f void BlockMemAssigner::GetNodeWorkSpaceSize(const NodePtr &node, vector &workspace_memory, int64_t &total_size) { - GE_CHK_BOOL_TRUE_EXEC_WITH_LOG(node->GetOpDesc() == nullptr, return, "Op desc is null."); + GE_CHK_BOOL_TRUE_EXEC_WITH_LOG(node->GetOpDesc() == nullptr, + REPORT_INNER_ERROR("E19999", "param node opdesc is nullptr, check invalid."); + return, "[Check][Param] Op desc is null."); vector workspace_byte_nums = node->GetOpDesc()->GetWorkspaceBytes(); GELOGD("node[%s] size:%zu", node->GetOpDesc()->GetName().c_str(), workspace_byte_nums.size()); diff --git a/ge/graph/build/memory/graph_mem_assigner.cc b/ge/graph/build/memory/graph_mem_assigner.cc index 2f339bde..a45fb239 100755 --- a/ge/graph/build/memory/graph_mem_assigner.cc +++ b/ge/graph/build/memory/graph_mem_assigner.cc @@ -233,9 +233,12 @@ Status GraphMemoryAssigner::ReAssignMemory(bool is_loop_graph, mapGetName().c_str()); + GE_CHK_STATUS_RET(ReAssignAtomicMemory(is_loop_graph), + "[ReAssign][AtomicMemory] Failed! graph:%s", compute_graph_->GetName().c_str()); + GE_CHK_STATUS_RET(AssignBufferPoolMemory(), + "[Assign][BufferPoolMemory] Failed! graph:%s", compute_graph_->GetName().c_str()); size_t total_mem_offset = 0; for (auto pair : memory_offset_) { @@ -1009,7 +1012,9 @@ Status GraphMemoryAssigner::AssignReferenceMemory() { node->GetName().c_str()); auto out_op_desc = node->GetOpDesc(); - GE_IF_BOOL_EXEC(out_op_desc == nullptr, GELOGE(ge::FAILED, "out_op_desc is null."); return ge::FAILED); + GE_IF_BOOL_EXEC(out_op_desc == nullptr, + REPORT_INNER_ERROR("E19999", "out_op_desc is null."); + GELOGE(ge::FAILED, "[Check][Param] out_op_desc is null."); return ge::FAILED); vector output_list = out_op_desc->GetOutputOffset(); if (out_op_desc->GetOutputsSize() > output_list.size()) { diff --git a/ge/graph/build/memory/hybrid_mem_assigner.cc b/ge/graph/build/memory/hybrid_mem_assigner.cc index 4ea52d9d..eff821bf 100755 --- a/ge/graph/build/memory/hybrid_mem_assigner.cc +++ b/ge/graph/build/memory/hybrid_mem_assigner.cc @@ -29,7 +29,7 @@ Status HybridMemAssigner::AssignMemory(std::unique_ptr &block_ vector ranges; GE_CHECK_NOTNULL(block_assigner); if (block_assigner->GetMemoryRanges(ranges) != SUCCESS) { - GELOGE(FAILED, "GetMemoryRanges Fail!"); + GELOGE(FAILED, "[Get][MemoryRanges] Fail!"); return FAILED; } GE_IF_BOOL_EXEC(ranges.empty(), return SUCCESS); @@ -43,7 +43,7 @@ Status HybridMemAssigner::AssignMemory(std::unique_ptr &block_ Status HybridMemAssigner::Assign() { if (GraphUtils::GetRefMapping(compute_graph_, symbol_to_anchors_, anchor_to_symbol_) != GRAPH_SUCCESS) { REPORT_CALL_ERROR("E19999", "Get ref-mapping for graph %s failed", compute_graph_->GetName().c_str()); - GELOGE(FAILED, "Get ref-mapping for graph %s failed.", compute_graph_->GetName().c_str()); + GELOGE(FAILED, "[Get][RefMapping] for graph %s failed.", compute_graph_->GetName().c_str()); return FAILED; } @@ -58,8 +58,8 @@ Status HybridMemAssigner::Assign() { size_t bin_mem_size = 0; size_t max_mem_size = 0; - GE_CHK_STATUS_RET(AssignMemory(binary_assigner, bin_mem_size), "BinaryBlock Method AssignMemory Fail!"); - GE_CHK_STATUS_RET(AssignMemory(max_assigner, max_mem_size), "MaxBlock Method AssignMemory Fail!"); + GE_CHK_STATUS_RET(AssignMemory(binary_assigner, bin_mem_size), "[Assign][Memory] Fail!"); + GE_CHK_STATUS_RET(AssignMemory(max_assigner, max_mem_size), "[Assign][Memory] Fail!"); std::unique_ptr priority_assigner; diff --git a/ge/graph/build/memory/memory_assigner.cc b/ge/graph/build/memory/memory_assigner.cc index d074fce0..34b97c60 100755 --- a/ge/graph/build/memory/memory_assigner.cc +++ b/ge/graph/build/memory/memory_assigner.cc @@ -24,45 +24,46 @@ Status MemoryAssigner::AssignMemory(bool is_loop_graph, map &me GraphMemoryAssigner graph_mem_assigner(compute_graph_); if (graph_mem_assigner.AssignMemory() != ge::SUCCESS) { - GELOGE(ge::FAILED, "Memory assigner failed"); + GELOGE(ge::FAILED, "[Assign][Memory] failed, graph:%s", compute_graph_->GetName().c_str()); return ge::FAILED; } // Reassign memory for special nodes if (graph_mem_assigner.ReAssignMemory(is_loop_graph, mem_offset) != ge::SUCCESS) { - GELOGE(ge::FAILED, "Memory assigner failed"); + GELOGE(ge::FAILED, "[ReAssign][Memory] failed, graph:%s", compute_graph_->GetName().c_str()); return ge::FAILED; } // Assign memory (block and offset) for zero copy nodes if (graph_mem_assigner.AssignZeroCopyMemory(mem_offset, zero_copy_mem_size) != ge::SUCCESS) { - GELOGE(ge::FAILED, "Zero copy memory assigner failed"); + GELOGE(ge::FAILED, "[Assign][ZeroCopyMemory] failed, graph:%s", compute_graph_->GetName().c_str()); return ge::FAILED; } if (graph_mem_assigner.AssignMemory2HasRefAttrNode() != ge::SUCCESS) { - GELOGE(ge::FAILED, "Assign memory to node which has ref attr failed!"); + GELOGE(ge::FAILED, "[Assign][Memory] to node which has ref attr failed! graph:%s", + compute_graph_->GetName().c_str()); return ge::FAILED; } // Assign memory for reference if (graph_mem_assigner.AssignReferenceMemory() != ge::SUCCESS) { - GELOGE(ge::FAILED, "Assign reference memory failed!"); + GELOGE(ge::FAILED, "[Assign][ReferenceMemory] failed! graph:%s", compute_graph_->GetName().c_str()); return ge::FAILED; } // Must do variable attr assign after all the memory assigned if (graph_mem_assigner.AssignVarAttr2Nodes() != SUCCESS) { - GELOGE(FAILED, "Variable Memory assigner failed"); + GELOGE(FAILED, "[Variable][Memory] assigner failed, graph:%s", compute_graph_->GetName().c_str()); return FAILED; } if (graph_mem_assigner.SetInputOffset() != ge::SUCCESS) { - GELOGE(ge::FAILED, "SetInputOffset Fail!"); + GELOGE(ge::FAILED, "[Set][InputOffset] Fail! graph:%s", compute_graph_->GetName().c_str()); return ge::FAILED; } if (graph_mem_assigner.CheckOffset() != SUCCESS) { - GELOGE(FAILED, "CheckOffset Fail!"); + GELOGE(FAILED, "[Check][Offset] Fail! graph:%s", compute_graph_->GetName().c_str()); return FAILED; } diff --git a/ge/graph/build/memory/var_mem_assign_util.cc b/ge/graph/build/memory/var_mem_assign_util.cc index 4cbde2af..b8138a30 100755 --- a/ge/graph/build/memory/var_mem_assign_util.cc +++ b/ge/graph/build/memory/var_mem_assign_util.cc @@ -53,9 +53,8 @@ Status VarMemAssignUtil::AssignStaticMemory2Node(ge::ComputeGraphPtr &compute_gr GE_IF_BOOL_EXEC(ge::AttrUtils::GetStr(n->GetOpDesc(), REF_VAR_SRC_VAR_NAME, ref_var_src_var_name), continue); string node_name = n->GetName(); GE_IF_BOOL_EXEC(n->GetOpDesc()->GetAllOutputsDesc().empty(), - REPORT_INNER_ERROR("E19999", "check node:%s has no OutputDesc", - n->GetName().c_str()); - GELOGE(FAILED, "node:%s has no OutputDesc.", n->GetName().c_str()); + REPORT_INNER_ERROR("E19999", "check node:%s has no OutputDesc", n->GetName().c_str()); + GELOGE(FAILED, "[Check][Param] node:%s has no OutputDesc.", n->GetName().c_str()); return FAILED); ge::ConstGeTensorDescPtr tensor_desc = n->GetOpDesc()->GetOutputDescPtr(0); GE_CHECK_NOTNULL(tensor_desc); @@ -118,9 +117,8 @@ Status VarMemAssignUtil::SetOutVariableAttr(const ge::NodePtr &node, const ge::N GE_CHECK_NOTNULL(node->GetOpDesc()); output_list = node->GetOpDesc()->GetOutputOffset(); if (output_list.empty()) { - REPORT_INNER_ERROR("E19999", "check node:%s output_offset_list is empty", - node->GetName().c_str()); - GELOGE(PARAM_INVALID, "Output_list is empty"); + REPORT_INNER_ERROR("E19999", "check node:%s output_offset_list is empty", node->GetName().c_str()); + GELOGE(PARAM_INVALID, "[Check][Param] node:%s Output_list is empty", node->GetName().c_str()); return PARAM_INVALID; } GE_CHECK_NOTNULL(var_node->GetOpDesc()); @@ -133,7 +131,8 @@ Status VarMemAssignUtil::SetOutVariableAttr(const ge::NodePtr &node, const ge::N if (index >= out_list_size) { REPORT_INNER_ERROR("E19999", "param index:%d >= output_list.size() %d in node %s, check invalid", index, out_list_size, node->GetName().c_str()); - GELOGE(FAILED, "index %d >= output_list.size() %d", index, out_list_size); + GELOGE(FAILED, "[Check][Param] index %d >= output_list.size() %d in node %s", index, out_list_size, + node->GetName().c_str()); return FAILED; } @@ -169,7 +168,8 @@ Status VarMemAssignUtil::DealBroadCastNode(uint32_t graph_id, const ge::NodePtr broad_cast_info.broadcast_name = node->GetName(); auto op_desc = node->GetOpDesc(); - GE_CHK_BOOL_RET_STATUS(op_desc != nullptr, FAILED, "Get broadcast op %s desc is nullptr", node->GetName().c_str()); + GE_CHK_BOOL_RET_STATUS(op_desc != nullptr, FAILED, + "[Check][Param] Get broadcast op %s desc is nullptr", node->GetName().c_str()); GE_IF_BOOL_EXEC(broad_cast_info.idx < 0, GELOGI("Broadcast input index must be positive, actual %d", broad_cast_info.idx); @@ -180,8 +180,8 @@ Status VarMemAssignUtil::DealBroadCastNode(uint32_t graph_id, const ge::NodePtr if (input_tensor_desc_ptr_vistor.size() <= broad_cast_index) { REPORT_INNER_ERROR("E19999", "Get broadcast op %s input tensor desc size [%zu] < idx [%d]", node->GetName().c_str(), input_tensor_desc_ptr_vistor.size(), broad_cast_info.idx); - GELOGE(FAILED, "Get broadcast op %s input tensor desc size [%zu] < idx [%d]", node->GetName().c_str(), - input_tensor_desc_ptr_vistor.size(), broad_cast_info.idx); + GELOGE(FAILED, "[Check][Param] Get broadcast op %s input tensor desc size [%zu] < idx [%d]", + node->GetName().c_str(), input_tensor_desc_ptr_vistor.size(), broad_cast_info.idx); return FAILED; } const ge::GeTensorDescPtr input_tensor_desc = @@ -192,8 +192,8 @@ Status VarMemAssignUtil::DealBroadCastNode(uint32_t graph_id, const ge::NodePtr vector output_list = op_desc->GetOutputOffset(); GE_CHK_BOOL_RET_STATUS(output_list.size() > broad_cast_index, FAILED, - "Get broadcast op %s output_list size [%zu] < idx [%d]", node->GetName().c_str(), - output_list.size(), broad_cast_info.idx); + "[Check][Param] Get broadcast op %s output_list size [%zu] < idx [%d]", + node->GetName().c_str(), output_list.size(), broad_cast_info.idx); broad_cast_info.input_offset = output_list[broad_cast_info.idx]; broad_cast_info.output_offset = output_list[broad_cast_info.idx]; @@ -201,16 +201,16 @@ Status VarMemAssignUtil::DealBroadCastNode(uint32_t graph_id, const ge::NodePtr auto output_tensor_desc_ptr_vistor = op_desc->GetAllOutputsDescPtr(); GE_CHK_BOOL_RET_STATUS(output_tensor_desc_ptr_vistor.size() > broad_cast_index, FAILED, - "Get broadcast op %s output tensor desc size [%zu] < idx [%d]", node->GetName().c_str(), - output_tensor_desc_ptr_vistor.size(), broad_cast_info.idx); + "[Check][Param] Get broadcast op %s output tensor desc size [%zu] < idx [%d]", + node->GetName().c_str(), output_tensor_desc_ptr_vistor.size(), broad_cast_info.idx); const ge::GeTensorDescPtr output_tensor_desc = output_tensor_desc_ptr_vistor.at(static_cast(broad_cast_info.idx)); int64_t output_size = 0; - GE_CHK_STATUS(TensorUtils::GetSize(*output_tensor_desc, output_size), "get input size failed."); + GE_CHK_STATUS(TensorUtils::GetSize(*output_tensor_desc, output_size), "[Check][Param] get output size failed."); broad_cast_info.output_size = output_size; GE_CHK_BOOL_RET_STATUS(broad_cast_info.output_size == broad_cast_info.input_size, FAILED, - "Broadcast op input size[%lu] is not equal output size[%lu]", broad_cast_info.input_size, - broad_cast_info.output_size); + "[Check][Param] Broadcast op input size[%lu] is not equal output size[%lu]", + broad_cast_info.input_size, broad_cast_info.output_size); GE_CHK_STATUS_RET(VarManager::Instance(session_id)->SaveBroadCastInfo(graph_id, broad_cast_info)); return SUCCESS; @@ -298,7 +298,9 @@ Status VarMemAssignUtil::SetOutTransNodeToAssign(const ge::NodePtr &node, const vector output_list = node->GetOpDesc()->GetOutputOffset(); auto out_list_size = output_list.size(); GE_CHECK_SIZE(out_list_size); - GE_CHK_BOOL_RET_STATUS(index < out_list_size, FAILED, "index %zu >= output_list.size() %zu", index, out_list_size); + GE_CHK_BOOL_RET_STATUS(index < out_list_size, FAILED, + "[Check][Param] index %zu >= output_list.size() %zu, node:%s", + index, out_list_size, node->GetName().c_str()); // final_trans_node outputOffset[0] to assign_node outputOffset[0] GELOGI("final_trans_node outputOffset[0] is: %ld", final_trans_output_list[0]); @@ -372,7 +374,7 @@ Status VarMemAssignUtil::AssignData2VarRef(const ge::NodePtr &has_ref_attr_node, GE_CHECK_SIZE(ref_attr_node_output_list.size()); GE_CHK_BOOL_RET_STATUS(out_index < ref_attr_node_output_list.size(), FAILED, - "out_index %u >= ref_attr_node_output_list.size() %zu", out_index, + "[Check][Param] out_index %u >= ref_attr_node_output_list.size() %zu", out_index, ref_attr_node_output_list.size()); ref_attr_node_output_list[out_index] = static_cast(reinterpret_cast(dev_ptr)); diff --git a/ge/graph/build/model_builder.cc b/ge/graph/build/model_builder.cc index 5fdbfb31..0e625990 100755 --- a/ge/graph/build/model_builder.cc +++ b/ge/graph/build/model_builder.cc @@ -118,14 +118,16 @@ Status ModelBuilder::CalcOutputSize(const ge::NodePtr &n) { if (graph_status != GRAPH_SUCCESS) { REPORT_CALL_ERROR("E19999", "Get tensor size in bytes failed for op:%s(%s) index:%u", node_op_desc->GetName().c_str(), node_op_desc->GetType().c_str(), index); - GELOGE(graph_status, "GetTensorMemorySizeInBytes failed!"); + GELOGE(graph_status, "[Get][TensorMemorySize] In Bytes failed for op:%s(%s) index:%u", + node_op_desc->GetName().c_str(), node_op_desc->GetType().c_str(), index); return FAILED; } TensorUtils::SetSize(desc_temp, size_temp); if (node_op_desc->UpdateOutputDesc(index, desc_temp) != SUCCESS) { REPORT_CALL_ERROR("E19999", "Update Output desc size failed for op:%s(%s) index:%u", node_op_desc->GetName().c_str(), node_op_desc->GetType().c_str(), index); - GELOGE(FAILED, "UpdateOutputDesc failed."); + GELOGE(FAILED, "[Update][OutputDesc] failed for op:%s(%s) index:%u", + node_op_desc->GetName().c_str(), node_op_desc->GetType().c_str(), index); return FAILED; } @@ -212,14 +214,14 @@ Status ModelBuilder::AdjustConstWeightSize(const ge::NodePtr &node, size_t &mem_ if (weights.empty()) { REPORT_INNER_ERROR("E19999", "Check weights size of node %s(%s) is empty", node->GetName().c_str(), node->GetType().c_str()); - GELOGE(FAILED, "weights size of node %s is empty", node->GetName().c_str()); + GELOGE(FAILED, "[Check][Param] weights size of node %s is empty", node->GetName().c_str()); return FAILED; } GeTensorPtr weight = weights[0]; if (weight == nullptr) { REPORT_INNER_ERROR("E19999", "Check weight of node %s(%s) is nullptr", node->GetName().c_str(), node->GetType().c_str()); - GELOGE(FAILED, "weights[0] is null."); + GELOGE(FAILED, "[Check][Param] weights[0] is null, node:%s.", node->GetName().c_str()); return FAILED; } GeTensorDesc &tensor_desc = weight->MutableTensorDesc(); @@ -271,15 +273,16 @@ Status ModelBuilder::SetInputOutputDesc() { bool is_unknow = false; (void)NodeUtils::GetNodeUnknownShapeStatus(*n, is_unknow); if ((IsGeLocalOp(n->GetOpDesc())) && (!is_unknow)) { - GE_CHK_STATUS_RET(CalcOutputSize(n), "Calculate output size failed"); + GE_CHK_STATUS_RET(CalcOutputSize(n), "[Calc][OutputSize] failed, node:%s", n->GetName().c_str()); } ret = AdjustConstWeightSize(n, weight_offset_); - GE_CHK_STATUS_RET(ret, "AdjustConstWeightSize failed"); + GE_CHK_STATUS_RET(ret, "[Adjust][ConstWeightSize] failed, node:%s", n->GetName().c_str()); GE_IF_BOOL_EXEC(((weight_offset_ > 0) && (weight_offset_ % MEM_ALIGN_SIZE != 0)), weight_offset_ = (weight_offset_ + MEM_ALIGN_SIZE - 1) / MEM_ALIGN_SIZE * MEM_ALIGN_SIZE); } - GE_CHK_STATUS_RET(compute_graph_->TopologicalSorting(), "TopologicalSorting failed"); + GE_CHK_STATUS_RET(compute_graph_->TopologicalSorting(), "[Call][TopologicalSorting] failed, graph:%s", + compute_graph_->GetName().c_str()); return SUCCESS; } @@ -363,7 +366,8 @@ Status ModelBuilder::AdjustInputTensorFlag() { REPORT_CALL_ERROR("E19999", "Update Input desc size failed for op:%s(%s) index:%u", owner_node_op_desc->GetName().c_str(), owner_node_op_desc->GetType().c_str(), in_anchors->GetIdx()); - GELOGE(FAILED, "UpdateOutputDesc failed."); + GELOGE(FAILED, "[Update][InputDesc] failed for op:%s(%s) index:%u", + owner_node_op_desc->GetName().c_str(), owner_node_op_desc->GetType().c_str(), in_anchors->GetIdx()); return FAILED; } } @@ -391,61 +395,52 @@ Status ModelBuilder::BuildModelDef(ge::Model &model) { max_mem_offset_ = mem_type_to_mem_offset_[RT_MEMORY_HBM]; GE_CHK_BOOL_EXEC(ge::AttrUtils::SetInt(&model, ATTR_MODEL_MEMORY_SIZE, max_mem_offset_), - REPORT_INNER_ERROR("E19999", "Set Attr:%s in model failed", - ATTR_MODEL_MEMORY_SIZE.c_str()); - GELOGE(FAILED, "SetInt of ATTR_MODEL_MEMORY_SIZE failed."); + REPORT_INNER_ERROR("E19999", "Set Attr:%s in model failed", ATTR_MODEL_MEMORY_SIZE.c_str()); + GELOGE(FAILED, "[Set][Attr] %s in model failed", ATTR_MODEL_MEMORY_SIZE.c_str()); return FAILED); if (mem_type_to_mem_offset_.find(RT_MEMORY_P2P_DDR) != mem_type_to_mem_offset_.end()) { p2p_mem_offset_ = mem_type_to_mem_offset_[RT_MEMORY_P2P_DDR]; } GE_CHK_BOOL_EXEC(ge::AttrUtils::SetInt(&model, ATTR_MODEL_P2P_MEMORY_SIZE, p2p_mem_offset_), - REPORT_INNER_ERROR("E19999", "Set Attr:%s in model failed", - ATTR_MODEL_P2P_MEMORY_SIZE.c_str()); - GELOGE(FAILED, "SetInt of ATTR_MODEL_P2P_MEMORY_SIZE failed."); - return FAILED); + REPORT_INNER_ERROR("E19999", "Set Attr:%s in model failed", ATTR_MODEL_P2P_MEMORY_SIZE.c_str()); + GELOGE(FAILED, "[Set][Attr] %s in model failed", ATTR_MODEL_P2P_MEMORY_SIZE.c_str()); + return FAILED); GE_CHK_BOOL_EXEC(ge::AttrUtils::SetInt(&model, ATTR_MODEL_WEIGHT_SIZE, weight_offset_), - REPORT_INNER_ERROR("E19999", "Set Attr:%s in model failed", - ATTR_MODEL_WEIGHT_SIZE.c_str()); - GELOGE(FAILED, "SetInt of ATTR_MODEL_WEIGHT_SIZE failed."); + REPORT_INNER_ERROR("E19999", "Set Attr:%s in model failed", ATTR_MODEL_WEIGHT_SIZE.c_str()); + GELOGE(FAILED, "[Set][Attr] %s in model failed", ATTR_MODEL_WEIGHT_SIZE.c_str()); return FAILED); GE_CHK_BOOL_EXEC(ge::AttrUtils::SetInt(&model, ATTR_MODEL_STREAM_NUM, stream_num_), - REPORT_INNER_ERROR("E19999", "Set Attr:%s in model failed", - ATTR_MODEL_STREAM_NUM.c_str()); - GELOGE(FAILED, "SetInt of ATTR_MODEL_STREAM_NUM failed."); + REPORT_INNER_ERROR("E19999", "Set Attr:%s in model failed", ATTR_MODEL_STREAM_NUM.c_str()); + GELOGE(FAILED, "[Set][Attr] %s in model failed", ATTR_MODEL_STREAM_NUM.c_str()); return FAILED); GE_CHK_BOOL_EXEC(ge::AttrUtils::SetInt(&model, ATTR_MODEL_EVENT_NUM, event_num_), - REPORT_INNER_ERROR("E19999", "Set Attr:%s in model failed", - ATTR_MODEL_EVENT_NUM.c_str()); - GELOGE(FAILED, "SetInt of ATTR_MODEL_EVENT_NUM failed."); + REPORT_INNER_ERROR("E19999", "Set Attr:%s in model failed", ATTR_MODEL_EVENT_NUM.c_str()); + GELOGE(FAILED, "[Set][Attr] %s in model failed", ATTR_MODEL_EVENT_NUM.c_str()); return FAILED); GE_CHK_BOOL_EXEC(ge::AttrUtils::SetListInt(&model, ATTR_MODEL_HUGE_STREAM_LIST, huge_streams_), - REPORT_INNER_ERROR("E19999", "Set Attr:%s in model failed", - ATTR_MODEL_HUGE_STREAM_LIST.c_str()); - GELOGE(FAILED, "SetInt of ATTR_MODEL_HUGE_STREAM_LIST failed."); + REPORT_INNER_ERROR("E19999", "Set Attr:%s in model failed", ATTR_MODEL_HUGE_STREAM_LIST.c_str()); + GELOGE(FAILED, "[Set][Attr] %s in model failed", ATTR_MODEL_HUGE_STREAM_LIST.c_str()); return FAILED); GE_CHK_BOOL_EXEC(ge::AttrUtils::SetInt(&model, ATTR_MODEL_LABEL_NUM, label_num_), - REPORT_INNER_ERROR("E19999", "Set Attr:%s in model failed", - ATTR_MODEL_LABEL_NUM.c_str()); - GELOGE(FAILED, "SetInt of ATTR_MODEL_LABEL_NUM failed."); + REPORT_INNER_ERROR("E19999", "Set Attr:%s in model failed", ATTR_MODEL_LABEL_NUM.c_str()); + GELOGE(FAILED, "[Set][Attr] %s in model failed", ATTR_MODEL_LABEL_NUM.c_str()); return FAILED); GE_CHK_BOOL_EXEC(ge::AttrUtils::SetInt(&model, ATTR_MODEL_ZERO_COPY_MEMORY_SIZE, zero_copy_mem_size_), REPORT_INNER_ERROR("E19999", "Set Attr:%s in model failed", ATTR_MODEL_ZERO_COPY_MEMORY_SIZE.c_str()); - GELOGE(FAILED, "SetInt of ATTR_MODEL_ZERO_COPY_MEMORY_SIZE failed."); + GELOGE(FAILED, "[Set][Attr] %s in model failed.", ATTR_MODEL_ZERO_COPY_MEMORY_SIZE.c_str()); return FAILED); GE_CHK_BOOL_EXEC(ge::AttrUtils::SetListStr(&model, ATTR_MODEL_OUT_NODES_NAME, GetLocalOmgContext().net_out_nodes), - REPORT_INNER_ERROR("E19999", "Set Attr:%s in model failed", - ATTR_MODEL_OUT_NODES_NAME.c_str()); - GELOGE(FAILED, "SetListStr of ATTR_MODEL_OUT_NODES_NAME failed."); + REPORT_INNER_ERROR("E19999", "Set Attr:%s in model failed", ATTR_MODEL_OUT_NODES_NAME.c_str()); + GELOGE(FAILED, "[Set][Str] %s in model failed.", ATTR_MODEL_OUT_NODES_NAME.c_str()); return FAILED); GELOGI("For model, max_mem_offset_: %zu, p2p_mem_size: %zu, zero_copy_mem_size_: %zu", max_mem_offset_, p2p_mem_offset_, zero_copy_mem_size_); string fp_ceiling_mode; if (ge::GetContext().GetOption("ge.fpCeilingMode", fp_ceiling_mode) == SUCCESS) { if (!ge::AttrUtils::SetStr(&model, ATTR_FP_CEILING_MODE, fp_ceiling_mode)) { - REPORT_INNER_ERROR("E19999", "Set Attr:%s in model failed", - ATTR_FP_CEILING_MODE.c_str()); - GELOGE(FAILED, "Failed to set attr ATTR_FP_CEILING_MODE"); + REPORT_INNER_ERROR("E19999", "Set Attr:%s in model failed", ATTR_FP_CEILING_MODE.c_str()); + GELOGE(FAILED, "[Set][Str] %s in model failed", ATTR_FP_CEILING_MODE.c_str()); return FAILED; } GELOGI("Set attr ATTR_FP_CEILING_MODE to model, value is %s.", fp_ceiling_mode.c_str()); @@ -459,31 +454,27 @@ Status ModelBuilder::BuildModelDef(ge::Model &model) { int64_t core_type = (ge_core_type == kVectorCore) ? 1 : 0; GELOGI("core_type: %ld", core_type); if (!ge::AttrUtils::SetInt(&model, ATTR_MODEL_CORE_TYPE, core_type)) { - REPORT_INNER_ERROR("E19999", "Set Attr:%s in model failed", - ATTR_MODEL_CORE_TYPE.c_str()); - GELOGE(FAILED, "SetInt of ATTR_CORE_TYPE failed."); + REPORT_INNER_ERROR("E19999", "Set Attr:%s in model failed", ATTR_MODEL_CORE_TYPE.c_str()); + GELOGE(FAILED, "[Set][Attr] %s in model failed", ATTR_MODEL_CORE_TYPE.c_str()); } InitL1FusionOption(); GE_CHK_BOOL_EXEC(ge::AttrUtils::SetBool(&model, ATTR_NAME_SWITCH_FOR_L1_FUSION, is_l1_fusion_enable_), - REPORT_INNER_ERROR("E19999", "Set Attr:%s in model failed", - ATTR_NAME_SWITCH_FOR_L1_FUSION.c_str()); - GELOGE(FAILED, "SetBool of ATTR_NAME_SWITCH_FOR_L1_FUSION failed."); + REPORT_INNER_ERROR("E19999", "Set Attr:%s in model failed", ATTR_NAME_SWITCH_FOR_L1_FUSION.c_str()); + GELOGE(FAILED, "[Set][Attr] %s in model failed.", ATTR_NAME_SWITCH_FOR_L1_FUSION.c_str()); return FAILED); const DumpProperties &dump_properties = DumpManager::GetInstance().GetDumpProperties(session_id_); bool is_op_debug = dump_properties.IsOpDebugOpen(); if (is_op_debug) { if (!ge::AttrUtils::SetBool(&model, ATTR_OP_DEBUG_FLAG, is_op_debug)) { - REPORT_INNER_ERROR("E19999", "Set Attr:%s in model failed", - ATTR_OP_DEBUG_FLAG.c_str()); - GELOGE(FAILED, "SetBool of ATTR_OP_DEBUG_FLAG failed."); + REPORT_INNER_ERROR("E19999", "Set Attr:%s in model failed", ATTR_OP_DEBUG_FLAG.c_str()); + GELOGE(FAILED, "[Set][Attr] %s in model failed", ATTR_OP_DEBUG_FLAG.c_str()); return FAILED; } uint32_t op_debug_mode = dump_properties.GetOpDebugMode(); GELOGI("Get op debug mode:%d", op_debug_mode); if (!ge::AttrUtils::SetInt(&model, ATTR_OP_DEBUG_MODE, op_debug_mode)) { - REPORT_INNER_ERROR("E19999", "Set Attr:%s in model failed", - ATTR_OP_DEBUG_MODE.c_str()); - GELOGE(FAILED, "SetBool of ATTR_OP_DEBUG_MODE failed."); + REPORT_INNER_ERROR("E19999", "Set Attr:%s in model failed", ATTR_OP_DEBUG_MODE.c_str()); + GELOGE(FAILED, "[Set][Attr] %s in model failed", ATTR_OP_DEBUG_MODE.c_str()); return FAILED; } } @@ -556,7 +547,7 @@ Status ModelBuilder::MergeWeights() { if (weight == nullptr) { REPORT_INNER_ERROR("E19999", "Can't get const weight in op:%s(%s)", op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(FAILED, "Can't get const op weight, name: %s", node->GetName().c_str()); + GELOGE(FAILED, "[Call][MutableTensor] Can't get const op weight, name:%s", node->GetName().c_str()); return FAILED; } @@ -581,14 +572,15 @@ Status ModelBuilder::MergeWeights() { GE_IF_BOOL_EXEC(base_addr == nullptr, REPORT_INNER_ERROR("E19999", "Check weight in op:%s(%s) is nullptr", op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(FAILED, "Base addr is nullptr."); + GELOGE(FAILED, "[Check][Param] weight in op:%s(%s) is nullptr", + op_desc->GetName().c_str(), op_desc->GetType().c_str()); return FAILED); if (weight_offset_ - offset < weight_data.size()) { REPORT_INNER_ERROR("E19999", "left weight size not enough for op:%s(%s) left_size:%zu, weight_size:%zu", op_desc->GetName().c_str(), op_desc->GetType().c_str(), weight_offset_ - offset, weight_data.size()); - GELOGE(FAILED, "left weight size not enough. left_size:%lu, weight_size:%lu", - weight_offset_ - offset, weight_data.size()); + GELOGE(FAILED, "[Check][Param] left weight size not enough for op:%s(%s). left_size:%lu, weight_size:%lu", + op_desc->GetName().c_str(), op_desc->GetType().c_str(), weight_offset_ - offset, weight_data.size()); return FAILED; } uintptr_t dst_ptr = reinterpret_cast(base_addr) + offset; @@ -615,7 +607,7 @@ Status ModelBuilder::MergeWeights() { REPORT_CALL_ERROR("E19999", "mem copy failed. errret:%u, " "dst_ptr:%lx, dst_size:%lu, src_ptr:%lx, src_size:%lu,", err, dst_ptr, SECUREC_MEM_MAX_LEN, src_ptr, SECUREC_MEM_MAX_LEN); - GELOGE(FAILED, "mem copy failed. errret:%u, " + GELOGE(FAILED, "[Update][Data] mem copy failed. errret:%u, " "dst_ptr:%lx, dst_size:%lu, src_ptr:%lx, src_size:%lu", err, dst_ptr, SECUREC_MEM_MAX_LEN, src_ptr, SECUREC_MEM_MAX_LEN); return FAILED; @@ -714,9 +706,10 @@ Status ModelBuilder::SaveDataToModel(ge::Model &model, ge::GeModel &ge_model) { } GE_IF_BOOL_EXEC(tbe_kernel == nullptr, continue); if (tbe_name_set.count(tbe_kernel->GetName()) > 0) { - REPORT_INNER_ERROR("E19999", "tbe_kernel name %s can't be the same, judge for op:%s(%s),", + REPORT_INNER_ERROR("E19999", "tbe_kernel name %s can't be the same, judge for op:%s(%s)", tbe_kernel->GetName().c_str(), n->GetName().c_str(), n->GetType().c_str()); - GELOGE(FAILED, "tbe_kernel name %s can't be the same", tbe_kernel->GetName().c_str()); + GELOGE(FAILED, "[Check][Param] tbe_kernel name %s can't be the same, judge for op:%s(%s)", + tbe_kernel->GetName().c_str(), n->GetName().c_str(), n->GetType().c_str()); return FAILED; } tbe_name_set.insert(tbe_kernel->GetName()); @@ -734,9 +727,10 @@ Status ModelBuilder::SaveDataToModel(ge::Model &model, ge::GeModel &ge_model) { node_op_desc->TryGetExtAttr(ge::OP_EXTATTR_CUSTAICPU_KERNEL, CustAICPUKernelPtr()); GE_IF_BOOL_EXEC(cust_aicpu_kernel == nullptr, continue); if (aicpu_name_set.count(cust_aicpu_kernel->GetName()) > 0) { - REPORT_INNER_ERROR("E19999", "aicpu_kernel name %s can't be the same, judge for op:%s(%s),", + REPORT_INNER_ERROR("E19999", "aicpu_kernel name %s can't be the same, judge for op:%s(%s)", cust_aicpu_kernel->GetName().c_str(), n->GetName().c_str(), n->GetType().c_str()); - GELOGE(FAILED, "aicpu_kernel name %s can't be the same", cust_aicpu_kernel->GetName().c_str()); + GELOGE(FAILED, "[Check][Param] aicpu_kernel name %s can't be the same, judge for op:%s(%s)", + cust_aicpu_kernel->GetName().c_str(), n->GetName().c_str(), n->GetType().c_str()); return FAILED; } aicpu_name_set.insert(cust_aicpu_kernel->GetName()); @@ -745,11 +739,11 @@ Status ModelBuilder::SaveDataToModel(ge::Model &model, ge::GeModel &ge_model) { } if (!tbe_kernel_store_.Build()) { - GELOGE(FAILED, "TBE Kernels store build failed!"); + GELOGE(FAILED, "[Call][Build] TBE Kernels store build failed!"); return FAILED; } if (!cust_aicpu_kernel_store_.Build()) { - GELOGE(FAILED, "custom AICPU kernels store build failed!"); + GELOGE(FAILED, "[Call][Build] custom AICPU kernels store build failed!"); return FAILED; } ge_model.SetTBEKernelStore(tbe_kernel_store_); @@ -759,14 +753,14 @@ Status ModelBuilder::SaveDataToModel(ge::Model &model, ge::GeModel &ge_model) { GeAttrValue::BYTES task_def_bytes; if (!AttrUtils::GetZeroCopyBytes(model, MODEL_ATTR_TASKS, task_def_bytes)) { REPORT_CALL_ERROR("E19999", "Get attr:%s in model failed", MODEL_ATTR_TASKS.c_str()); - GELOGE(INTERNAL_ERROR, "Get zero copy bytes fail."); + GELOGE(INTERNAL_ERROR, "[Get][Attr] %s in model failed", MODEL_ATTR_TASKS.c_str()); return INTERNAL_ERROR; } int byte_size = static_cast(task_def_bytes.GetSize()); std::shared_ptr task = ge::MakeShared(); GE_CHECK_NOTNULL(task); GE_CHK_BOOL_EXEC(ReadProtoFromArray(task_def_bytes.GetData(), byte_size, task.get()), return INTERNAL_ERROR, - "ReadProtoFromArray failed."); + "[Read][Proto] From Array failed."); ge_model.SetModelTaskDef(task); // Add graph @@ -795,11 +789,12 @@ void ModelBuilder::SetModelVersion(ge::Model &model) { Status ModelBuilder::PreBuildModel() { if ((compute_graph_ == nullptr) || !(compute_graph_->IsValid())) { REPORT_INNER_ERROR("E19999", "Check compute_graph no valid"); - GELOGE(FAILED, "Graph_ is not valid."); + GELOGE(FAILED, "[Check][Param] Graph_ is not valid."); return FAILED; } - GE_CHK_STATUS_RET(SetInputOutputDesc(), "SetInputOutputDesc Failed!"); + GE_CHK_STATUS_RET(SetInputOutputDesc(), + "[Set][InputOutputDesc] Failed! graph:%s", compute_graph_->GetName().c_str()); AddNodeInputProperty(); @@ -807,14 +802,15 @@ Status ModelBuilder::PreBuildModel() { } Status ModelBuilder::BuildModelForGetTask(ge::Model &model) { - GE_CHK_STATUS_RET(AdjustInputTensorFlag(), "AdjustInputTensorFlag failed!"); + GE_CHK_STATUS_RET(AdjustInputTensorFlag(), "[Adjust][InputTensorFlag] failed! graph:%s", + compute_graph_->GetName().c_str()); ErrorManager::GetInstance().SetStage(error_message::kModelCompile, error_message::kStreamAlloc); // Assign logical streams. StreamAllocator stream_allocator(compute_graph_, subgraphs_); GE_TIMESTAMP_START(AssignLogicalStreams); GE_CHK_STATUS_RET(stream_allocator.AssignLogicalStreams(stream_max_parallel_num_, hcom_parallel_), - "Assign logical streams failed."); + "[Assign][LogicalStreams] failed. graph:%s", compute_graph_->GetName().c_str()); GE_TIMESTAMP_END(AssignLogicalStreams, "GraphBuilder::AssignLogicalStreams"); ErrorManager::GetInstance().SetStage(error_message::kModelCompile, error_message::kMemoryAlloc); @@ -825,34 +821,36 @@ Status ModelBuilder::BuildModelForGetTask(ge::Model &model) { GE_TIMESTAMP_START(AssignMemory); MemoryAssigner mem_assigner(compute_graph_); GE_CHK_STATUS_RET(mem_assigner.AssignMemory(is_loop_graph_, mem_type_to_mem_offset_, zero_copy_mem_size_), - "Assign Memory Failed!"); + "[Assign][Memory] Failed! graph:%s", compute_graph_->GetName().c_str()); GE_TIMESTAMP_END(AssignMemory, "GraphBuilder::AssignMemory"); ErrorManager::GetInstance().SetStage(error_message::kModelCompile, error_message::kOther); GE_TIMESTAMP_START(SetInputOutputOffset); SetInputOutputOffsetPass input_output_offset; - GE_CHK_STATUS_RET(input_output_offset.Run(compute_graph_), "Set input output offset failed."); + GE_CHK_STATUS_RET(input_output_offset.Run(compute_graph_), + "[Set][InputOutputOffset] failed. graph:%s", compute_graph_->GetName().c_str()); GE_TIMESTAMP_END(SetInputOutputOffset, "SetInputOutputOffsetPass::Run"); // Compile single op in graph build stage GE_TIMESTAMP_START(CompileSingleOp); - GE_CHK_STATUS_RET(CompileSingleOp(), "ATC builder CompileSingleOp() return fail."); + GE_CHK_STATUS_RET(CompileSingleOp(), "[Compile][SingleOp] fail. graph:%s", compute_graph_->GetName().c_str()); GE_TIMESTAMP_EVENT_END(CompileSingleOp, "GraphBuilder::CompileSingleOp"); ErrorManager::GetInstance().SetStage(error_message::kModelCompile, error_message::kStreamAlloc); // Refresh real streams and insert event nodes. GE_TIMESTAMP_START(RefreshRealStream); - GE_CHK_STATUS_RET(stream_allocator.RefreshRealStream(stream_num_, event_num_), "RefreshRealStream failed."); + GE_CHK_STATUS_RET(stream_allocator.RefreshRealStream(stream_num_, event_num_), + "[Refresh][RealStream] failed. graph:%s", compute_graph_->GetName().c_str()); huge_streams_ = stream_allocator.GetHugeStreams(); GE_TIMESTAMP_END(RefreshRealStream, "GraphBuilder::RefreshRealStream"); ErrorManager::GetInstance().SetStage(error_message::kModelCompile, error_message::kOther); GE_TIMESTAMP_START(MergeWeights); - GE_CHK_STATUS_RET(MergeWeights(), "MergeWeights Failed!"); + GE_CHK_STATUS_RET(MergeWeights(), "[Merge][Weights] Failed! graph:%s", compute_graph_->GetName().c_str()); GE_TIMESTAMP_END(MergeWeights, "GraphBuilder::MergeWeights"); GE_TIMESTAMP_START(BuildModelDef); - GE_CHK_STATUS_RET(BuildModelDef(model), "BuildModelDef failed!"); + GE_CHK_STATUS_RET(BuildModelDef(model), "[Build][ModelDef] failed! graph:%s", compute_graph_->GetName().c_str()); GE_TIMESTAMP_END(BuildModelDef, "GraphBuilder::BuildModelDef"); SetModelVersion(model); @@ -862,7 +860,7 @@ Status ModelBuilder::BuildModelForGetTask(ge::Model &model) { Status ModelBuilder::BuildModelForGetDynShapeTask(ge::Model &model_def) { GE_TIMESTAMP_START(BuildModelDef); - GE_CHK_STATUS_RET(BuildModelDef(model_def), "BuildModelDef failed!"); + GE_CHK_STATUS_RET(BuildModelDef(model_def), "[Build][ModelDef] failed!"); GE_TIMESTAMP_END(BuildModelDef, "GraphBuilder::BuildModelDef"); SetModelVersion(model_def); return SUCCESS; @@ -875,7 +873,7 @@ Status ModelBuilder::CompileSingleOp() { std::shared_ptr instance = ge::GELib::GetInstance(); if ((instance == nullptr) || !instance->InitFlag()) { REPORT_INNER_ERROR("E19999", "Check GELib instance not init before"); - GELOGE(ge::GE_CLI_GE_NOT_INITIALIZED, "CompileSingleOp failed."); + GELOGE(ge::GE_CLI_GE_NOT_INITIALIZED, "[Check][Param] CompileSingleOp failed."); return ge::GE_CLI_GE_NOT_INITIALIZED; } @@ -898,7 +896,7 @@ Status ModelBuilder::CompileSingleOp() { if (kernel_lib_name.empty()) { REPORT_INNER_ERROR("E19999", "Check kernel lib name empty of op:%s(%s)", node->GetName().c_str(), node->GetType().c_str()); - GELOGE(ge::INTERNAL_ERROR, "Get node:%s(%s) kernel lib failed.", node->GetName().c_str(), + GELOGE(ge::INTERNAL_ERROR, "[Get][Name] of node:%s(%s) kernel lib failed.", node->GetName().c_str(), node->GetType().c_str()); return ge::INTERNAL_ERROR; } @@ -910,7 +908,7 @@ Status ModelBuilder::CompileSingleOp() { } else { REPORT_INNER_ERROR("E19999", "Get ops kernel info store failed for op:%s(%s), op_kernel_name:%s,", node->GetName().c_str(), node->GetType().c_str(), kernel_lib_name.c_str()); - GELOGE(ge::GE_GRAPH_PARAM_NULLPTR, "Get op %s ops kernel info store failed", node->GetName().c_str()); + GELOGE(ge::GE_GRAPH_PARAM_NULLPTR, "[Get][OpsKernelInfoStore] for op %s failed", node->GetName().c_str()); return ge::GE_GRAPH_PARAM_NULLPTR; } } @@ -927,7 +925,7 @@ Status ModelBuilder::CompileSingleOp() { if (ret != ge::SUCCESS) { REPORT_CALL_ERROR("E19999", "Batch compile op failed, kernel lib name, node size:%zu,", node_vector.size()); - GELOGE(ret, "Compile op failed, kernel lib name is %s", kernel_lib_name.c_str()); + GELOGE(ret, "[Compile][Op] failed, kernel lib name is %s", kernel_lib_name.c_str()); return ret; } } @@ -975,10 +973,10 @@ void ModelBuilder::SetModelCheckAicpuAttr(ge::Model &model, std::setGetName().c_str(), aicpu_op_types.size(), aicpu_optype_list.size(), aicpu_tf_op_types.size(), aicpu_tf_optype_list.size()); GE_CHK_BOOL_EXEC(ge::AttrUtils::SetListStr(&model, "needCheckCpu", aicpu_optype_list), return, - "Set attr needCheckCpu fail."); + "[Set][Attr] needCheckCpu fail."); GE_CHK_BOOL_EXEC(ge::AttrUtils::SetListStr(&model, "needCheckTf", aicpu_tf_optype_list), return, - "Set attr needCheckTf fail."); + "[Set][Attr] needCheckTf fail."); return; } } // namespace ge diff --git a/ge/graph/build/run_context.cc b/ge/graph/build/run_context.cc index eca8b31b..05e40b63 100644 --- a/ge/graph/build/run_context.cc +++ b/ge/graph/build/run_context.cc @@ -29,13 +29,15 @@ Status RunContextUtil::InitMemInfo(uint8_t *data_mem_base, uint64_t data_mem_siz uint64_t weight_mem_size) { if ((data_mem_size > 0) && (data_mem_base == nullptr)) { REPORT_INNER_ERROR("E19999", "InitMemInfo param data_mem_base is null but data_mem_size = %lu", data_mem_size); - GELOGE(PARAM_INVALID, "InitMemInfo param data_mem_base is null but data_mem_size = %lu.", data_mem_size); + GELOGE(PARAM_INVALID, "[Check][Param] InitMemInfo param data_mem_base is null but data_mem_size = %lu.", + data_mem_size); return PARAM_INVALID; } if ((weight_mem_size > 0) && (weight_mem_base == nullptr)) { REPORT_INNER_ERROR("E19999", "InitMemInfo param weight_mem_base is null but weight_mem_size = %lu", weight_mem_size); - GELOGE(PARAM_INVALID, "InitMemInfo param weight_mem_base is null but weight_mem_size = %lu.", weight_mem_size); + GELOGE(PARAM_INVALID, "[Check][Param] InitMemInfo param weight_mem_base is null but weight_mem_size = %lu.", + weight_mem_size); return PARAM_INVALID; } if (mem_type_to_data_mem_base.empty() || mem_type_to_data_mem_size.empty() || @@ -44,9 +46,8 @@ Status RunContextUtil::InitMemInfo(uint8_t *data_mem_base, uint64_t data_mem_siz "is not equal to the size of mem_type_to_data_mem_size[%zu].", mem_type_to_data_mem_base.size(), mem_type_to_data_mem_size.size()); GELOGE(PARAM_INVALID, - "InitMemInfo param mem_type_to_data_mem_base size[%zu] is not equal to the size of " - "mem_type_to_data_mem_size[%zu].", - mem_type_to_data_mem_base.size(), mem_type_to_data_mem_size.size()); + "[Check][Param] InitMemInfo param mem_type_to_data_mem_base size[%zu] is not equal to the size of " + "mem_type_to_data_mem_size[%zu].", mem_type_to_data_mem_base.size(), mem_type_to_data_mem_size.size()); return PARAM_INVALID; } data_mem_base_ = data_mem_base; @@ -63,7 +64,7 @@ Status RunContextUtil::CreateRtModelResources(uint32_t stream_num, uint32_t even rtError_t rt_ret = rtModelCreate(&rt_model_, 0); if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "call rtModelCreate failed, ret:%d,", static_cast(rt_ret)); - GELOGE(RT_FAILED, "rtModelCreate failed. rt_ret = %d", static_cast(rt_ret)); + GELOGE(RT_FAILED, "[Call][RtModelCreate] failed. rt_ret = %d", static_cast(rt_ret)); return RT_FAILED; } @@ -74,7 +75,7 @@ Status RunContextUtil::CreateRtModelResources(uint32_t stream_num, uint32_t even if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "call rtStreamCreate failed, ret:%d, index:%u,", static_cast(rt_ret), i); - GELOGE(RT_FAILED, "rtStreamCreate failed. rt_ret = %d, index = %u", static_cast(rt_ret), i); + GELOGE(RT_FAILED, "[Call][RtStreamCreate] failed. rt_ret = %d, index = %u", static_cast(rt_ret), i); return RT_FAILED; } stream_list_.emplace_back(stream); @@ -83,7 +84,7 @@ Status RunContextUtil::CreateRtModelResources(uint32_t stream_num, uint32_t even if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "call rtModelBindStream failed, ret:%d, index:%u,", static_cast(rt_ret), i); - GELOGE(RT_FAILED, "Bind stream and model failed. rt_ret = %d, index = %u", static_cast(rt_ret), i); + GELOGE(RT_FAILED, "[Bind][StreamAndModel] failed. rt_ret = %d, index = %u", static_cast(rt_ret), i); return RT_FAILED; } } @@ -97,7 +98,7 @@ Status RunContextUtil::CreateRtModelResources(uint32_t stream_num, uint32_t even if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "call rtEventCreate failed, ret:%d, index:%u,", static_cast(rt_ret), i); - GELOGE(RT_FAILED, "rtEventCreate failed. rt_ret = %d, index = %u", static_cast(rt_ret), i); + GELOGE(RT_FAILED, "[Call][RtEventCreate] failed. rt_ret = %d, index = %u", static_cast(rt_ret), i); return RT_FAILED; } event_list_.emplace_back(event); @@ -110,7 +111,7 @@ Status RunContextUtil::CreateRtModelResources(uint32_t stream_num, uint32_t even if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "call rtLabelCreateV2 failed, ret:%d, index:%u,", static_cast(rt_ret), i); - GELOGE(RT_FAILED, "rtLabelCreate failed. rt_ret = %d, index = %u", static_cast(rt_ret), i); + GELOGE(RT_FAILED, "[Call][RtLabelCreate] failed. rt_ret = %d, index = %u", static_cast(rt_ret), i); return RT_FAILED; } label_list_.emplace_back(label); @@ -162,40 +163,43 @@ Status RunContextUtil::CreateRunContext(Model &model, const ComputeGraphPtr &gra // check params if (graph == nullptr) { REPORT_INNER_ERROR("E19999", "Check param graph nullptr, session_id:%lu,", session_id); - GELOGE(PARAM_INVALID, "CreateRunContext param graph is null. session_id=%lu", session_id); + GELOGE(PARAM_INVALID, "[Check][Param] CreateRunContext param graph is null. session_id=%lu", session_id); return PARAM_INVALID; } uint32_t stream_num = 0; if (!AttrUtils::GetInt(&model, ATTR_MODEL_STREAM_NUM, stream_num)) { - REPORT_INNER_ERROR("E19999", "Get Attr:%s failed for model, session_id:%lu,", + REPORT_INNER_ERROR("E19999", "Get Attr:%s failed from model, session_id:%lu,", ATTR_MODEL_STREAM_NUM.c_str(), session_id); - GELOGE(INTERNAL_ERROR, "Get stream_num attr from model_def failed. session_id=%lu", session_id); + GELOGE(INTERNAL_ERROR, "[Get][Attr] %s failed from model. session_id=%lu", + ATTR_MODEL_STREAM_NUM.c_str(), session_id); return INTERNAL_ERROR; } GELOGD("Stream_num = %u", stream_num); uint32_t event_num = 0; if (!AttrUtils::GetInt(&model, ATTR_MODEL_EVENT_NUM, event_num)) { - REPORT_INNER_ERROR("E19999", "Get Attr:%s failed for model, session_id:%lu,", + REPORT_INNER_ERROR("E19999", "Get Attr:%s failed from model, session_id:%lu,", ATTR_MODEL_EVENT_NUM.c_str(), session_id); - GELOGE(INTERNAL_ERROR, "Get event_num attr from model failed. session_id=%lu", session_id); + GELOGE(INTERNAL_ERROR, "[Get][Attr] %s failed from model, session_id:%lu,", + ATTR_MODEL_EVENT_NUM.c_str(), session_id); return INTERNAL_ERROR; } GELOGD("Event_num = %u", event_num); uint32_t label_num = 0; if (!AttrUtils::GetInt(&model, ATTR_MODEL_LABEL_NUM, label_num)) { - REPORT_INNER_ERROR("E19999", "Get Attr:%s failed for model, session_id:%lu,", + REPORT_INNER_ERROR("E19999", "Get Attr:%s failed from model, session_id:%lu,", ATTR_MODEL_LABEL_NUM.c_str(), session_id); - GELOGE(INTERNAL_ERROR, "Get label_num attr from model failed. session_id=%lu", session_id); + GELOGE(INTERNAL_ERROR, "[Get][Attr] %s failed from model, session_id:%lu,", + ATTR_MODEL_LABEL_NUM.c_str(), session_id); return INTERNAL_ERROR; } GELOGD("Label_num = %u", label_num); Status ret = CreateRtModelResources(stream_num, event_num, label_num); if (ret != SUCCESS) { - GELOGE(ret, "CreateRtModelResources failed. session_id=%lu", session_id); + GELOGE(ret, "[Create][RtModelResources] failed. session_id=%lu", session_id); DestroyRtModelResources(); return ret; } diff --git a/ge/graph/build/stream_allocator.cc b/ge/graph/build/stream_allocator.cc index 8218588f..0e1a1aba 100644 --- a/ge/graph/build/stream_allocator.cc +++ b/ge/graph/build/stream_allocator.cc @@ -176,8 +176,8 @@ Status StreamAllocator::AssignLogicalStreams(const std::map &m auto gelib = GELib::GetInstance(); if (gelib == nullptr) { - REPORT_INNER_ERROR("E19999", "Check GELib instance nullptr"); - GELOGE(FAILED, "Get GELib instance failed."); + REPORT_INNER_ERROR("E19999", "Check GELib instance nullptr, graph:%s", whole_graph_->GetName().c_str()); + GELOGE(FAILED, "[Get][Instance] of GELib failed. graph:%s", whole_graph_->GetName().c_str()); return FAILED; } @@ -188,7 +188,7 @@ Status StreamAllocator::AssignLogicalStreams(const std::map &m Status status = logical_allocator.Assign(whole_graph_, subgraphs_, stream_num_); if (status != SUCCESS) { - GELOGE(status, "Assign logical streams failed."); + GELOGE(status, "[Assign][LogicalStreams] failed. graph:%s", whole_graph_->GetName().c_str()); return status; } GE_DUMP(whole_graph_, "AfterAssignedLogicalStreams"); @@ -203,62 +203,62 @@ Status StreamAllocator::RefreshRealStream(int64_t &stream_num, int64_t &event_nu Status status = AssignSingleStream(); if (status != SUCCESS) { - GELOGE(status, "AssignSingleStream failed!"); + GELOGE(status, "[Assign][SingleStream] failed! graph:%s", whole_graph_->GetName().c_str()); return status; } status = SetActiveStreamsByLabel(); if (status != SUCCESS) { - GELOGE(status, "SetActiveStreamsByLabel failed!"); + GELOGE(status, "[Set][ActiveStreams] By Label failed! graph:%s", whole_graph_->GetName().c_str()); return status; } status = SetActiveStreamsForSubgraphs(); if (status != SUCCESS) { - GELOGE(status, "SetActiveStreamsForSubgraphs failed."); + GELOGE(status, "[Set][ActiveStreams] For Subgraphs failed. graph:%s", whole_graph_->GetName().c_str()); return status; } status = InsertSyncEvents(); if (status != SUCCESS) { - GELOGE(status, "InsertSyncEventId failed!"); + GELOGE(status, "[Insert][SyncEventId] failed! graph:%s", whole_graph_->GetName().c_str()); return status; } status = OptimizeSyncEvents(); if (status != SUCCESS) { - GELOGE(status, "OptimizeSyncEventId failed!"); + GELOGE(status, "[Optimize][SyncEventId] failed! graph:%s", whole_graph_->GetName().c_str()); return status; } vector> split_streams(stream_num_); status = SplitStreams(split_streams); if (status != SUCCESS) { - GELOGE(status, "SplitStreams failed!"); + GELOGE(status, "[Split][Streams] failed! graph:%s", whole_graph_->GetName().c_str()); return status; } status = UpdateActiveStreams(split_streams); if (status != SUCCESS) { - GELOGE(status, "UpdateActiveStreams failed!"); + GELOGE(status, "[Update][ActiveStreams] failed! graph:%s", whole_graph_->GetName().c_str()); return status; } status = RefreshContinuousEvents(); if (status != SUCCESS) { - GELOGE(status, "RefreshContinuousEvents failed!"); + GELOGE(status, "[Refresh][ContinuousEvents] failed! graph:%s", whole_graph_->GetName().c_str()); return status; } status = RefreshEventsWithReuse(); if (status != SUCCESS) { - GELOGE(status, "[Refresh][Events]RefreshEventsWithReuse failed!"); + GELOGE(status, "[Refresh][Events] With Reuse failed! graph:%s", whole_graph_->GetName().c_str()); return status; } status = InsertSyncEventNodes(); if (status != SUCCESS) { - GELOGE(status, "InsertSyncEventNode failed!"); + GELOGE(status, "[Insert][SyncEventNode] failed! graph:%s", whole_graph_->GetName().c_str()); return status; } @@ -293,7 +293,7 @@ Status StreamAllocator::AssignSingleStream() { if (stream_num_ > 1) { REPORT_INNER_ERROR("E19999", "The number of ts streams is %ld, only one is supported", stream_num_); - GELOGE(FAILED, "The number of ts streams is %ld, only one is supported.", stream_num_); + GELOGE(FAILED, "[Check][Param] The number of ts streams is %ld, only one is supported.", stream_num_); return FAILED; } @@ -311,7 +311,7 @@ Status StreamAllocator::AssignSingleStream() { uint32_t max_normal_task_count = 0; Status status = GetMaxStreamAndTask(false, max_normal_stream_count, max_normal_task_count); if (status != SUCCESS) { - GELOGE(status, "Get max task count of normal stream failed."); + GELOGE(status, "[Get][MaxCount] of normal stream and task failed. graph:%s", whole_graph_->GetName().c_str()); return status; } @@ -369,7 +369,8 @@ Status StreamAllocator::SetActiveStreamsByLabel() { REPORT_INNER_ERROR("E19999", "Set Attr:%s for op:%s(%s) failed", ATTR_NAME_ACTIVE_STREAM_LIST.c_str(), node->GetName().c_str(), node->GetType().c_str()); - GELOGE(FAILED, "SetListInt failed."); + GELOGE(FAILED, "[Set][Attr] %s for op:%s(%s) failed", + ATTR_NAME_ACTIVE_STREAM_LIST.c_str(), node->GetName().c_str(), node->GetType().c_str()); return FAILED); } @@ -422,7 +423,7 @@ Status StreamAllocator::SetActiveStreamsForSubgraphs() { REPORT_INNER_ERROR("E19999", "Set Attr:%s for op:%s(%s) failed", ATTR_NAME_ACTIVE_STREAM_LIST.c_str(), first_active_node->GetName().c_str(), first_active_node->GetType().c_str()); - GELOGE(FAILED, "Set active streams for node %s failed.", first_active_node->GetName().c_str()); + GELOGE(FAILED, "[Set][Attr] active streams for node %s failed.", first_active_node->GetName().c_str()); return FAILED; } } @@ -438,7 +439,7 @@ Status StreamAllocator::InsertSyncEvents() { NodePtr next_node = peer_in_anchor->GetOwnerNode(); Status status = InsertOneEventInTwoNodes(cur_node, next_node); if (status != SUCCESS) { - GELOGE(status, "InsertOneEventInTwoNodes failed!"); + GELOGE(status, "[Insert][OneEvent] In Two Nodes failed! cur node:%s", cur_node->GetName().c_str()); return status; } } @@ -451,7 +452,7 @@ Status StreamAllocator::InsertSyncEvents() { NodePtr next_node = peer_in_anchor->GetOwnerNode(); Status status = InsertOneEventInTwoNodes(cur_node, next_node); if (status != SUCCESS) { - GELOGE(status, "InsertOneEventInTwoNodes failed!"); + GELOGE(status, "[Insert][OneEvent] In Two Nodes failed! cur node:%s", cur_node->GetName().c_str()); return status; } } @@ -460,7 +461,8 @@ Status StreamAllocator::InsertSyncEvents() { Status status = InsertEventsForSubgraph(); if (status != SUCCESS) { - GELOGE(status, "InsertEventsBetweenSubAndParentGraphNodes failed!"); + GELOGE(status, "[Insert][Events] Between Sub And Parent GraphNodes failed! graph:%s", + whole_graph_->GetName().c_str()); return status; } @@ -493,7 +495,8 @@ Status StreamAllocator::InsertOneEventInTwoNodes(const NodePtr &cur_node, const if (next_stream_id == kInvalidStream) { REPORT_INNER_ERROR("E19999", "Stream id of next_node %s(%s) should not be %ld", next_node->GetName().c_str(), next_node->GetType().c_str(), kInvalidStream); - GELOGE(FAILED, "Stream id of next_node %s should not be %ld", next_node->GetName().c_str(), kInvalidStream); + GELOGE(FAILED, "[Check][Param] Stream id of next_node %s should not be %ld", + next_node->GetName().c_str(), kInvalidStream); return FAILED; } @@ -542,7 +545,7 @@ Status StreamAllocator::InsertEventsForSubgraph() { for (const auto &next_node : parent_node->GetOutAllNodes()) { Status status = InsertOneEventInTwoNodes(node, next_node); if (status != SUCCESS) { - GELOGE(status, "InsertOneEventInTwoNodes failed!"); + GELOGE(status, "[Insert][OneEvent] In Two Nodes failed! node:%s", node->GetName().c_str()); return status; } } @@ -566,19 +569,19 @@ Status StreamAllocator::OptimizeSyncEvents() { Status status = OptimizeBySendEvents(stream_nodes); if (status != SUCCESS) { - GELOGE(status, "OptimizeBySendEvents failed!"); + GELOGE(status, "[Optimize][StreamNodes] By Send Events failed! graph:%s", whole_graph_->GetName().c_str()); return status; } status = OptimizeByRecvEvents(stream_nodes); if (status != SUCCESS) { - GELOGE(status, "OptimizeByRecvEvents failed!"); + GELOGE(status, "[Optimize][StreamNodes] By Recv Events failed! graph:%s", whole_graph_->GetName().c_str()); return status; } status = OptimizeByStreamActivate(); if (status != SUCCESS) { - GELOGE(status, "OptimizeByStreamActivate failed!"); + GELOGE(status, "[Call][OptimizeByStreamActivate] failed! graph:%s", whole_graph_->GetName().c_str()); return status; } for (auto pair : node_to_send_events_) { @@ -708,11 +711,11 @@ Status StreamAllocator::OptimizeByStreamActivate() { bool StreamAllocator::IsRecvNodeActivatedBySendNode(const NodePtr &send_node_ptr, const NodePtr &recv_node_ptr) const { GE_CHECK_NOTNULL_EXEC(send_node_ptr->GetOpDesc(), REPORT_INNER_ERROR("E19999", "Check param send_node_ptr nullptr"); - GELOGE(FAILED, "op desc is nullptr"); + GELOGE(FAILED, "[Check][Param] op desc is nullptr"); return false); GE_CHECK_NOTNULL_EXEC(recv_node_ptr->GetOpDesc(), REPORT_INNER_ERROR("E19999", "Check param recv_node_ptr nullptr"); - GELOGE(FAILED, "op desc is nullptr"); + GELOGE(FAILED, "[Check][Param] op desc is nullptr"); return false); auto cur_stream_id = send_node_ptr->GetOpDesc()->GetStreamId(); if (AttrUtils::HasAttr(recv_node_ptr->GetOpDesc(), ATTR_NAME_STREAM_LABEL)) { @@ -826,7 +829,7 @@ Status StreamAllocator::SplitStreams(vector> &split_streams) { uint32_t max_stream_count = 0; uint32_t max_task_count = 0; GE_CHK_STATUS_RET(GetMaxStreamAndTask(false, max_stream_count, max_task_count), - "Get max stream and task count failed."); + "[Get][MaxCount] of stream and task failed."); for (const auto &cur_node : whole_graph_->GetNodes(whole_graph_->GetGraphUnknownFlag())) { GE_CHECK_NOTNULL(cur_node); @@ -839,7 +842,7 @@ Status StreamAllocator::SplitStreams(vector> &split_streams) { if (stream_id > last_stream_id) { REPORT_INNER_ERROR("E19999", "streamid(%ld) > last_stream_id(%ld), check invalid", stream_id, last_stream_id); - GELOGE(FAILED, "SplitStreams:streamid(%ld) > last_stream_id(%ld)", stream_id, last_stream_id); + GELOGE(FAILED, "[Check][Param] SplitStreams:streamid(%ld) > last_stream_id(%ld)", stream_id, last_stream_id); return FAILED; } bool is_stream_first_node = (stream_node_num_vec[stream_id] == 0); @@ -854,7 +857,7 @@ Status StreamAllocator::SplitStreams(vector> &split_streams) { if (stream_continuous_2_node_num_map[continuous_stream_label] > max_node_num_one_stream) { REPORT_INNER_ERROR("E19999", "Check node[%s] stream_id[%ld] continuous stream label[%s] unsatisfied", op_desc->GetName().c_str(), stream_id, continuous_stream_label.c_str()); - GELOGE(FAILED, "SplitStreams:node[%s] stream_id[%ld] continuous stream label[%s] unsatisfied ", + GELOGE(FAILED, "[Check][Param] SplitStreams:node[%s] stream_id[%ld] continuous stream label[%s] unsatisfied ", op_desc->GetName().c_str(), stream_id, continuous_stream_label.c_str()); return FAILED; } @@ -877,7 +880,8 @@ Status StreamAllocator::SplitStreams(vector> &split_streams) { if (HasContinuousStreamLabel(op_desc, cur_continuous_stream_label)) { // get stored nodes auto nodes = stream_continuous_2_nodes_map[cur_continuous_stream_label]; - GE_RETURN_WITH_LOG_IF_FALSE(!nodes.empty(), "split stream with continuous stream label %s failed", + GE_RETURN_WITH_LOG_IF_FALSE(!nodes.empty(), + "[Check][Param] split stream with continuous stream label %s failed", cur_continuous_stream_label.c_str()); for (const auto &node : nodes) { auto stored_op_desc = node->GetOpDesc(); @@ -893,7 +897,7 @@ Status StreamAllocator::SplitStreams(vector> &split_streams) { auto iter = std::find(stream_2_nodes_map[stream_id].begin(), stream_2_nodes_map[stream_id].end(), not_cur); GE_RETURN_WITH_LOG_IF_FALSE( (iter != stream_2_nodes_map[stream_id].end()) && (iter != stream_2_nodes_map[stream_id].begin()), - "split stream with continuous stream label %s failed", cur_continuous_stream_label.c_str()); + "[Check][Param] split stream with continuous stream label %s failed", cur_continuous_stream_label.c_str()); iter--; pre_node = *iter; } @@ -905,7 +909,9 @@ Status StreamAllocator::SplitStreams(vector> &split_streams) { // Add the send/recv event to the first and last nodes of the split stream. if (pre_node != nullptr) { - GE_CHK_STATUS_RET(AddEventId(pre_node, not_cur, cur_node, not_use_cur), "AddEventId failed."); + GE_CHK_STATUS_RET(AddEventId(pre_node, not_cur, cur_node, not_use_cur), + "[Add][EventId] failed, pre node:%s, not cur node:%s, cur node:%s.", + pre_node->GetName().c_str(), not_cur->GetName().c_str(), cur_node->GetName().c_str()); } } @@ -943,12 +949,12 @@ Status StreamAllocator::UpdateActiveStreams(const vector> &split_st for (auto &node : whole_graph_->GetNodes(whole_graph_->GetGraphUnknownFlag())) { if ((node->GetType() == STREAMSWITCH) || (node->GetType() == STREAMSWITCHN)) { if (UpdateActiveStreamsForSwitchNode(node) != SUCCESS) { - GELOGE(FAILED, "Update active streams for switch node: %s failed.", node->GetName().c_str()); + GELOGE(FAILED, "[Update][ActiveStreams] for switch node: %s failed.", node->GetName().c_str()); return FAILED; } } else { if (UpdateActiveStreamsForActiveNode(split_streams, node) != SUCCESS) { - GELOGE(FAILED, "Update active streams for active node: %s failed.", node->GetName().c_str()); + GELOGE(FAILED, "[Update][ActiveStreams] for active node: %s failed.", node->GetName().c_str()); return FAILED; } } @@ -956,13 +962,13 @@ Status StreamAllocator::UpdateActiveStreams(const vector> &split_st Status status = UpdateActiveStreamsForSubgraphs(); if (status != SUCCESS) { - GELOGE(status, "Update active streams for subgraphs failed!"); + GELOGE(status, "[Update][ActiveStreams] for subgraphs failed! graph:%s", whole_graph_->GetName().c_str()); return status; } status = SetActiveStreamsForLoop(); if (status != SUCCESS) { - GELOGE(status, "SetActiveStreamsForLoop failed!"); + GELOGE(status, "[Set][ActiveStreams] For Loop failed! graph:%s", whole_graph_->GetName().c_str()); return status; } @@ -990,7 +996,7 @@ void StreamAllocator::UpdateLabelStreams(const vector> &split_strea Status StreamAllocator::UpdateActiveStreamsForSwitchNode(NodePtr &switch_node) { vector active_nodes; if (InsertActiveNodesAfterSwitch(switch_node, active_nodes) != SUCCESS) { - GELOGE(FAILED, "Insert active nodes after node %s failed.", switch_node->GetName().c_str()); + GELOGE(FAILED, "[Insert][ActiveNodes] after node %s failed.", switch_node->GetName().c_str()); return FAILED; } if (active_nodes.empty()) { @@ -1010,7 +1016,8 @@ Status StreamAllocator::UpdateActiveStreamsForSwitchNode(NodePtr &switch_node) { if (!AttrUtils::SetListInt(op_desc, ATTR_NAME_ACTIVE_STREAM_LIST, stream_ids)) { REPORT_INNER_ERROR("E19999", "Set Attr:%s fail for op:%s(%s)", ATTR_NAME_ACTIVE_STREAM_LIST.c_str(), op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(FAILED, "SetListInt failed."); + GELOGE(FAILED, "[Set][Attr] %s fail for op:%s(%s)", ATTR_NAME_ACTIVE_STREAM_LIST.c_str(), + op_desc->GetName().c_str(), op_desc->GetType().c_str()); return FAILED; } @@ -1024,21 +1031,21 @@ Status StreamAllocator::InsertActiveNodesAfterSwitch(NodePtr &switch_node, vecto vector ori_active_label_list; if (!AttrUtils::GetListStr(switch_desc, ATTR_NAME_ACTIVE_LABEL_LIST, ori_active_label_list) || ori_active_label_list.empty()) { - REPORT_INNER_ERROR("E19999", "Get Attr:%s fail for op:%s(%s)", ATTR_NAME_ACTIVE_LABEL_LIST.c_str(), + REPORT_INNER_ERROR("E19999", "Get Attr:%s fail from op:%s(%s)", ATTR_NAME_ACTIVE_LABEL_LIST.c_str(), switch_node->GetName().c_str(), switch_node->GetType().c_str()); - GELOGE(INTERNAL_ERROR, "Get active label list of switch %s failed.", switch_node->GetName().c_str()); + GELOGE(INTERNAL_ERROR, "[Get][Attr] active label list of switch %s failed.", switch_node->GetName().c_str()); return INTERNAL_ERROR; } vector active_label_list; vector added_active_nodes; if (AddActiveNodes(switch_node, ori_active_label_list, active_label_list, added_active_nodes) != SUCCESS) { - GELOGE(FAILED, "Add active nodes after node %s failed.", switch_node->GetName().c_str()); + GELOGE(FAILED, "[Add][ActiveNodes] after node %s failed.", switch_node->GetName().c_str()); return FAILED; } if (SetActiveLabelList(switch_node, active_label_list) != SUCCESS) { - GELOGE(FAILED, "set active label list failed"); + GELOGE(FAILED, "[Set][ActiveLabelList] failed, node:%s", switch_node->GetName().c_str()); return FAILED; } @@ -1051,7 +1058,8 @@ Status StreamAllocator::InsertActiveNodesAfterSwitch(NodePtr &switch_node, vecto if (switch_node->GetOutControlAnchor()->LinkTo(active_node->GetInControlAnchor()) != GRAPH_SUCCESS) { REPORT_CALL_ERROR("E19999", "Link from %s to %s failed", switch_node->GetName().c_str(), active_node->GetName().c_str()); - GELOGE(FAILED, "Link %s to %s failed.", switch_node->GetName().c_str(), active_node->GetName().c_str()); + GELOGE(FAILED, "[Link][Nodes] from %s to %s failed.", + switch_node->GetName().c_str(), active_node->GetName().c_str()); return FAILED; } active_nodes.emplace_back(active_node); @@ -1068,7 +1076,8 @@ Status StreamAllocator::UpdateActiveStreamsForActiveNode(const vector(logical_stream) >= split_streams.size()) { REPORT_INNER_ERROR("E19999", "Check logical stream:%u is out of range:%zu", logical_stream, split_streams.size()); - GELOGE(FAILED, "logical stream is out of range."); + GELOGE(FAILED, "[Check][Param] logical stream:%u is out of range(0, %zu).", + logical_stream, split_streams.size()); return FAILED; } const set &new_split_streams = split_streams[logical_stream]; @@ -1088,7 +1097,7 @@ Status StreamAllocator::UpdateActiveStreamsForActiveNode(const vectorGetOpDesc(), ATTR_NAME_ACTIVE_STREAM_LIST, new_active_streams)) { REPORT_INNER_ERROR("E19999", "Set Attr:%s fail for op:%s(%s)", ATTR_NAME_ACTIVE_STREAM_LIST.c_str(), node->GetName().c_str(), node->GetType().c_str()); - GELOGE(FAILED, "Set active streams for node %s failed.", node->GetName().c_str()); + GELOGE(FAILED, "[Set][Attr] active streams for node %s failed.", node->GetName().c_str()); return FAILED; } } @@ -1130,7 +1139,7 @@ Status StreamAllocator::UpdateActiveStreamsForSubgraphs() const { if (!AttrUtils::SetListInt(active_op, ATTR_NAME_ACTIVE_STREAM_LIST, active_streams)) { REPORT_INNER_ERROR("E19999", "Set Attr:%s fail for op:%s(%s)", ATTR_NAME_ACTIVE_STREAM_LIST.c_str(), active_op->GetName().c_str(), active_op->GetType().c_str()); - GELOGE(FAILED, "Set active streams for node %s failed.", active_node->GetName().c_str()); + GELOGE(FAILED, "[Set][Attr] active streams for node %s failed.", active_node->GetName().c_str()); return FAILED; } } @@ -1200,7 +1209,7 @@ Status StreamAllocator::SetActiveStreamsForLoop() { if (pre_switch_node == nullptr) { REPORT_INNER_ERROR("E19999", "Find switch node before loop active node %s fail", node->GetName().c_str()); - GELOGE(FAILED, "find switch node before loop active node %s failed", node->GetName().c_str()); + GELOGE(FAILED, "[Find][SwitchNode] before loop active node %s failed", node->GetName().c_str()); return FAILED; } @@ -1210,7 +1219,8 @@ Status StreamAllocator::SetActiveStreamsForLoop() { REPORT_INNER_ERROR("E19999", "Set Attr:%s fail for op:%s(%s)", ATTR_NAME_ACTIVE_STREAM_LIST.c_str(), node->GetName().c_str(), node->GetType().c_str()); - GELOGE(FAILED, "SetListInt failed."); + GELOGE(FAILED, "[Set][Attr] %s fail for op:%s(%s)", ATTR_NAME_ACTIVE_STREAM_LIST.c_str(), + node->GetName().c_str(), node->GetType().c_str()); return FAILED); for (const auto &stream_id : loop_active_streams) { GELOGI("Active stream %u for node: %s.", stream_id, node->GetName().c_str()); @@ -1258,7 +1268,7 @@ Status StreamAllocator::CheckStreamActived() const { if (iter != active_streams.end()) { REPORT_INNER_ERROR("E19999", "Node:%s(%s) cannot active its own stream %u, check invalid ", node->GetName().c_str(), node->GetType().c_str(), stream_id); - GELOGE(FAILED, "Node %s cannot active its own stream %u.", node->GetName().c_str(), stream_id); + GELOGE(FAILED, "[Check][Param] Node %s cannot active its own stream %u.", node->GetName().c_str(), stream_id); return FAILED; } } @@ -1376,7 +1386,7 @@ Status StreamAllocator::RefreshContinuousEvents() { auto find_it = old_to_new_events.find(send_events[i]); if (find_it == old_to_new_events.end()) { REPORT_INNER_ERROR("E19999", "Check invalid send event %u", send_events[i]); - GELOGE(FAILED, "RefreshContinuousEvents: invalid send event %u", send_events[i]); + GELOGE(FAILED, "[Check][Param] RefreshContinuousEvents: invalid send event %u", send_events[i]); return FAILED; } send_events[i] = find_it->second; @@ -1390,7 +1400,7 @@ Status StreamAllocator::RefreshContinuousEvents() { auto find_it = old_to_new_events.find(recv_events[i]); if (find_it == old_to_new_events.end()) { REPORT_INNER_ERROR("E19999", "Check invalid recv event %u", recv_events[i]); - GELOGE(FAILED, "RefreshContinuousEvents: invalid recv event %u", recv_events[i]); + GELOGE(FAILED, "[Check][Param] RefreshContinuousEvents: invalid recv event %u", recv_events[i]); return FAILED; } recv_events[i] = find_it->second; @@ -1430,7 +1440,8 @@ Status StreamAllocator::InsertSyncEventNodes() { REPORT_INNER_ERROR("E19999", "Set Attr:%s for op:%s(%s) failed, event_id:%u,", RECV_ATTR_EVENT_ID.c_str(), node->GetName().c_str(), node->GetType().c_str(), event_id); - GELOGE(FAILED, "SetInt failed."); + GELOGE(FAILED, "[Set][Attr] %s for op:%s(%s) failed, event_id:%u,", + RECV_ATTR_EVENT_ID.c_str(), node->GetName().c_str(), node->GetType().c_str(), event_id); return FAILED); (void)AttrUtils::SetListStr(op_desc_ptr, ATTR_NAME_DATA_DUMP_ORIGIN_OP_NAMES, std::move(std::vector())); @@ -1441,7 +1452,7 @@ Status StreamAllocator::InsertSyncEventNodes() { if (status != SUCCESS) { REPORT_INNER_ERROR("E19999", "Add edge from node %s to node %s failed", recv_node->GetName().c_str(), node->GetName().c_str()); - GELOGE(status, "Add edge for node %s and node %s failed.", recv_node->GetName().c_str(), + GELOGE(status, "[Add][Edge] for node %s and node %s failed.", recv_node->GetName().c_str(), node->GetName().c_str()); return status; } @@ -1478,7 +1489,7 @@ Status StreamAllocator::InsertSyncEventNodes() { if (status != SUCCESS) { REPORT_INNER_ERROR("E19999", "Add edge from node %s to node %s failed", node->GetName().c_str(), send_node->GetName().c_str()); - GELOGE(status, "Add edge for node %s and node %s failed.", node->GetName().c_str(), + GELOGE(status, "[Add][Edge] for node %s and node %s failed.", node->GetName().c_str(), send_node->GetName().c_str()); return status; } @@ -1491,7 +1502,8 @@ Status StreamAllocator::InsertSyncEventNodes() { if (status != SUCCESS) { REPORT_CALL_ERROR("E19999", "Insert Graph Events fail, graph:%s,", whole_graph_->GetName().c_str()); - GELOGE(status, "Graph ReorderEventNodes failed"); + GELOGE(status, "[Insert][GraphEvents] Graph ReorderEventNodes failed, graph:%s,", + whole_graph_->GetName().c_str()); return status; } @@ -1544,7 +1556,8 @@ Status StreamAllocator::GetMaxStreamAndTask(bool huge_stream, uint32_t &max_stre if (ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "call rtGetMaxStreamAndTask fail, ret:%d, stream_type:%u,", static_cast(ret), stream_type); - GELOGE(FAILED, "Get max stream and task count by rts failed."); + GELOGE(FAILED, "[Call][RtGetMaxStreamAndTask] Get max stream and task count by rts failed, " + "ret:%d, stream_type:%u,", static_cast(ret), stream_type); return FAILED; } GELOGD("Allowed max stream count: %u, max task count per stream: %u.", max_stream_count, max_task_count); @@ -1687,7 +1700,7 @@ Status StreamAllocator::AddActiveNodes(NodePtr &switch_node, const vectorGetOutControlAnchor()->Unlink(node->GetInControlAnchor()) != GRAPH_SUCCESS) { REPORT_CALL_ERROR("E19999", "Unlink %s to %s failed", switch_node->GetName().c_str(), node->GetName().c_str()); - GELOGE(FAILED, "Unlink %s to %s failed.", switch_node->GetName().c_str(), node->GetName().c_str()); + GELOGE(FAILED, "[Unlink][Nodes] %s to %s failed.", switch_node->GetName().c_str(), node->GetName().c_str()); return FAILED; } GE_CHECK_NOTNULL(active_node->GetOutControlAnchor()); if (active_node->GetOutControlAnchor()->LinkTo(node->GetInControlAnchor()) != GRAPH_SUCCESS) { REPORT_CALL_ERROR("E19999", "Link %s to %s failed", active_node->GetName().c_str(), node->GetName().c_str()); - GELOGE(FAILED, "Link %s to %s failed.", active_node->GetName().c_str(), node->GetName().c_str()); + GELOGE(FAILED, "[Link][Nodes] %s to %s failed.", active_node->GetName().c_str(), node->GetName().c_str()); return FAILED; } } if (SetSwitchBranchNodeLabel(active_node, name) != SUCCESS) { - GELOGE(FAILED, "Set switch branch node label failed."); + GELOGE(FAILED, "[Set][SwitchBranchNodeLabel] failed, node:%s.", active_node->GetName().c_str()); return FAILED; } if (SetStreamLabel(active_node, name) != SUCCESS) { - GELOGE(FAILED, "Set stream label failed."); + GELOGE(FAILED, "[Set][StreamLabel] failed, node:%s.", active_node->GetName().c_str()); return FAILED; } if (SetActiveLabelList(active_node, {active_label}) != SUCCESS) { - GELOGE(FAILED, "Set active label list failed."); + GELOGE(FAILED, "[Set][ActiveLabelList] failed, node:%s.", active_node->GetName().c_str()); return FAILED; } if (SetActiveStreamList(active_node, active_label) != SUCCESS) { - GELOGE(FAILED, "Set active stream list failed."); + GELOGE(FAILED, "[Set][ActiveStreamList] failed, node:%s.", active_node->GetName().c_str()); return FAILED; } @@ -1753,7 +1766,7 @@ Status StreamAllocator::AddActiveNodes(NodePtr &switch_node, const vector &streams = labeled_streams_[active_label]; @@ -1761,7 +1774,8 @@ Status StreamAllocator::SetActiveStreamList(NodePtr &active_node, const string & if (!AttrUtils::SetListInt(active_node->GetOpDesc(), ATTR_NAME_ACTIVE_STREAM_LIST, active_streams)) { REPORT_INNER_ERROR("E19999", "Set Attr:%s fail for op:%s(%s)", ATTR_NAME_ACTIVE_STREAM_LIST.c_str(), active_node->GetName().c_str(), active_node->GetType().c_str()); - GELOGE(FAILED, "SetListInt of %s failed.", ATTR_NAME_ACTIVE_STREAM_LIST.c_str()); + GELOGE(FAILED, "[Set][Attr] %s failed for op:%s(%s).", ATTR_NAME_ACTIVE_STREAM_LIST.c_str(), + active_node->GetName().c_str(), active_node->GetType().c_str()); return FAILED; } return SUCCESS; diff --git a/ge/graph/build/stream_graph_optimizer.cc b/ge/graph/build/stream_graph_optimizer.cc index c71c31be..30142c2b 100644 --- a/ge/graph/build/stream_graph_optimizer.cc +++ b/ge/graph/build/stream_graph_optimizer.cc @@ -128,8 +128,8 @@ Status StreamGraphOptimizer::OptimizeStreamedSubGraph(const ComputeGraphPtr &com REPORT_INNER_ERROR("E19999", "Check stream_id:%ld in op:%s(%s) is bigger than " "run_context.graphStreamList.size():%zu", stream_id, op_desc->GetName().c_str(), op_desc->GetType().c_str(), run_context.graphStreamList.size()); - GELOGE(FAILED, "stream_id %ld is bigger than run_context.graphStreamList.size() %zu", stream_id, - run_context.graphStreamList.size()); + GELOGE(FAILED, "[Check][Param] stream_id %ld is bigger than run_context.graphStreamList.size() %zu", + stream_id, run_context.graphStreamList.size()); return FAILED; } run_context.stream = run_context.graphStreamList[stream_id]; @@ -145,11 +145,9 @@ Status StreamGraphOptimizer::OptimizeStreamedSubGraph(const ComputeGraphPtr &com REPORT_CALL_ERROR("E19999", "Call optimize streamed subgraph failed, subgraph: %s, engine_name: %s, graph " "Optimizer num: %zu, ret: %u", subgraph->GetName().c_str(), engine_name.c_str(), graph_optimizers.size(), ret); - GELOGE( - ret, - "[optimizeStreamedSubGraph]: optimize streamed subgraph failed, subgraph: %s, engine_name: %s, graph " - "Optimizer num: %zu, ret: %u", - subgraph->GetName().c_str(), engine_name.c_str(), graph_optimizers.size(), ret); + GELOGE(ret, "[Optimize][StreamGraph] failed, subgraph: %s, engine_name: %s, graph " + "Optimizer num: %zu, ret: %u", + subgraph->GetName().c_str(), engine_name.c_str(), graph_optimizers.size(), ret); return ret; } GELOGD( diff --git a/ge/graph/build/task_generator.cc b/ge/graph/build/task_generator.cc index 633f541c..dabdc5d2 100755 --- a/ge/graph/build/task_generator.cc +++ b/ge/graph/build/task_generator.cc @@ -72,7 +72,7 @@ Status TaskGenerator::GetTaskInfo(Model &model, ComputeGraphPtr &graph, uint64_t // Check params if (graph == nullptr) { REPORT_INNER_ERROR("E19999", "Check param graph is null, session_id:%lu", session_id); - GELOGE(PARAM_INVALID, "GetTaskInfo param graph is null. session_id=%lu", session_id); + GELOGE(PARAM_INVALID, "[Check][Param] GetTaskInfo param graph is null. session_id=%lu", session_id); return PARAM_INVALID; } @@ -83,7 +83,7 @@ Status TaskGenerator::GetTaskInfo(Model &model, ComputeGraphPtr &graph, uint64_t GE_DUMP(graph, "GenerateTaskAfter"); if (ret != SUCCESS) { - GELOGE(ret, "GenerateTask failed. session_id=%lu", session_id); + GELOGE(ret, "[Generate][Task] failed. session_id=%lu", session_id); return ret; } @@ -98,7 +98,8 @@ Status TaskGenerator::GetTaskInfo(Model &model, ComputeGraphPtr &graph, uint64_t GE_CHK_BOOL_EXEC(ge::AttrUtils::SetListStr(model, ATTR_MODEL_TASK_INDEX_OP_NAME, op_name), REPORT_INNER_ERROR("E19999", "Set Attr:%s fail for model:%s", ATTR_MODEL_TASK_INDEX_OP_NAME.c_str(), model.GetName().c_str()); - GELOGE(FAILED, "SetListStr failed."); + GELOGE(FAILED, "[Set][Attr] %s fail for model:%s", + ATTR_MODEL_TASK_INDEX_OP_NAME.c_str(), model.GetName().c_str()); return FAILED); GELOGI("GenerateTask Success, task list:%zu, op map:%zu, logic mem base:%p, logic weight base:%p, logic var base:%p", @@ -113,7 +114,8 @@ Status TaskGenerator::GetTaskInfo(Model &model, ComputeGraphPtr &graph, uint64_t if (task_def == nullptr) { REPORT_INNER_ERROR("E19999", "Add task_def in ModelTaskDef fail, session_id:%lu, graph:%s, model:%s", session_id, graph->GetName().c_str(), model.GetName().c_str()); - GELOGE(FAILED, "task_def is nullptr."); + GELOGE(FAILED, "[Check][Param] task_def is nullptr, session_id:%lu, graph:%s, model:%s", + session_id, graph->GetName().c_str(), model.GetName().c_str()); return FAILED; } *task_def = task_def_temp; @@ -121,7 +123,7 @@ Status TaskGenerator::GetTaskInfo(Model &model, ComputeGraphPtr &graph, uint64_t ret = AddModelTaskToModel(model_task_def, session_id, model, run_context); if (ret != SUCCESS) { - GELOGE(ret, "AddModelTaskToModel failed. session_id=%lu", session_id); + GELOGE(ret, "[Add][ModelTask] To Model failed. session_id=%lu", session_id); return ret; } @@ -135,28 +137,33 @@ Status TaskGenerator::AddModelTaskToModel(const ModelTaskDef &model_task_def, ui AttrUtils::SetInt(model, MODEL_ATTR_TASK_GEN_BASE_ADDR, reinterpret_cast(run_context.dataMemBase)), REPORT_INNER_ERROR("E19999", "Set Attr:%s fail for model:%s", MODEL_ATTR_TASK_GEN_BASE_ADDR.c_str(), model.GetName().c_str()); - GELOGE(FAILED, "SetInt MODEL_ATTR_TASK_GEN_BASE_ADDR failed."); + GELOGE(FAILED, "[Set][Attr] %s fail for model:%s", + MODEL_ATTR_TASK_GEN_BASE_ADDR.c_str(), model.GetName().c_str()); return FAILED); GE_CHK_BOOL_EXEC( AttrUtils::SetInt(model, MODEL_ATTR_TASK_GEN_WEIGHT_ADDR, reinterpret_cast(run_context.weightMemBase)), REPORT_INNER_ERROR("E19999", "Set Attr:%s fail for model:%s", MODEL_ATTR_TASK_GEN_WEIGHT_ADDR.c_str(), model.GetName().c_str()); - GELOGE(FAILED, "SetInt MODEL_ATTR_TASK_GEN_WEIGHT_ADDR failed."); + GELOGE(FAILED, "[Set][Attr] %s fail for model:%s", + MODEL_ATTR_TASK_GEN_WEIGHT_ADDR.c_str(), model.GetName().c_str()); return FAILED); GE_CHK_BOOL_EXEC(AttrUtils::SetInt(model, ATTR_MODEL_TASK_GEN_VAR_ADDR, reinterpret_cast(var_mem_base_)), REPORT_INNER_ERROR("E19999", "Set Attr:%s fail for model:%s", ATTR_MODEL_TASK_GEN_VAR_ADDR.c_str(), model.GetName().c_str()); - GELOGE(FAILED, "SetInt ATTR_MODEL_TASK_GEN_VAR_ADDR failed."); + GELOGE(FAILED, "[Set][Attr] %s fail for model:%s", + ATTR_MODEL_TASK_GEN_VAR_ADDR.c_str(), model.GetName().c_str()); return FAILED); GE_CHK_BOOL_EXEC(AttrUtils::SetInt(model, ATTR_MODEL_VAR_SIZE, var_mem_size_), REPORT_INNER_ERROR("E19999", "Set Attr:%s fail for model:%s", ATTR_MODEL_VAR_SIZE.c_str(), model.GetName().c_str()); - GELOGE(FAILED, "SetInt ATTR_MODEL_VAR_SIZE failed."); + GELOGE(FAILED, "[Set][Attr] %s fail for model:%s", + ATTR_MODEL_VAR_SIZE.c_str(), model.GetName().c_str()); return FAILED); GE_CHK_BOOL_EXEC(AttrUtils::SetInt(model, MODEL_ATTR_SESSION_ID, session_id), REPORT_INNER_ERROR("E19999", "Set Attr:%s fail for mode:%s", MODEL_ATTR_SESSION_ID.c_str(), model.GetName().c_str()); - GELOGE(FAILED, "SetInt MODEL_ATTR_SESSION_ID failed."); + GELOGE(FAILED, "[Set][Attr] %s fail for mode:%s", + MODEL_ATTR_SESSION_ID.c_str(), model.GetName().c_str()); return FAILED); size_t task_size = model_task_def.ByteSizeLong(); @@ -164,15 +171,15 @@ Status TaskGenerator::AddModelTaskToModel(const ModelTaskDef &model_task_def, ui if (!model_task_def.SerializePartialToArray(serial_buff.GetData(), static_cast(task_size))) { REPORT_INNER_ERROR("E19999", "model_task_def's serialize failed, model name = %s, task_size=%zu", model.GetName().c_str(), task_size); - GELOGE(FAILED, "model_task_def's serialize failed, model name = %s, task_size=%zu.", model.GetName().c_str(), - task_size); + GELOGE(FAILED, "[Call][SerializePartialToArray] failed, model name = %s, task_size=%zu.", + model.GetName().c_str(), task_size); return FAILED; } if (!AttrUtils::SetZeroCopyBytes(model, MODEL_ATTR_TASKS, std::move(serial_buff))) { REPORT_INNER_ERROR("E19999", "Set model task to model failed, model name = %s, task_size=%zu", model.GetName().c_str(), task_size); - GELOGE(FAILED, "Set model task to model failed, model name = %s, task_size=%zu.", model.GetName().c_str(), - task_size); + GELOGE(FAILED, "[Call][SetZeroCopyBytes] Set model task to model failed, model name = %s, task_size=%zu.", + model.GetName().c_str(), task_size); return FAILED; } @@ -191,7 +198,8 @@ Status TaskGenerator::UpdateOpIsVarAttr(const OpDescPtr &op_desc, uint64_t sessi GE_CHK_BOOL_EXEC(AttrUtils::SetListBool(op_desc, kIsInputVar, input_var), REPORT_INNER_ERROR("E19999", "Set Attr:%s fail for op:%s(%s)", kIsInputVar, op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(FAILED, "SetListBool failed."); + GELOGE(FAILED, "[Set][Attr] %s fail for op:%s(%s)", kIsInputVar, + op_desc->GetName().c_str(), op_desc->GetType().c_str()); return FAILED); } @@ -204,7 +212,8 @@ Status TaskGenerator::UpdateOpIsVarAttr(const OpDescPtr &op_desc, uint64_t sessi GE_CHK_BOOL_EXEC(AttrUtils::SetListBool(op_desc, kIsOutputVar, output_var), REPORT_INNER_ERROR("E19999", "Set Attr:%s fail for op:%s(%s)", kIsOutputVar, op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(FAILED, "SetListBool failed."); + GELOGE(FAILED, "[Set][Attr] %s fail for op:%s(%s)", kIsOutputVar, + op_desc->GetName().c_str(), op_desc->GetType().c_str()); return FAILED); } return SUCCESS; @@ -280,10 +289,11 @@ Status TaskGenerator::GenerateTask(RunContext &run_context, ComputeGraphPtr &gra std::shared_ptr ge_lib = GELib::GetInstance(); if ((ge_lib == nullptr) || !ge_lib->InitFlag()) { REPORT_INNER_ERROR("E19999", "Check GELib instance not init before"); - GELOGE(GE_CLI_GE_NOT_INITIALIZED, "GenerateTask failed."); + GELOGE(GE_CLI_GE_NOT_INITIALIZED, "[Check][Param] GenerateTask failed, because GELib instance not init before."); return GE_CLI_GE_NOT_INITIALIZED; } - GE_CHK_STATUS_RET(MarkNodeAndSetIndex(graph), "MarkNodeAndSetIndex failed."); + GE_CHK_STATUS_RET(MarkNodeAndSetIndex(graph), + "[Call][MarkNodeAndSetIndex] failed, graph:%s.", graph->GetName().c_str()); ProfilingPoint profiling_point; vector all_reduce_nodes; GE_CHK_STATUS_RET(FindProfilingTaskIndex(graph, profiling_point, all_reduce_nodes)); @@ -304,12 +314,13 @@ Status TaskGenerator::GenerateTask(RunContext &run_context, ComputeGraphPtr &gra rtStream_t stream = nullptr; bool is_unknown_shape = graph->GetGraphUnknownFlag() || GetContext().GetHostExecFlag(); if (is_unknown_shape) { - GE_CHK_STATUS_RET(SetUnknownShapeStream(run_context, stream), "Set unknown shape stream failed."); + GE_CHK_STATUS_RET(SetUnknownShapeStream(run_context, stream), + "[Set][UnknownShapeStream] failed, graph:%s.", graph->GetName().c_str()); } std::function callback = [&]() { if (is_unknown_shape) { if (DestroyUnknownShapeStream(run_context, stream) != SUCCESS) { - GELOGE(FAILED, "Destory unknown shape stream failed."); + GELOGE(FAILED, "[Destroy][UnknownShapeStream] failed."); } } }; @@ -335,7 +346,7 @@ Status TaskGenerator::GenerateTask(RunContext &run_context, ComputeGraphPtr &gra FusionTaskInfo{run_context, graph, node, op_desc, node_index, ge_lib, ops_kernel_manager, task_def_list, op_name_map, profiling_point, all_reduce_nodes}; GE_CHK_STATUS_RET(GenerateTaskForFusionNode(fusion_task_info, fusion_nodes, fusion_nodes_seen), - "Call GenerateTaskForFusionNode node:%s(%s) failed", name.c_str(), type.c_str()); + "[Call][GenerateTaskForFusionNode] node:%s(%s) failed", name.c_str(), type.c_str()); // continue directly if (ge::AttrUtils::GetInt(op_desc, ATTR_NAME_FUSION_GROUP_KEY, group_key)) { GELOGI("Fusion node[name:%s, type:%s] do not need generate task again.", name.c_str(), type.c_str()); @@ -349,13 +360,11 @@ Status TaskGenerator::GenerateTask(RunContext &run_context, ComputeGraphPtr &gra if (kernel_info_store == nullptr) { REPORT_INNER_ERROR("E19999", "Get ops kernel info store failed for op:%s(%s), op_kernel_name:%s", node->GetName().c_str(), node->GetType().c_str(), op_kernel_lib_name.c_str()); - GELOGE(INTERNAL_ERROR, - "No ops kernel store or ops kernel builder found. node:%s(%s), op_kernel_lib_name=%s.", - name.c_str(), - type.c_str(), op_kernel_lib_name.c_str()); + GELOGE(INTERNAL_ERROR, "[Call][GetOpsKernelInfoStore] No ops kernel store or ops kernel builder found. " + "node:%s(%s), op_kernel_lib_name=%s.", name.c_str(), type.c_str(), op_kernel_lib_name.c_str()); return INTERNAL_ERROR; } - GE_CHK_STATUS_RET(UpdateAnchorStatus(node), "Call UpdateAnchorStatus node:%s(%s) failed", name.c_str(), + GE_CHK_STATUS_RET(UpdateAnchorStatus(node), "[Call][UpdateAnchorStatus] node:%s(%s) failed", name.c_str(), type.c_str()); // Profiling task size_t task_list_size_before = task_def_list.size(); @@ -365,7 +374,8 @@ Status TaskGenerator::GenerateTask(RunContext &run_context, ComputeGraphPtr &gra int64_t stream_id = 0; if (!is_unknown_shape) { stream_id = op_desc->GetStreamId(); - GE_CHK_STATUS_RET(SetKnownShapeStream(run_context, stream_id), "node[name:%s(%s), id:%ld] stream id is invalid.", + GE_CHK_STATUS_RET(SetKnownShapeStream(run_context, stream_id), + "[Set][KnownShapeStream] node[name:%s(%s), id:%ld] stream id is invalid.", name.c_str(), type.c_str(), op_id); } GELOGD("Call %s to generate node[name:%s(%s), id:%ld, stream_id:%ld] task.", op_kernel_lib_name.c_str(), @@ -376,8 +386,7 @@ Status TaskGenerator::GenerateTask(RunContext &run_context, ComputeGraphPtr &gra if (ret != SUCCESS) { REPORT_CALL_ERROR("E19999", "Call OpsKernelBuilderManager GenerateTask fail for op:%s(%s)", node->GetName().c_str(), node->GetType().c_str()); - GELOGE(ret, "Call %s to generate node[name:%s(%s), id:%ld, stream_id:%ld] task failed.", - op_kernel_lib_name.c_str(), name.c_str(), type.c_str(), op_id, stream_id); + GELOGE(ret, "[Generate][Task] fail for op:%s(%s)", node->GetName().c_str(), node->GetType().c_str()); return ret; } // Profiling task @@ -388,9 +397,9 @@ Status TaskGenerator::GenerateTask(RunContext &run_context, ComputeGraphPtr &gra REPORT_INNER_ERROR("E19999", "Call %s to generate node[name:%s(%s), id:%ld, stream_id:%ld] task " "but task num from %zu to %zu, check invalid", op_kernel_lib_name.c_str(), name.c_str(), type.c_str(), op_id, stream_id, task_list_size_before, task_list_size_after); - GELOGE(FAILED, "Call %s to generate node[name:%s(%s), id:%ld, stream_id:%ld] task. but task num from %zu to %zu.", - op_kernel_lib_name.c_str(), name.c_str(), type.c_str(), op_id, stream_id, task_list_size_before, - task_list_size_after); + GELOGE(FAILED, "[Check][Param] Call %s to generate node[name:%s(%s), id:%ld, stream_id:%ld] task. " + "but task num from %zu to %zu.", op_kernel_lib_name.c_str(), name.c_str(), type.c_str(), + op_id, stream_id, task_list_size_before, task_list_size_after); return FAILED; } @@ -455,15 +464,15 @@ Status TaskGenerator::GenerateTaskForFusionNode(FusionTaskInfo &fusion_task_info REPORT_INNER_ERROR("E19999", "Get ops kernel info store failed for op:%s(%s), op_kernel_name:%s", op_desc->GetName().c_str(), op_desc->GetType().c_str(), op_kernel_lib_name.c_str()); - GELOGE(INTERNAL_ERROR, - "Fusion: No ops kernel store or ops kernel builder found. fusion_node:%s(%s), op_kernel_lib_name=%s.", + GELOGE(INTERNAL_ERROR, "[Call][GetOpsKernelInfoStore] Fusion: No ops kernel store or ops kernel builder found." + " fusion_node:%s(%s), op_kernel_lib_name=%s.", fusion_node_name.c_str(), fusion_node_type.c_str(), op_kernel_lib_name.c_str()); return INTERNAL_ERROR; } ret = UpdateAnchorStatus(fusion_node); if (ret != SUCCESS) { - GELOGE(ret, "Fusion: Call UpdateAnchorStatus fusion_node:%s(%s) failed", fusion_node_name.c_str(), + GELOGE(ret, "[Update][AnchorStatus] fusion_node:%s(%s) failed", fusion_node_name.c_str(), fusion_node_type.c_str()); return ret; } @@ -474,8 +483,9 @@ Status TaskGenerator::GenerateTaskForFusionNode(FusionTaskInfo &fusion_task_info REPORT_INNER_ERROR("E19999", "Fusion: fusion_node[name:%s(%s), id:%ld] stream id is invalid, " "stream list size=%zu", fusion_node_name.c_str(), fusion_node_type.c_str(), op_id, run_context.graphStreamList.size()); - GELOGE(INTERNAL_ERROR, "Fusion: fusion_node[name:%s(%s), id:%ld] stream id is invalid, stream list size=%zu", - fusion_node_name.c_str(), fusion_node_type.c_str(), op_id, run_context.graphStreamList.size()); + GELOGE(INTERNAL_ERROR, "[Check][Param] Fusion: fusion_node[name:%s(%s), id:%ld] stream id is invalid, " + "stream list size=%zu", fusion_node_name.c_str(), fusion_node_type.c_str(), op_id, + run_context.graphStreamList.size()); return INTERNAL_ERROR; } // profiling task @@ -488,8 +498,7 @@ Status TaskGenerator::GenerateTaskForFusionNode(FusionTaskInfo &fusion_task_info REPORT_CALL_ERROR("E19999", " Call %s to generate fusion_node:[fusion_node_name:%s(%s), " "id:%ld, stream_id:%ld] task failed", op_kernel_lib_name.c_str(), fusion_node_name.c_str(), fusion_node_type.c_str(), op_id, stream_id); - GELOGE(ret, - "Fusion: Call %s to generate fusion_node:[fusion_node_name:%s(%s), " + GELOGE(ret, "[Generate][Task] Fusion: Call %s to generate fusion_node:[fusion_node_name:%s(%s), " "id:%ld, stream_id:%ld] task failed.", op_kernel_lib_name.c_str(), fusion_node_name.c_str(), fusion_node_type.c_str(), op_id, stream_id); return ret; @@ -503,8 +512,7 @@ Status TaskGenerator::GenerateTaskForFusionNode(FusionTaskInfo &fusion_task_info "id:%ld, stream_id:%ld] task, but task num from %zu to %zu, check invalid", fusion_node_name.c_str(), fusion_node_type.c_str(), op_kernel_lib_name.c_str(), op_id, stream_id, task_list_size_before, task_list_size_after); - GELOGE(FAILED, - "Fusion: Call %s to generate fusion_node:[fusion_node_name:%s(%s), " + GELOGE(FAILED, "[Check][Param] Fusion: Call %s to generate fusion_node:[fusion_node_name:%s(%s), " "id:%ld, stream_id:%ld] task. but task num from %zu to %zu.", op_kernel_lib_name.c_str(), fusion_node_name.c_str(), fusion_node_type.c_str(), op_id, stream_id, task_list_size_before, task_list_size_after); @@ -539,16 +547,18 @@ Status TaskGenerator::UpdateAnchorStatus(const NodePtr &node) { if (NodeUtils::SetAllAnchorStatus(node) != GRAPH_SUCCESS) { REPORT_CALL_ERROR("E19999", "SetAllAnchorStatus fail for op:%s(%s)", node->GetName().c_str(), node->GetType().c_str()); - GELOGE(INTERNAL_ERROR, "NodeUtils::SetAllAnchorStatus failed."); + GELOGE(INTERNAL_ERROR, "[Set][AllAnchorStatus] failed, op:%s(%s)", + node->GetName().c_str(), node->GetType().c_str()); return INTERNAL_ERROR; } for (auto &anchor : node->GetAllInDataAnchors()) { auto peer_anchor = anchor->GetPeerOutAnchor(); if (peer_anchor == nullptr) { if (AnchorUtils::SetStatus(anchor, ANCHOR_SUSPEND) != GRAPH_SUCCESS) { - REPORT_CALL_ERROR("E19999", "Set in peer anchor status fail for op:%s(%s), anchor_index:%d,", + REPORT_CALL_ERROR("E19999", "Set in peer anchor status fail for op:%s(%s), anchor_index:%d", node->GetName().c_str(), node->GetType().c_str(), anchor->GetIdx()); - GELOGE(INTERNAL_ERROR, "AnchorUtils::SetStatus failed."); + GELOGE(INTERNAL_ERROR, "[Set][Status] failed, op:%s(%s), anchor_index:%d", + node->GetName().c_str(), node->GetType().c_str(), anchor->GetIdx()); return INTERNAL_ERROR; } continue; @@ -558,16 +568,18 @@ Status TaskGenerator::UpdateAnchorStatus(const NodePtr &node) { bool is_const = NodeUtils::GetConstOpType(peer_anchor->GetOwnerNode(), const_type); if (is_const && (const_type == CONSTANT)) { if (AnchorUtils::SetStatus(anchor, ANCHOR_CONST) != GRAPH_SUCCESS) { - REPORT_CALL_ERROR("E19999", "Set in anchor CONST status fail for op:%s(%s), anchor_index:%d,", + REPORT_CALL_ERROR("E19999", "Set in anchor CONST status fail for op:%s(%s), anchor_index:%d", node->GetName().c_str(), node->GetType().c_str(), anchor->GetIdx()); - GELOGE(INTERNAL_ERROR, "AnchorUtils::SetStatus failed."); + GELOGE(INTERNAL_ERROR, "[Set][Status] failed. op:%s(%s), anchor_index:%d.", + node->GetName().c_str(), node->GetType().c_str(), anchor->GetIdx()); return INTERNAL_ERROR; } } else { if (AnchorUtils::SetStatus(anchor, ANCHOR_DATA) != GRAPH_SUCCESS) { - REPORT_CALL_ERROR("E19999", "Set in anchor DATA status fail for op:%s(%s), anchor_index:%d,", + REPORT_CALL_ERROR("E19999", "Set in anchor DATA status fail for op:%s(%s), anchor_index:%d", node->GetName().c_str(), node->GetType().c_str(), anchor->GetIdx()); - GELOGE(INTERNAL_ERROR, "AnchorUtils::SetStatus failed."); + GELOGE(INTERNAL_ERROR, "[Set][Status] failed, op:%s(%s), anchor_index:%d.", + node->GetName().c_str(), node->GetType().c_str(), anchor->GetIdx()); return INTERNAL_ERROR; } } @@ -580,7 +592,7 @@ Status TaskGenerator::MarkNodeAndSetIndex(ComputeGraphPtr &graph) { auto ge_lib = GELib::GetInstance(); if ((ge_lib == nullptr) || !ge_lib->InitFlag()) { REPORT_INNER_ERROR("E19999", "Check GELib instance not init before"); - GELOGE(GE_CLI_GE_NOT_INITIALIZED, "GE is not initialized or is finalized."); + GELOGE(GE_CLI_GE_NOT_INITIALIZED, "[Check][Param] GE is not initialized or is finalized."); return GE_CLI_GE_NOT_INITIALIZED; } @@ -588,7 +600,7 @@ Status TaskGenerator::MarkNodeAndSetIndex(ComputeGraphPtr &graph) { if (all_nodes.empty()) { REPORT_INNER_ERROR("E19999", "Check param all_nodes empty in graph:%s", graph->GetName().c_str()); - GELOGE(GE_GRAPH_GRAPH_NODE_NULL, "Graph's node is empty"); + GELOGE(GE_GRAPH_GRAPH_NODE_NULL, "[Check][Param] Graph's node is empty, graph:%s", graph->GetName().c_str()); return GE_GRAPH_GRAPH_NODE_NULL; } @@ -612,7 +624,7 @@ Status TaskGenerator::MarkNodeAndSetIndex(ComputeGraphPtr &graph) { for (const auto &stream_ops : all_stream_ops) { Status status = MarkFirstAndLastOps(stream_ops.second, is_single_stream); if (status != SUCCESS) { - GELOGE(status, "Mark first and last nodes failed."); + GELOGE(status, "[Mark][FirstAndLastOps] failed, graph:%s.", graph->GetName().c_str()); return status; } } @@ -644,9 +656,8 @@ Status TaskGenerator::MarkFirstAndLastOps(const vector &ops, bool is_ string op_kernel_lib_name = op_desc->GetOpKernelLibName(); if (op_kernel_lib_name.empty()) { REPORT_INNER_ERROR("E19999", "Get ops kernel info store failed for op:%s(%s), op_kernel_name:%s", - op_desc->GetName().c_str(), op_desc->GetType().c_str(), - op_kernel_lib_name.c_str()); - GELOGE(INTERNAL_ERROR, "node:%s(%s) get op kernel lib failed.", op_desc->GetName().c_str(), + op_desc->GetName().c_str(), op_desc->GetType().c_str(), op_kernel_lib_name.c_str()); + GELOGE(INTERNAL_ERROR, "[Check][Param] node:%s(%s) get op kernel lib failed.", op_desc->GetName().c_str(), op_desc->GetType().c_str()); return INTERNAL_ERROR; } @@ -664,12 +675,14 @@ Status TaskGenerator::MarkFirstAndLastOps(const vector &ops, bool is_ GE_CHK_BOOL_EXEC(ge::AttrUtils::SetBool(op_pair.first, kIsFirstNode, true), REPORT_INNER_ERROR("E19999", "Set Attr:%s fail for op:%s(%s)", kIsFirstNode, op_pair.first->GetName().c_str(), op_pair.first->GetType().c_str()); - GELOGE(FAILED, "SetBool failed."); + GELOGE(FAILED, "[Set][Attr] %s fail for op:%s(%s)", kIsFirstNode, + op_pair.first->GetName().c_str(), op_pair.first->GetType().c_str()); return FAILED); GE_CHK_BOOL_EXEC(ge::AttrUtils::SetBool(op_pair.second, kIsLastNode, true), REPORT_INNER_ERROR("E19999", "Set Attr:%s fail for op:%s(%s)", kIsLastNode, op_pair.second->GetName().c_str(), op_pair.second->GetType().c_str()); - GELOGE(FAILED, "SetBool failed."); + GELOGE(FAILED, "[Set][Attr] %s fail for op:%s(%s)", kIsLastNode, + op_pair.second->GetName().c_str(), op_pair.second->GetType().c_str()); return FAILED); } } @@ -980,7 +993,8 @@ Status TaskGenerator::InsertProfilingArTaskBefore(const OpDescPtr &op_desc, std: GE_IF_BOOL_EXEC(TypeUtils::CheckUint64MulOverflow(i, kProfilingArStep), REPORT_INNER_ERROR("E19999", "Multiply result is out of range when calc profiling ar log id " "for node:%s(%s)", op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(FAILED, "Multiply result is out of range."); + GELOGE(FAILED, "[Check][Param] Multiply result is out of range. node:%s(%s)", + op_desc->GetName().c_str(), op_desc->GetType().c_str()); return FAILED); ar_log_id = i * kProfilingArStep + kProfilingArStartLogid; is_insert_all_reduce_task = true; @@ -1074,7 +1088,8 @@ Status TaskGenerator::InsertProfilingArTaskAfter(const OpDescPtr &op_desc, std:: GE_IF_BOOL_EXEC(TypeUtils::CheckUint64MulOverflow(i, kProfilingArStep), REPORT_INNER_ERROR("E19999", "Multiply result is out of range when calc profiling ar log id " "for node:%s(%s)", op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(FAILED, "Multiply result is out of range."); + GELOGE(FAILED, "[Check][Param] Multiply result is out of range. node:%s(%s)", + op_desc->GetName().c_str(), op_desc->GetType().c_str()); return FAILED); ar_log_id = i * kProfilingArStep + kProfilingArEndLogid; is_insert_all_reduce_task = true; @@ -1184,7 +1199,7 @@ Status TaskGenerator::SetUnknownShapeStream(RunContext &run_context, rtStream_t rtError_t rt_ret = rtModelBindStream(run_context.model, stream, 0); if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtModelBindStream failed, ret:0x%X", rt_ret); - GELOGE(FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(FAILED, "[Call][RtModelBindStream] failed, ret: 0x%X", rt_ret); GE_CHK_RT_RET(rtStreamDestroy(stream)); return FAILED; } @@ -1199,7 +1214,7 @@ Status TaskGenerator::DestroyUnknownShapeStream(RunContext &run_context, rtStrea Status TaskGenerator::SetKnownShapeStream(RunContext &run_context, int64_t stream_id) { if (stream_id < 0 || stream_id >= static_cast(run_context.graphStreamList.size())) { - GELOGE(INTERNAL_ERROR, "Stream id[%ld] is invalid, stream list size=%zu", stream_id, + GELOGE(INTERNAL_ERROR, "[Check][Param] Stream id[%ld] is invalid, stream list size=%zu", stream_id, run_context.graphStreamList.size()); return INTERNAL_ERROR; } diff --git a/ge/graph/common/bcast.cc b/ge/graph/common/bcast.cc index 95a93897..b36b50b2 100644 --- a/ge/graph/common/bcast.cc +++ b/ge/graph/common/bcast.cc @@ -37,7 +37,7 @@ Status BCast::GenerateBcastInfo(const kVecInt &sx, const kVecInt &sy) { Reverse(x); Reverse(y); ExtendTensorDim(x, y); - GE_RETURN_WITH_LOG_IF_ERROR(SetShapeDifferentInfo(x, y), "GenerateBcastInfo failed."); + GE_RETURN_WITH_LOG_IF_ERROR(SetShapeDifferentInfo(x, y), "[Set][ShapeDifferentInfo] GenerateBcastInfo failed."); } ReverseAllIntermediateShapes(); return domi::SUCCESS; @@ -76,7 +76,7 @@ Status BCast::SetShapeDifferentInfo(const kVecInt &x, const kVecInt &y) { REPORT_INNER_ERROR("E19999", "SetShapeDifferentInfo failed. Two tensor shapes are not compatible " "according to the broadcasting rule."); GELOGE(domi::PARAM_INVALID, - "SetShapeDifferentInfo failed. Two tensor shapes are not compatible " + "[Check][Param] SetShapeDifferentInfo failed. Two tensor shapes are not compatible " "according to the broadcasting rule."); return domi::PARAM_INVALID; } diff --git a/ge/graph/common/omg_util.cc b/ge/graph/common/omg_util.cc index 8012af80..1dba8c51 100644 --- a/ge/graph/common/omg_util.cc +++ b/ge/graph/common/omg_util.cc @@ -35,9 +35,10 @@ Status GetOriginalType(const ge::NodePtr &node, string &type) { GE_CHECK_NOTNULL(node->GetOpDesc()); bool ret = ge::AttrUtils::GetStr(node->GetOpDesc(), ATTR_NAME_FRAMEWORK_ORIGINAL_TYPE, type); if (!ret) { - REPORT_INNER_ERROR("E19999", "Get Attr:%s fail for op:%s(%s)", ATTR_NAME_FRAMEWORK_ORIGINAL_TYPE.c_str(), + REPORT_INNER_ERROR("E19999", "Get Attr:%s fail from op:%s(%s)", ATTR_NAME_FRAMEWORK_ORIGINAL_TYPE.c_str(), node->GetName().c_str(), node->GetType().c_str()); - GELOGE(INTERNAL_ERROR, "Get FrameWorkOp original type [%s]", type.c_str()); + GELOGE(INTERNAL_ERROR, "[Get][Attr] %s fail from op:%s(%s)", ATTR_NAME_FRAMEWORK_ORIGINAL_TYPE.c_str(), + node->GetName().c_str(), node->GetType().c_str()); return INTERNAL_ERROR; } GELOGD("Get FrameWorkOp original type [%s]", type.c_str()); @@ -58,7 +59,8 @@ Status SetStreamLabel(const ge::NodePtr &node, const std::string &label) { if (!AttrUtils::SetStr(tmp_desc, ge::ATTR_NAME_STREAM_LABEL, label)) { REPORT_INNER_ERROR("E19999", "Set Attr:%s fail for op:%s(%s)", ATTR_NAME_STREAM_LABEL.c_str(), node->GetName().c_str(), node->GetType().c_str()); - GELOGE(FAILED, "Op: %s set ATTR_NAME_STREAM_LABEL failed", node->GetName().c_str()); + GELOGE(FAILED, "[Set][Attr] %s fail for op:%s(%s)", ATTR_NAME_STREAM_LABEL.c_str(), + node->GetName().c_str(), node->GetType().c_str()); return FAILED; } @@ -77,7 +79,8 @@ Status SetCycleEvent(const ge::NodePtr &node) { if (!AttrUtils::SetBool(tmp_desc, ge::ATTR_NAME_STREAM_CYCLE_EVENT_FLAG, true)) { REPORT_INNER_ERROR("E19999", "Set Attr:%s fail for op:%s(%s)", ATTR_NAME_STREAM_CYCLE_EVENT_FLAG.c_str(), node->GetName().c_str(), node->GetType().c_str()); - GELOGE(FAILED, "Op: %s set ATTR_NAME_STREAM_CYCLE_EVENT_FLAG failed", node->GetName().c_str()); + GELOGE(FAILED, "[Set][Attr] %s fail for op:%s(%s)", ATTR_NAME_STREAM_CYCLE_EVENT_FLAG.c_str(), + node->GetName().c_str(), node->GetType().c_str()); return FAILED; } @@ -97,7 +100,8 @@ Status SetActiveLabelList(const ge::NodePtr &node, const std::vectorGetName().c_str(), node->GetType().c_str()); - GELOGE(FAILED, "Op: %s set ATTR_NAME_ACTIVE_LABEL_LIST failed", node->GetName().c_str()); + GELOGE(FAILED, "[Set][Attr] %s fail for op:%s(%s)", ATTR_NAME_ACTIVE_LABEL_LIST.c_str(), + node->GetName().c_str(), node->GetType().c_str()); return FAILED; } @@ -117,7 +121,8 @@ Status SetSwitchBranchNodeLabel(const ge::NodePtr &node, const std::string &bran if (!AttrUtils::SetStr(tmp_desc, ge::ATTR_NAME_SWITCH_BRANCH_NODE_LABEL, branch_label)) { REPORT_INNER_ERROR("E19999", "Set Attr:%s fail for op:%s(%s)", ATTR_NAME_SWITCH_BRANCH_NODE_LABEL.c_str(), node->GetName().c_str(), node->GetType().c_str()); - GELOGE(FAILED, "Op: %s set ATTR_NAME_SWITCH_BRANCH_NODE_LABEL failed", node->GetName().c_str()); + GELOGE(FAILED, "[Set][Attr] %s fail for op:%s(%s)", ATTR_NAME_SWITCH_BRANCH_NODE_LABEL.c_str(), + node->GetName().c_str(), node->GetType().c_str()); return FAILED; } @@ -137,7 +142,8 @@ Status SetSwitchTrueBranchFlag(const ge::NodePtr &node, bool value) { if (!AttrUtils::SetBool(tmp_desc, ge::ATTR_NAME_SWITCH_TRUE_BRANCH_FLAG, value)) { REPORT_INNER_ERROR("E19999", "Set Attr:%s fail for op:%s(%s)", ATTR_NAME_SWITCH_TRUE_BRANCH_FLAG.c_str(), node->GetName().c_str(), node->GetType().c_str()); - GELOGE(FAILED, "Op: %s set ATTR_NAME_SWITCH_TRUE_BRANCH_FLAG failed", node->GetName().c_str()); + GELOGE(FAILED, "[Set][Attr] %s fail for op:%s(%s)", ATTR_NAME_SWITCH_TRUE_BRANCH_FLAG.c_str(), + node->GetName().c_str(), node->GetType().c_str()); return FAILED; } @@ -157,7 +163,8 @@ Status SetOriginalNodeName(const ge::NodePtr &node, const std::string &orig_name if (!AttrUtils::SetStr(tmp_desc, ge::ATTR_NAME_ORIG_NODE_NAME, orig_name)) { REPORT_INNER_ERROR("E19999", "Set Attr:%s fail for op:%s(%s)", ATTR_NAME_ORIG_NODE_NAME.c_str(), node->GetName().c_str(), node->GetType().c_str()); - GELOGE(FAILED, "Op: %s set ATTR_NAME_ORIG_NODE_NAME failed", node->GetName().c_str()); + GELOGE(FAILED, "[Set][Attr] %s fail for op:%s(%s)", ATTR_NAME_ORIG_NODE_NAME.c_str(), + node->GetName().c_str(), node->GetType().c_str()); return FAILED; } @@ -176,7 +183,8 @@ Status SetCyclicDependenceFlag(const ge::NodePtr &node) { if (!AttrUtils::SetBool(tmp_desc, ge::ATTR_NAME_CYCLIC_DEPENDENCE_FLAG, true)) { REPORT_INNER_ERROR("E19999", "Set Attr:%s fail for op:%s(%s)", ATTR_NAME_CYCLIC_DEPENDENCE_FLAG.c_str(), node->GetName().c_str(), node->GetType().c_str()); - GELOGE(FAILED, "Op: %s set ATTR_NAME_CYCLIC_DEPENDENCE_FLAG failed", node->GetName().c_str()); + GELOGE(FAILED, "[Set][Attr] %s fail for op:%s(%s)", ATTR_NAME_CYCLIC_DEPENDENCE_FLAG.c_str(), + node->GetName().c_str(), node->GetType().c_str()); return FAILED; } @@ -197,7 +205,8 @@ Status SetNextIteration(const ge::NodePtr &node, const std::string &next) { if (!AttrUtils::SetStr(tmp_desc, ge::ATTR_NAME_NEXT_ITERATION, next)) { REPORT_INNER_ERROR("E19999", "Set Attr:%s fail for op:%s(%s)", ATTR_NAME_NEXT_ITERATION.c_str(), node->GetName().c_str(), node->GetType().c_str()); - GELOGE(FAILED, "Op: %s set ATTR_NAME_NEXT_ITERATION failed", node->GetName().c_str()); + GELOGE(FAILED, "[Set][Attr] %s fail for op:%s(%s)", ATTR_NAME_NEXT_ITERATION.c_str(), + node->GetName().c_str(), node->GetType().c_str()); return FAILED; } @@ -275,7 +284,8 @@ void MarkForceUnknownShape(const NodePtr &node, bool force_unknown) { if (!AttrUtils::SetBool(node->GetOpDesc(), ATTR_NAME_FORCE_UNKNOWN_SHAPE, force_unknown)) { REPORT_INNER_ERROR("E19999", "Set Attr:%s fail for op:%s(%s)", ATTR_NAME_FORCE_UNKNOWN_SHAPE.c_str(), node->GetName().c_str(), node->GetType().c_str()); - GELOGE(FAILED, "Op: %s set %s failed", node->GetName().c_str(), ATTR_NAME_FORCE_UNKNOWN_SHAPE.c_str()); + GELOGE(FAILED, "[Set][Attr] %s fail for op:%s(%s)", ATTR_NAME_FORCE_UNKNOWN_SHAPE.c_str(), + node->GetName().c_str(), node->GetType().c_str()); } } } // namespace ge diff --git a/ge/graph/execute/graph_execute.cc b/ge/graph/execute/graph_execute.cc index 5649d483..87dadb41 100755 --- a/ge/graph/execute/graph_execute.cc +++ b/ge/graph/execute/graph_execute.cc @@ -43,7 +43,7 @@ GraphExecutor::~GraphExecutor() { rt_ret = rtFreeHost(buffer_addr); if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtFreeHost failed, ret:0x%X", rt_ret); - GELOGE(RT_FAILED, "[GraphManager] subgraph free buffer failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtFreeHost] subgraph free buffer failed, ret: 0x%X", rt_ret); } } } @@ -55,17 +55,17 @@ Status GraphExecutor::SetCondition(std::mutex *mutex, std::condition_variable *c std::shared_ptr listener) { if (mutex == nullptr) { REPORT_INNER_ERROR("E19999", "Check param mutex nullptr"); - GELOGE(GE_GRAPH_PARAM_NULLPTR, "[SetCondition] input param mutex is nullptr."); + GELOGE(GE_GRAPH_PARAM_NULLPTR, "[Check][Param] input param mutex is nullptr."); return GE_GRAPH_PARAM_NULLPTR; } if (cond == nullptr) { REPORT_INNER_ERROR("E19999", "Check param cond nullptr"); - GELOGE(GE_GRAPH_PARAM_NULLPTR, "[SetCondition] input param cond is nullptr."); + GELOGE(GE_GRAPH_PARAM_NULLPTR, "[Check][Param] input param cond is nullptr."); return GE_GRAPH_PARAM_NULLPTR; } if (listener == nullptr) { REPORT_INNER_ERROR("E19999", "Check param listener nullptr"); - GELOGE(GE_GRAPH_PARAM_NULLPTR, "[SetCondition] input param listener is nullptr."); + GELOGE(GE_GRAPH_PARAM_NULLPTR, "[Check][Param] input param listener is nullptr."); return GE_GRAPH_PARAM_NULLPTR; } @@ -82,7 +82,7 @@ Status GraphExecutor::SetCondition(std::mutex *mutex, std::condition_variable *c Status GraphExecutor::SetGraphContext(GraphContextPtr graph_context_ptr) { if (graph_context_ptr == nullptr) { REPORT_INNER_ERROR("E19999", "Check param graph_context_ptr nullptr"); - GELOGE(GE_GRAPH_PARAM_NULLPTR, "[SetGraphContext] input param graph_context_ptr is nullptr"); + GELOGE(GE_GRAPH_PARAM_NULLPTR, "[Check][Param] input param graph_context_ptr is nullptr"); return GE_GRAPH_PARAM_NULLPTR; } graph_context_ = graph_context_ptr; @@ -94,7 +94,7 @@ Status GraphExecutor::SetDynamicSize(uint32_t model_id, const std::vectorSetDynamicSize(model_id, batch_num, dynamic_type); if (ret != SUCCESS) { - GELOGE(ret, "SetDynamicSize failed"); + GELOGE(ret, "[Set][DynamicSize] failed, model_id:%u", model_id); return ret; } return SUCCESS; @@ -109,7 +109,7 @@ Status GraphExecutor::FreeInOutBuffer() { rt_ret = rtFreeHost(*iter); if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtFreeHost failed, ret:0x%X", rt_ret); - GELOGE(RT_FAILED, "[GraphManager] subgraph free buffer failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtFreeHost] subgraph free buffer failed, ret: 0x%X", rt_ret); (void)buffer_addr_.erase(buffer_addr_.begin(), iter); return GE_GRAPH_FREE_FAILED; } @@ -144,7 +144,7 @@ Status GraphExecutor::MallocInOutBuffer(const std::vector &buffer_size buffer_size_.clear(); auto rt_ret = FreeInOutBuffer(); if (rt_ret != SUCCESS) { - GELOGE(RT_FAILED, "[SubGraphInfo] MallocInOutBuffer free buffer failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Free][Buffer] failed, ret: 0x%X", rt_ret); return RT_FAILED; } } @@ -154,9 +154,8 @@ Status GraphExecutor::MallocInOutBuffer(const std::vector &buffer_size void *tmp_buf = nullptr; rt_ret = rtMallocHost(&tmp_buf, buffer_size[i]); if (rt_ret != RT_ERROR_NONE) { - REPORT_CALL_ERROR("E19999", "Call rtMallocHost failed, size:%lu, ret:0x%X", - buffer_size[i], rt_ret); - GELOGE(RT_FAILED, "[GraphManager] subgraph malloc buffer failed, ret: 0x%X", rt_ret); + REPORT_CALL_ERROR("E19999", "Call rtMallocHost failed, size:%lu, ret:0x%X", buffer_size[i], rt_ret); + GELOGE(RT_FAILED, "[Malloc][Buffer] failed, size:%lu, ret:0x%X", buffer_size[i], rt_ret); return GE_GRAPH_MALLOC_FAILED; } malloc_flag_ = true; @@ -190,7 +189,7 @@ Status GraphExecutor::PrepareInputData(const std::vector &input_tensor Status ret = MallocInOutBuffer(bufferSizeVec, addrVec); if (ret != SUCCESS) { - GELOGE(GE_GRAPH_MALLOC_FAILED, "[GraphExecutor] Malloc mem failed"); + GELOGE(GE_GRAPH_MALLOC_FAILED, "[Malloc][Mem] failed"); return GE_GRAPH_MALLOC_FAILED; } @@ -203,7 +202,8 @@ Status GraphExecutor::PrepareInputData(const std::vector &input_tensor if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMemcpy failed, dst_size:%lu, src_size:%zu, ret:0x%X", bufferSizeVec[i], in_tensor->GetData().size(), rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMemcpy] failed, dst_size:%lu, src_size:%zu, ret:0x%X", + bufferSizeVec[i], in_tensor->GetData().size(), rt_ret); return RT_FAILED; } } @@ -247,7 +247,7 @@ Status GraphExecutor::SyncExecuteModel(uint32_t model_id, const std::vectorResetResult() != SUCCESS) { - REPORT_CALL_ERROR("E19999", "Call graph_run_listener_.ResetResult fail, model_id:%u", - model_id); - GELOGE(GE_GRAPH_EXECUTE_FAILED, "Reset result failed"); + REPORT_CALL_ERROR("E19999", "Call graph_run_listener_.ResetResult fail, model_id:%u", model_id); + GELOGE(GE_GRAPH_EXECUTE_FAILED, "[Reset][Result] failed, model_id:%u", model_id); return GE_GRAPH_EXECUTE_FAILED; } @@ -272,7 +271,7 @@ Status GraphExecutor::SyncExecuteModel(uint32_t model_id, const std::vectorGetResultCode(); if (result_code != SUCCESS && result_code != END_OF_SEQUENCE) { - REPORT_CALL_ERROR("E19999", "Graph_run_listener_ run fail, result:%u, model_id:%u", - result_code, model_id); - GELOGE(GE_GRAPH_EXECUTE_FAILED, "[GraphExecutor] execute model failed, ret=%u, modelId=%u.", result_code, - model_id); + REPORT_CALL_ERROR("E19999", "Graph_run_listener_ run fail, result:%u, model_id:%u", result_code, model_id); + GELOGE(GE_GRAPH_EXECUTE_FAILED, "[Execute][Model] failed, ret=%u, modelId=%u.", result_code, model_id); return GE_GRAPH_EXECUTE_FAILED; } } @@ -299,13 +296,13 @@ Status GraphExecutor::SyncExecuteModel(uint32_t model_id, const std::vector outBufTmp(new (std::nothrow) uint8_t[outputDataTmp.length]); if (outBufTmp == nullptr) { - REPORT_CALL_ERROR("E19999", "New output buffer fail, length:%lu, model:%u", - outputDataTmp.length, model_id); - GELOGE(FAILED, "Failed to allocate memory."); + REPORT_CALL_ERROR("E19999", "New output buffer fail, length:%lu, model:%u", outputDataTmp.length, model_id); + GELOGE(FAILED, "[Allocate][Memory] failed, length:%lu, model:%u", outputDataTmp.length, model_id); return FAILED; } GE_PRINT_DYNAMIC_MEMORY(new, "the output memory of data on training.", sizeof(uint8_t) * outputDataTmp.length) @@ -314,7 +311,8 @@ Status GraphExecutor::SyncExecuteModel(uint32_t model_id, const std::vector shapeDims; @@ -348,7 +346,7 @@ void GraphExecutor::InitModelIdInfo(std::vector &out_model_id_info, Status GraphExecutor::FreeExecuteMemory() { auto ret = FreeInOutBuffer(); if (ret != SUCCESS) { - GELOGE(ret, "[FreeExecuteMemory] FreeInOutBuffer Error!"); + GELOGE(ret, "[Free][InOutBuffer] Error!"); return ret; } @@ -368,13 +366,14 @@ Status GraphExecutor::ExecuteGraph(GraphId graph_id, const GeRootModelPtr &ge_ro if (!init_flag_) { REPORT_INNER_ERROR("E19999", "No SetCondition called before, graph:%u, check invalid", graph_id); - GELOGE(GE_GRAPH_EXECUTE_NOT_INIT, "[GraphExecutor] AI Core Engine without calling SetCondition!"); + GELOGE(GE_GRAPH_EXECUTE_NOT_INIT, "[Check][Param] AI Core Engine without calling SetCondition! graph id:%u", + graph_id); return GE_GRAPH_EXECUTE_NOT_INIT; } GE_CHECK_NOTNULL_EXEC(ge_root_model, return FAILED); Status ret = SyncExecuteModel(ge_root_model->GetModelId(), input_tensor, output_tensor); if (ret != SUCCESS) { - GELOGE(GE_GRAPH_SYNC_MODEL_FAILED, "[GraphExecutor] SyncExecuteModel Error!"); + GELOGE(GE_GRAPH_SYNC_MODEL_FAILED, "[SyncExecute][Model] Error! graph id:%u", graph_id); return GE_GRAPH_SYNC_MODEL_FAILED; } @@ -395,7 +394,7 @@ Status GraphExecutor::ExecuteGraphAsync(GraphId graph_id, const GeRootModelPtr & GE_CHECK_NOTNULL_EXEC(ge_root_model, return FAILED); Status ret = AsyncExecuteModel(ge_root_model, input_tensor, callback); if (ret != SUCCESS) { - GELOGE(GE_GRAPH_SYNC_MODEL_FAILED, "[GraphExecutor] AsyncExecuteModel Error!"); + GELOGE(GE_GRAPH_SYNC_MODEL_FAILED, "[AsyncExecute][Model] Error! graph id:%u", graph_id); return GE_GRAPH_SYNC_MODEL_FAILED; } @@ -426,7 +425,8 @@ Status GraphExecutor::ExecuteGraphWithStream(GraphId graph_id, if (!init_flag_) { REPORT_INNER_ERROR("E19999", "No SetCondition called before, graph id = %u, stream = %p, check invalid.", graph_id, stream); - GELOGE(GE_GRAPH_EXECUTE_NOT_INIT, "[GraphExecutor] AI Core Engine without calling SetCondition!"); + GELOGE(GE_GRAPH_EXECUTE_NOT_INIT, "[Check][Param] AI Core Engine without calling SetCondition! graph id = %u", + graph_id); return GE_GRAPH_EXECUTE_NOT_INIT; } @@ -515,14 +515,14 @@ Status GraphExecutor::SetCallback(uint32_t model_id, const GeRootModelPtr &ge_ro auto model = model_manager->GetHybridModel(model_id); GE_CHECK_NOTNULL(model); if (model->SetRunAsyncListenerCallback(callback) != SUCCESS) { - GELOGE(FAILED, "SetRunAsyncListenerCallback failed."); + GELOGE(FAILED, "[Set][RunAsyncListenerCallback] failed, model_id %u", model_id); return FAILED; } } else { auto model = model_manager->GetModel(model_id); GE_CHECK_NOTNULL(model); if (model->SetRunAsyncListenerCallback(callback) != SUCCESS) { - GELOGE(FAILED, "SetRunAsyncListenerCallback failed."); + GELOGE(FAILED, "[Set][RunAsyncListenerCallback] failed, model_id %u", model_id); return FAILED; } } @@ -541,24 +541,24 @@ Status GraphExecutor::AsyncExecuteModel(const GeRootModelPtr &ge_root_model, con GE_CHECK_NOTNULL(model_manager); GELOGI("RunAsync begin.model_id %u", model_id); if (SetCallback(model_id, ge_root_model, callback) != SUCCESS) { - GELOGE(FAILED, "RunAsync: SetCallBack for model fail"); + GELOGE(FAILED, "[Set][CallBack] for model fail, model_id %u", model_id); return FAILED; } Status ret = model_manager->DataInputTensor(model_id, inputs); if (ret != SUCCESS) { - GELOGE(ret, "RunAsync: DataInput fail"); + GELOGE(ret, "[Call][DataInputTensor] RunAsync: DataInput fail, model_id %u", model_id); return ret; } GELOGI("RunAsync success."); } catch (std::bad_alloc &) { - REPORT_INNER_ERROR("E19999", "Bad memory allocation exception occur failed"); - GELOGE(MEMALLOC_FAILED, "RunAsync failed, bad memory allocation occur !"); + REPORT_INNER_ERROR("E19999", "Bad memory allocation exception occur failed, model_id %u", model_id); + GELOGE(MEMALLOC_FAILED, "[Run][Async] failed, bad memory allocation occur, model_id %u", model_id); return MEMALLOC_FAILED; } catch (...) { - REPORT_INNER_ERROR("E19999", "Some exceptions occur failed"); - GELOGE(FAILED, "RunAsync failed, some exceptions occur !"); + REPORT_INNER_ERROR("E19999", "Some exceptions occur failed, model_id %u", model_id); + GELOGE(FAILED, "[Run][Async] failed, some exceptions occur, model_id %u", model_id); return FAILED; } @@ -571,16 +571,16 @@ Status GraphExecutor::DataInput(const InputData &input_data, OutputData &output_ GE_CHECK_NOTNULL(model_manager); Status ret = model_manager->DataInput(input_data, output_data); if (ret != SUCCESS) { - GELOGE(ret, "DataInput: DataInput failed."); + GELOGE(ret, "[Call][DataInput] failed."); return ret; } } catch (std::bad_alloc &) { REPORT_INNER_ERROR("E19999", "Bad memory allocation exception occur failed"); - GELOGE(MEMALLOC_FAILED, "DataInput failed, bad memory allocation occur !"); + GELOGE(MEMALLOC_FAILED, "[Call][DataInput] failed, bad memory allocation occur !"); return MEMALLOC_FAILED; } catch (...) { REPORT_INNER_ERROR("E19999", "Some exceptions occur failed"); - GELOGE(FAILED, "DataInput failed, some exceptions occur !"); + GELOGE(FAILED, "[Call][DataInput] failed, some exceptions occur !"); return FAILED; } @@ -594,16 +594,16 @@ Status GraphExecutor::GetInputOutputDescInfo(const uint32_t model_id, vectorGetInputOutputDescInfo(model_id, input_desc, output_desc); if (ret != SUCCESS) { - GELOGE(ret, "GetInputOutputDescInfo failed."); + GELOGE(ret, "[Get][InputOutputDescInfo] failed, model_id:%u.", model_id); return ret; } } catch (std::bad_alloc &) { - REPORT_INNER_ERROR("E19999", "Bad memory allocation exception occur failed"); - GELOGE(MEMALLOC_FAILED, "GetInputOutputDescInfo failed, bad memory allocation occur !"); + REPORT_INNER_ERROR("E19999", "Bad memory allocation exception occur failed, model_id:%u.", model_id); + GELOGE(MEMALLOC_FAILED, "[Get][InputOutputDescInfo] failed, bad memory allocation occur, model_id:%u.", model_id); return MEMALLOC_FAILED; } catch (...) { - REPORT_INNER_ERROR("E19999", "Some exceptions occur failed"); - GELOGE(FAILED, "GetInputOutputDescInfo failed, some exceptions occur !"); + REPORT_INNER_ERROR("E19999", "Some exceptions occur failed, model_id:%u.", model_id); + GELOGE(FAILED, "[Get][InputOutputDescInfo] failed, some exceptions occur, model_id:%u.", model_id); return FAILED; } @@ -620,16 +620,16 @@ Status GraphExecutor::GetInputOutputDescInfo(const uint32_t model_id, vectorGetInputOutputDescInfo(model_id, input_desc, output_desc, input_formats, out_formats, new_model_desc); if (ret != SUCCESS) { - GELOGE(ret, "GetInputOutputDescInfo failed."); + GELOGE(ret, "[Get][InputOutputDescInfo] failed, model_id:%u.", model_id); return ret; } } catch (std::bad_alloc &) { - REPORT_INNER_ERROR("E19999", "Bad memory allocation exception occur failed"); - GELOGE(MEMALLOC_FAILED, "GetInputOutputDescInfo failed, bad memory allocation occur !"); + REPORT_INNER_ERROR("E19999", "Bad memory allocation exception occur failed, model_id:%u.", model_id); + GELOGE(MEMALLOC_FAILED, "[Get][InputOutputDescInfo] failed, bad memory allocation occur, model_id:%u.", model_id); return MEMALLOC_FAILED; } catch (...) { - REPORT_INNER_ERROR("E19999", "Some exceptions occur failed"); - GELOGE(FAILED, "GetInputOutputDescInfo failed, some exceptions occur !"); + REPORT_INNER_ERROR("E19999", "Some exceptions occur failed, model_id:%u.", model_id); + GELOGE(FAILED, "[Get][InputOutputDescInfo] failed, some exceptions occur, model_id:%u.", model_id); return FAILED; } @@ -649,7 +649,7 @@ Status GraphExecutor::GetDynamicBatchInfo(uint32_t model_id, std::vectorGetDynamicBatchInfo(model_id, batch_info, dynamic_type); if (ret != SUCCESS) { - GELOGE(ret, "GetDynamicBatchInfo failed."); + GELOGE(ret, "[Get][DynamicBatchInfo] failed, model_id:%u.", model_id); return ret; } return SUCCESS; @@ -667,7 +667,7 @@ Status GraphExecutor::GetCombinedDynamicDims(uint32_t model_id, std::vectorGetCombinedDynamicDims(model_id, batch_info); if (ret != SUCCESS) { - GELOGE(ret, "GetCombinedDynamicDims failed."); + GELOGE(ret, "[Call][GetCombinedDynamicDims] failed, model_id:%u.", model_id); return ret; } return SUCCESS; @@ -686,7 +686,7 @@ ge::Status GraphExecutor::GetUserDesignateShapeOrder(uint32_t model_id, GE_CHECK_NOTNULL(model_manager); Status ret = model_manager->GetUserDesignateShapeOrder(model_id, user_input_shape_order); if (ret != SUCCESS) { - GELOGE(ret, "GetUserDesignateShapeOrder failed."); + GELOGE(ret, "[Get][UserDesignateShapeOrder] failed, model_id:%u.", model_id); return ret; } return SUCCESS; @@ -697,7 +697,7 @@ Status GraphExecutor::GetCurShape(const uint32_t model_id, std::vector GE_CHECK_NOTNULL(model_manager); Status ret = model_manager->GetCurShape(model_id, batch_info, dynamic_type); if (ret != SUCCESS) { - GELOGE(ret, "GetCurShape failed"); + GELOGE(ret, "[Get][CurShape] failed, model_id:%u", model_id); return ret; } return SUCCESS; @@ -721,7 +721,7 @@ Status GraphExecutor::GetModelAttr(uint32_t model_id, std::vector &dynam GE_CHECK_NOTNULL(model_manager); Status ret = model_manager->GetModelAttr(model_id, dynamic_output_shape_info); if (ret != SUCCESS) { - GELOGE(FAILED, "GetModelAttr failed"); + GELOGE(FAILED, "[Get][ModelAttr] failed, model_id:%u", model_id); return ret; } return SUCCESS; @@ -754,7 +754,7 @@ Status GraphExecutor::GetOrigInputInfo(uint32_t model_id, uint32_t index, Origin GE_CHECK_NOTNULL(model_manager); Status ret = model_manager->GetOrigInputInfo(model_id, index, orig_input_info); if (ret != SUCCESS) { - GELOGE(ret, "GetOrigInputInfo failed."); + GELOGE(ret, "[Get][OrigInputInfo] failed, model_id:%u, index:%u.", model_id, index); return ret; } @@ -768,7 +768,7 @@ Status GraphExecutor::GetAllAippInputOutputDims(uint32_t model_id, uint32_t inde GE_CHECK_NOTNULL(model_manager); Status ret = model_manager->GetAllAippInputOutputDims(model_id, index, input_dims, output_dims); if (ret != SUCCESS) { - GELOGE(ret, "GetAllAippInputOutputDims failed."); + GELOGE(ret, "[Get][AllAippInputOutputDims] failed, model_id:%u, index:%u.", model_id, index); return ret; } @@ -781,7 +781,8 @@ Status GraphExecutor::GetOpDescInfo(uint32_t device_id, uint32_t stream_id, uint GE_CHECK_NOTNULL(model_manager); Status ret = model_manager->GetOpDescInfo(device_id, stream_id, task_id, op_desc_info); if (ret != SUCCESS) { - GELOGE(ret, "GetOpDescInfo failed."); + GELOGE(ret, "[Get][OpDescInfo] failed, device_id:%u, stream_id:%u, task_id:%u.", + device_id, stream_id, task_id); return ret; } return SUCCESS; diff --git a/ge/graph/label/case_label_maker.cc b/ge/graph/label/case_label_maker.cc index 8bf5de71..3fdb1783 100644 --- a/ge/graph/label/case_label_maker.cc +++ b/ge/graph/label/case_label_maker.cc @@ -44,8 +44,8 @@ Status CaseOpLabelMaker::Run(uint32_t &label_index) { if (graph_names.empty() || graph_names.size() > kMaxCaseBranch) { REPORT_INNER_ERROR("E19999", "Node:%s(%s) subgraph size: %zu, check invalid", case_desc->GetName().c_str(), case_desc->GetType().c_str(), graph_names.size()); - GELOGE(INTERNAL_ERROR, "Node: %s has invalid subgraph, graph size: %zu.", case_desc->GetName().c_str(), - graph_names.size()); + GELOGE(INTERNAL_ERROR, "[Check][Param] Node: %s has invalid subgraph, graph size: %zu.", + case_desc->GetName().c_str(), graph_names.size()); return FAILED; } @@ -71,7 +71,7 @@ Status CaseOpLabelMaker::Run(uint32_t &label_index) { if (stream_active == nullptr) { REPORT_CALL_ERROR("E19999", "Add StreamActive node in graph:%s fail", graph->GetName().c_str()); - GELOGE(INTERNAL_ERROR, "Subgraph: %s add stream active failed.", graph->GetName().c_str()); + GELOGE(INTERNAL_ERROR, "[Add][StreamActive] in Subgraph: %s failed.", graph->GetName().c_str()); return FAILED; } @@ -81,7 +81,7 @@ Status CaseOpLabelMaker::Run(uint32_t &label_index) { if (label == nullptr) { REPORT_CALL_ERROR("E19999", "Add LabelSetEnter node in graph:%s fail", graph->GetName().c_str()); - GELOGE(INTERNAL_ERROR, "Subgraph: %s add label set failed.", graph->GetName().c_str()); + GELOGE(INTERNAL_ERROR, "[Call][AddLabelSetEnter] Subgraph: %s add label set failed.", graph->GetName().c_str()); return FAILED; } switch_labels.emplace_back(curr_label_index); @@ -96,7 +96,8 @@ Status CaseOpLabelMaker::Run(uint32_t &label_index) { if (AddLabelGotoLeave(graph, label_goto_name, last_label_index) == nullptr) { REPORT_CALL_ERROR("E19999", "Add LabelGotoLeave node in graph:%s fail", graph->GetName().c_str()); - GELOGE(INTERNAL_ERROR, "Subgraph: %s add label goto failed.", graph->GetName().c_str()); + GELOGE(INTERNAL_ERROR, "[Call][AddLabelGotoLeave] Subgraph: %s add label goto failed.", + graph->GetName().c_str()); return FAILED; } } else { @@ -105,7 +106,8 @@ Status CaseOpLabelMaker::Run(uint32_t &label_index) { if (AddLabelSetLeave(graph, last_label_name, last_label_index) == nullptr) { REPORT_CALL_ERROR("E19999", "Add LabelSetLeave node in graph:%s fail", graph->GetName().c_str()); - GELOGE(INTERNAL_ERROR, "Subgraph: %s add label set failed.", graph->GetName().c_str()); + GELOGE(INTERNAL_ERROR, "[Call][AddLabelSetLeave] Subgraph: %s add label set failed.", + graph->GetName().c_str()); return FAILED; } } @@ -122,7 +124,8 @@ Status CaseOpLabelMaker::Run(uint32_t &label_index) { if (switch_node == nullptr) { REPORT_CALL_ERROR("E19999", "Add LabelSwitchEnter node in graph:%s fail", first_graph->GetName().c_str()); - GELOGE(INTERNAL_ERROR, "Subgraph: %s add label switch failed.", first_graph->GetName().c_str()); + GELOGE(INTERNAL_ERROR, "[Call][AddLabelSwitchEnter] Subgraph: %s add label switch failed.", + first_graph->GetName().c_str()); return FAILED; } @@ -130,7 +133,7 @@ Status CaseOpLabelMaker::Run(uint32_t &label_index) { if (GraphUtils::AddEdge(switch_node->GetOutControlAnchor(), first_label->GetInControlAnchor()) != SUCCESS) { REPORT_CALL_ERROR("E19999", "Add ctrl edge from %s to %s in graph:%s fail", switch_node->GetName().c_str(), first_label->GetName().c_str(), first_graph->GetName().c_str()); - GELOGE(INTERNAL_ERROR, "LabelSwitchByIndex: Add ctrl edge to %s failed.", first_label->GetName().c_str()); + GELOGE(INTERNAL_ERROR, "[Add][CtrlEdge] to %s failed.", first_label->GetName().c_str()); return FAILED; } @@ -139,7 +142,8 @@ Status CaseOpLabelMaker::Run(uint32_t &label_index) { if (AddLabelSwitchIndex(first_graph, data_name, pred_desc, switch_node, parent_index) == nullptr) { REPORT_CALL_ERROR("E19999", "Add LabelSwitchIndex node in graph:%s fail", first_graph->GetName().c_str()); - GELOGE(INTERNAL_ERROR, "Subgraph: %s add switch input failed.", first_graph->GetName().c_str()); + GELOGE(INTERNAL_ERROR, "[Call][AddLabelSwitchIndex] Subgraph: %s add switch input failed.", + first_graph->GetName().c_str()); return FAILED; } diff --git a/ge/graph/label/if_label_maker.cc b/ge/graph/label/if_label_maker.cc index cf4cdd39..72b33015 100644 --- a/ge/graph/label/if_label_maker.cc +++ b/ge/graph/label/if_label_maker.cc @@ -47,7 +47,7 @@ Status IfOpLabelMaker::Run(uint32_t &label_index) { "then branch graph: %s, else branch graph: %s", if_desc->GetName().c_str(), if_desc->GetType().c_str(), then_branch_name.c_str(), else_branch_name.c_str()); - GELOGE(INTERNAL_ERROR, "Node: %s has invalid subgraph, then branch: %s, else branch: %s.", + GELOGE(INTERNAL_ERROR, "[Check][Param] Node: %s has invalid subgraph, then branch: %s, else branch: %s.", if_desc->GetName().c_str(), then_branch_name.c_str(), else_branch_name.c_str()); return FAILED; } @@ -72,7 +72,7 @@ Status IfOpLabelMaker::Run(uint32_t &label_index) { if (then_stream_active == nullptr) { REPORT_CALL_ERROR("E19999", "Add StreamActive node in graph:%s fail", then_sub_graph->GetName().c_str()); - GELOGE(INTERNAL_ERROR, "Subgraph: %s add stream active failed.", then_sub_graph->GetName().c_str()); + GELOGE(INTERNAL_ERROR, "[Add][StreamActive] in Subgraph:%s failed.", then_sub_graph->GetName().c_str()); return FAILED; } @@ -80,14 +80,14 @@ Status IfOpLabelMaker::Run(uint32_t &label_index) { if (then_enter_label == nullptr) { REPORT_CALL_ERROR("E19999", "Add LabelSetEnter node in graph:%s fail", then_sub_graph->GetName().c_str()); - GELOGE(INTERNAL_ERROR, "Subgraph: %s add label set failed.", then_sub_graph->GetName().c_str()); + GELOGE(INTERNAL_ERROR, "[Add][LabelSetEnter] in Subgraph:%s failed.", then_sub_graph->GetName().c_str()); return FAILED; } if (AddLabelGotoLeave(then_sub_graph, then_leave_name, else_leave_index) == nullptr) { REPORT_CALL_ERROR("E19999", "Add LabelGotoLeave node in graph:%s fail", then_sub_graph->GetName().c_str()); - GELOGE(INTERNAL_ERROR, "Subgraph: %s add label goto failed.", then_sub_graph->GetName().c_str()); + GELOGE(INTERNAL_ERROR, "[Add][LabelGotoLeave] in Subgraph:%s failed.", then_sub_graph->GetName().c_str()); return FAILED; } @@ -95,20 +95,20 @@ Status IfOpLabelMaker::Run(uint32_t &label_index) { if (else_stream_active == nullptr) { REPORT_CALL_ERROR("E19999", "Add StreamActive node in graph:%s fail", else_stream_active->GetName().c_str()); - GELOGE(INTERNAL_ERROR, "Subgraph: %s add stream active failed.", else_sub_graph->GetName().c_str()); + GELOGE(INTERNAL_ERROR, "[Add][StreamActive] in Subgraph:%s failed.", else_sub_graph->GetName().c_str()); return FAILED; } if (AddLabelSetEnter(else_sub_graph, else_enter_name, else_enter_index, else_stream_active) == nullptr) { REPORT_CALL_ERROR("E19999", "Add LabelSetEnter node in graph:%s fail", else_sub_graph->GetName().c_str()); - GELOGE(INTERNAL_ERROR, "Subgraph: %s add label set failed.", else_sub_graph->GetName().c_str()); + GELOGE(INTERNAL_ERROR, "[Add][LabelSetEnter] in Subgraph:%s failed.", else_sub_graph->GetName().c_str()); return FAILED; } if (AddLabelSetLeave(else_sub_graph, else_leave_name, else_leave_index) == nullptr) { REPORT_CALL_ERROR("E19999", "Add LabelSetLeave node in graph:%s fail", else_sub_graph->GetName().c_str()); - GELOGE(INTERNAL_ERROR, "Subgraph: %s add label set failed.", else_sub_graph->GetName().c_str()); + GELOGE(INTERNAL_ERROR, "[Add][LabelSetLeave] in Subgraph:%s failed.", else_sub_graph->GetName().c_str()); return FAILED; } @@ -121,7 +121,7 @@ Status IfOpLabelMaker::Run(uint32_t &label_index) { if (switch_node == nullptr) { REPORT_CALL_ERROR("E19999", "Add LabelSwitchEnter node in graph:%s fail", then_sub_graph->GetName().c_str()); - GELOGE(INTERNAL_ERROR, "Subgraph: %s add label switch failed.", then_sub_graph->GetName().c_str()); + GELOGE(INTERNAL_ERROR, "[Add][LabelSwitchEnter] in Subgraph:%s failed.", then_sub_graph->GetName().c_str()); return FAILED; } @@ -129,7 +129,7 @@ Status IfOpLabelMaker::Run(uint32_t &label_index) { if (GraphUtils::AddEdge(switch_node->GetOutControlAnchor(), then_enter_label->GetInControlAnchor()) != SUCCESS) { REPORT_CALL_ERROR("E19999", "Add ctrl edge from %s to %s in graph:%s fail", switch_node->GetName().c_str(), then_enter_label->GetName().c_str(), then_sub_graph->GetName().c_str()); - GELOGE(INTERNAL_ERROR, "LabelSwitchByIndex: Add ctrl edge to %s failed.", then_enter_label->GetName().c_str()); + GELOGE(INTERNAL_ERROR, "[Add][CtrlEdge] to %s failed.", then_enter_label->GetName().c_str()); return FAILED; } @@ -138,7 +138,7 @@ Status IfOpLabelMaker::Run(uint32_t &label_index) { if (AddLabelSwitchIndex(then_sub_graph, data_name, pred_desc, switch_node, parent_index) == nullptr) { REPORT_CALL_ERROR("E19999", "Add LabelSwitchIndex node in graph:%s fail", then_sub_graph->GetName().c_str()); - GELOGE(INTERNAL_ERROR, "Subgraph: %s add switch input failed.", then_sub_graph->GetName().c_str()); + GELOGE(INTERNAL_ERROR, "[Add][LabelSwitchIndex] in Subgraph:%s failed.", then_sub_graph->GetName().c_str()); return FAILED; } diff --git a/ge/graph/label/label_maker.cc b/ge/graph/label/label_maker.cc index 156748e8..638cbbae 100644 --- a/ge/graph/label/label_maker.cc +++ b/ge/graph/label/label_maker.cc @@ -58,7 +58,7 @@ void LabelMaker::LinkToGraphHead(const ComputeGraphPtr &graph, const NodePtr &no if (GraphUtils::AddEdge(node->GetOutControlAnchor(), n->GetInControlAnchor()) != SUCCESS) { REPORT_CALL_ERROR("E19999", "Add ctrl edge from %s to %s in graph:%s fail", node->GetName().c_str(), n->GetName().c_str(), graph->GetName().c_str()); - GELOGE(INTERNAL_ERROR, "Add ctrl edge from %s to %s failed.", node->GetName().c_str(), n->GetName().c_str()); + GELOGE(INTERNAL_ERROR, "[Add][CtrlEdge] from %s to %s failed.", node->GetName().c_str(), n->GetName().c_str()); } } } @@ -82,7 +82,7 @@ void LabelMaker::LinkToGraphTail(const ComputeGraphPtr &graph, const NodePtr &no if (GraphUtils::AddEdge(tail->GetOutControlAnchor(), node->GetInControlAnchor()) != SUCCESS) { REPORT_CALL_ERROR("E19999", "Add ctrl edge from %s to %s in graph:%s fail", tail->GetName().c_str(), node->GetName().c_str(), graph->GetName().c_str()); - GELOGE(INTERNAL_ERROR, "Add ctrl edge from %s to %s failed.", tail->GetName().c_str(), node->GetName().c_str()); + GELOGE(INTERNAL_ERROR, "[Add][CtrlEdge] from %s to %s failed.", tail->GetName().c_str(), node->GetName().c_str()); } return; } @@ -101,7 +101,7 @@ NodePtr LabelMaker::AddStreamActive(const ComputeGraphPtr &graph, const std::str const auto &node_list = graph->GetDirectNode(); if (node_list.empty()) { REPORT_INNER_ERROR("E19999", "Check param graph:%s has no node", graph->GetName().c_str()); - GELOGE(INTERNAL_ERROR, "LabelSet: Graph %s node is empty.", graph->GetName().c_str()); + GELOGE(INTERNAL_ERROR, "[Check][Param] LabelSet: Graph %s node is empty.", graph->GetName().c_str()); return nullptr; } @@ -137,7 +137,7 @@ NodePtr LabelMaker::AddLabelSetEnter(const ComputeGraphPtr &graph, const std::st const auto &node_list = graph->GetDirectNode(); if (node_list.empty()) { REPORT_INNER_ERROR("E19999", "Check param graph:%s has no node", graph->GetName().c_str()); - GELOGE(INTERNAL_ERROR, "LabelSet: Graph %s node is empty.", graph->GetName().c_str()); + GELOGE(INTERNAL_ERROR, "[Check][Param] LabelSet: Graph %s node is empty.", graph->GetName().c_str()); return nullptr; } @@ -153,7 +153,7 @@ NodePtr LabelMaker::AddLabelSetEnter(const ComputeGraphPtr &graph, const std::st if (GraphUtils::AddEdge(label_set->GetOutControlAnchor(), stream_active->GetInControlAnchor()) != SUCCESS) { REPORT_CALL_ERROR("E19999", "Add ctrl edge from %s to %s in graph:%s fail", label_set->GetName().c_str(), stream_active->GetName().c_str(), graph->GetName().c_str()); - GELOGE(INTERNAL_ERROR, "Add ctrl edge from %s to %s failed.", label_set->GetName().c_str(), + GELOGE(INTERNAL_ERROR, "[Add][CtrlEdge] from %s to %s failed.", label_set->GetName().c_str(), stream_active->GetName().c_str()); return nullptr; } @@ -202,7 +202,7 @@ NodePtr LabelMaker::AddLabelGotoEnter(const ComputeGraphPtr &graph, const std::s auto it = node_list.begin(); if (it == node_list.end()) { REPORT_INNER_ERROR("E19999", "Check param graph:%s has no node", graph->GetName().c_str()); - GELOGE(INTERNAL_ERROR, "LabelGoto: Graph %s node is empty.", graph->GetName().c_str()); + GELOGE(INTERNAL_ERROR, "[Check][Param] LabelGoto: Graph %s node is empty.", graph->GetName().c_str()); return nullptr; } @@ -216,7 +216,7 @@ NodePtr LabelMaker::AddLabelGotoEnter(const ComputeGraphPtr &graph, const std::s if (label_goto == nullptr) { REPORT_CALL_ERROR("E19999", "Add node:%s(%s) to graph:%s fail", op_desc->GetName().c_str(), op_desc->GetType().c_str(), graph->GetName().c_str()); - GELOGE(INTERNAL_ERROR, "LabelGoto: Add to graph %s failed.", graph->GetName().c_str()); + GELOGE(INTERNAL_ERROR, "[Add][Node] to graph %s failed.", graph->GetName().c_str()); return nullptr; } @@ -265,7 +265,7 @@ NodePtr LabelMaker::AddLabelSwitchEnter(const ComputeGraphPtr &graph, const std: auto it = node_list.begin(); if (it == node_list.end()) { REPORT_INNER_ERROR("E19999", "Check param graph:%s has no node", graph->GetName().c_str()); - GELOGE(INTERNAL_ERROR, "LabelSwitchByIndex: Graph %s node is empty.", graph->GetName().c_str()); + GELOGE(INTERNAL_ERROR, "[Check][Param] LabelSwitchByIndex: Graph %s node is empty.", graph->GetName().c_str()); return nullptr; } @@ -277,14 +277,14 @@ NodePtr LabelMaker::AddLabelSwitchEnter(const ComputeGraphPtr &graph, const std: if (op_desc->AddInputDesc(desc) != GRAPH_SUCCESS) { REPORT_CALL_ERROR("E19999", "Add input desc into node:%s(%s) in graph:%s fail", op_desc->GetName().c_str(), op_desc->GetType().c_str(), graph->GetName().c_str()); - GELOGE(INTERNAL_ERROR, "LabelSwitchByIndex: Add input desc failed."); + GELOGE(INTERNAL_ERROR, "[Add][InputDesc] failed."); return nullptr; } if (!AttrUtils::SetListInt(op_desc, ATTR_NAME_LABEL_SWITCH_LIST, labels)) { REPORT_INNER_ERROR("E19999", "Set Attr:%s fail for op:%s(%s)", ATTR_NAME_LABEL_SWITCH_LIST.c_str(), op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(INTERNAL_ERROR, "LabelSwitchByIndex: Add %s failed.", ATTR_NAME_LABEL_SWITCH_INDEX.c_str()); + GELOGE(INTERNAL_ERROR, "[Set][Attr] %s failed.", ATTR_NAME_LABEL_SWITCH_INDEX.c_str()); return nullptr; } @@ -292,7 +292,7 @@ NodePtr LabelMaker::AddLabelSwitchEnter(const ComputeGraphPtr &graph, const std: if (label_switch == nullptr) { REPORT_CALL_ERROR("E19999", "Add node:%s(%s) to graph:%s ahead fail", op_desc->GetName().c_str(), op_desc->GetType().c_str(), graph->GetName().c_str()); - GELOGE(INTERNAL_ERROR, "LabelSwitchByIndex: Add to graph %s failed.", graph->GetName().c_str()); + GELOGE(INTERNAL_ERROR, "[Add][Node] to graph %s failed.", graph->GetName().c_str()); return nullptr; } @@ -320,14 +320,15 @@ NodePtr LabelMaker::AddLabelSwitchLeave(const ComputeGraphPtr &graph, const std: if (op_desc->AddInputDesc(desc) != GRAPH_SUCCESS) { REPORT_CALL_ERROR("E19999", "Add input desc into node:%s(%s) in graph:%s fail", op_desc->GetName().c_str(), op_desc->GetType().c_str(), graph->GetName().c_str()); - GELOGE(INTERNAL_ERROR, "LabelSwitchByIndex: Add input desc failed."); + GELOGE(INTERNAL_ERROR, "[Add][InputDesc] into node:%s(%s) in graph:%s fail", + op_desc->GetName().c_str(), op_desc->GetType().c_str(), graph->GetName().c_str()); return nullptr; } if (!AttrUtils::SetListInt(op_desc, ATTR_NAME_LABEL_SWITCH_LIST, labels)) { REPORT_INNER_ERROR("E19999", "Set Attr:%s fail for op:%s(%s)", ATTR_NAME_LABEL_SWITCH_LIST.c_str(), op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(INTERNAL_ERROR, "LabelSwitchByIndex: Add %s failed.", ATTR_NAME_LABEL_SWITCH_INDEX.c_str()); + GELOGE(INTERNAL_ERROR, "[Set][Attr] %s failed.", ATTR_NAME_LABEL_SWITCH_INDEX.c_str()); return nullptr; } @@ -360,20 +361,23 @@ NodePtr LabelMaker::AddLabelSwitchIndex(const ComputeGraphPtr &graph, const std: if (op_desc->AddInputDesc(desc) != GRAPH_SUCCESS) { REPORT_CALL_ERROR("E19999", "Add input desc into node:%s(%s) in graph:%s fail", op_desc->GetName().c_str(), op_desc->GetType().c_str(), graph->GetName().c_str()); - GELOGE(INTERNAL_ERROR, "LabelSwitchByIndex: Add data input desc failed."); + GELOGE(INTERNAL_ERROR, "[Add][InputDesc] into node:%s(%s) in graph:%s fail", + op_desc->GetName().c_str(), op_desc->GetType().c_str(), graph->GetName().c_str()); return nullptr; } if (op_desc->AddOutputDesc(desc) != GRAPH_SUCCESS) { REPORT_CALL_ERROR("E19999", "Add output desc into node:%s(%s) in graph:%s fail", op_desc->GetName().c_str(), op_desc->GetType().c_str(), graph->GetName().c_str()); - GELOGE(INTERNAL_ERROR, "LabelSwitchByIndex: Add data output desc failed."); + GELOGE(INTERNAL_ERROR, "[Add][OutputDesc] into node:%s(%s) in graph:%s fail", + op_desc->GetName().c_str(), op_desc->GetType().c_str(), graph->GetName().c_str()); return nullptr; } if (!AttrUtils::SetInt(op_desc, ATTR_NAME_PARENT_NODE_INDEX, parent_index)) { REPORT_INNER_ERROR("E19999", "Set Attr:%s fail for op:%s(%s)", ATTR_NAME_PARENT_NODE_INDEX.c_str(), op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(INTERNAL_ERROR, "LabelSwitchByIndex: Add %s failed.", ATTR_NAME_PARENT_NODE_INDEX.c_str()); + GELOGE(INTERNAL_ERROR, "[Set][Attr] %s fail for op:%s(%s)", ATTR_NAME_PARENT_NODE_INDEX.c_str(), + op_desc->GetName().c_str(), op_desc->GetType().c_str()); return nullptr; } NodePtr op_data = graph->AddNodeFront(op_desc); @@ -384,7 +388,7 @@ NodePtr LabelMaker::AddLabelSwitchIndex(const ComputeGraphPtr &graph, const std: if (GraphUtils::AddEdge(op_data->GetOutDataAnchor(0), sw_node->GetInDataAnchor(0)) != SUCCESS) { REPORT_CALL_ERROR("E19999", "Add ctrl edge from %s to %s in graph:%s fail", op_data->GetName().c_str(), sw_node->GetName().c_str(), graph->GetName().c_str()); - GELOGE(INTERNAL_ERROR, "LabelSwitchByIndex: Add input edge to %s failed.", op_data->GetName().c_str()); + GELOGE(INTERNAL_ERROR, "[Add][CtrlEdge] to %s failed.", op_data->GetName().c_str()); return nullptr; } diff --git a/ge/graph/label/partitioned_call_label_maker.cc b/ge/graph/label/partitioned_call_label_maker.cc index d9a89ef2..7b4bcbd8 100644 --- a/ge/graph/label/partitioned_call_label_maker.cc +++ b/ge/graph/label/partitioned_call_label_maker.cc @@ -41,7 +41,7 @@ Status PartitionedCallLabelMaker::Run(uint32_t &label_index) { if (sub_graph_name.empty()) { REPORT_INNER_ERROR("E19999", "Node:%s(%s) subgraph_index:%d name is empty, check invalid", call_desc->GetName().c_str(), call_desc->GetType().c_str(), kSubGraphIndex); - GELOGE(INTERNAL_ERROR, "Node: %s has no subgraph name.", sub_graph_name.c_str()); + GELOGE(INTERNAL_ERROR, "[Check][Param] Node:%s has no subgraph name.", sub_graph_name.c_str()); return FAILED; } @@ -50,7 +50,7 @@ Status PartitionedCallLabelMaker::Run(uint32_t &label_index) { REPORT_INNER_ERROR("E19999", "Node:%s(%s) subgraph_name:%s is not exist in parent_graph, check invalid", call_desc->GetName().c_str(), call_desc->GetType().c_str(), sub_graph_name.c_str()); - GELOGE(INTERNAL_ERROR, "Node: %s has no subgraph.", sub_graph_name.c_str()); + GELOGE(INTERNAL_ERROR, "[Get][SubGraph] Node:%s has no subgraph.", sub_graph_name.c_str()); return FAILED; } @@ -59,7 +59,7 @@ Status PartitionedCallLabelMaker::Run(uint32_t &label_index) { if (stream_active == nullptr) { REPORT_CALL_ERROR("E19999", "Add StreamActive node in graph:%s fail", sub_graph->GetName().c_str()); - GELOGE(INTERNAL_ERROR, "Subgraph: %s add stream active node failed.", sub_graph->GetName().c_str()); + GELOGE(INTERNAL_ERROR, "[Add][StreamActive] in Subgraph:%s failed.", sub_graph->GetName().c_str()); return FAILED; } diff --git a/ge/graph/label/while_label_maker.cc b/ge/graph/label/while_label_maker.cc index 22e783e3..cd6b3743 100644 --- a/ge/graph/label/while_label_maker.cc +++ b/ge/graph/label/while_label_maker.cc @@ -47,7 +47,7 @@ Status WhileOpLabelMaker::Run(uint32_t &label_index) { REPORT_INNER_ERROR("E19999", "Node:%s(%s) cond subgraph index:%d or body subgraph index:%d name is empty, " "check invalid", while_desc->GetName().c_str(), while_desc->GetType().c_str(), kCondBranchIndex, kBodyBranchIndex); - GELOGE(INTERNAL_ERROR, "Node: %s has invalid subgraph, cond branch: %s, body branch: %s.", + GELOGE(INTERNAL_ERROR, "[Check][Param] Node: %s has invalid subgraph, cond branch: %s, body branch: %s.", while_desc->GetName().c_str(), cond_name.c_str(), body_name.c_str()); return FAILED; } @@ -72,14 +72,14 @@ Status WhileOpLabelMaker::Run(uint32_t &label_index) { if (cond_stream_active == nullptr) { REPORT_CALL_ERROR("E19999", "Add StreamActive node in graph:%s fail", cond_graph->GetName().c_str()); - GELOGE(INTERNAL_ERROR, "Subgraph: %s add stream active failed.", cond_graph->GetName().c_str()); + GELOGE(INTERNAL_ERROR, "[Add][StreamActive] in Subgraph:%s failed.", cond_graph->GetName().c_str()); return FAILED; } if (AddLabelSetEnter(cond_graph, cond_enter_name, cond_enter_index, cond_stream_active) == nullptr) { REPORT_CALL_ERROR("E19999", "Add LabelSetEnter node in graph:%s fail", cond_graph->GetName().c_str()); - GELOGE(INTERNAL_ERROR, "Subgraph: %s add label set failed.", cond_graph->GetName().c_str()); + GELOGE(INTERNAL_ERROR, "[Add][LabelSetEnter] in Subgraph:%s failed.", cond_graph->GetName().c_str()); return FAILED; } @@ -87,28 +87,28 @@ Status WhileOpLabelMaker::Run(uint32_t &label_index) { if (body_stream_active == nullptr) { REPORT_CALL_ERROR("E19999", "Add StreamActive node in graph:%s fail", body_graph->GetName().c_str()); - GELOGE(INTERNAL_ERROR, "Subgraph: %s add stream active failed.", body_graph->GetName().c_str()); + GELOGE(INTERNAL_ERROR, "[Add][StreamActive] in Subgraph:%s failed.", body_graph->GetName().c_str()); return FAILED; } if (AddLabelSetEnter(body_graph, body_enter_name, body_enter_index, body_stream_active) == nullptr) { REPORT_CALL_ERROR("E19999", "Add LabelSetEnter node in graph:%s fail", body_graph->GetName().c_str()); - GELOGE(INTERNAL_ERROR, "Subgraph: %s add label set failed.", body_graph->GetName().c_str()); + GELOGE(INTERNAL_ERROR, "[Add][LabelSetEnter] in Subgraph:%s failed.", body_graph->GetName().c_str()); return FAILED; } if (AddLabelGotoLeave(body_graph, goto_leave_name, cond_enter_index) == nullptr) { REPORT_CALL_ERROR("E19999", "Add LabelGotoLeave node in graph:%s fail", body_graph->GetName().c_str()); - GELOGE(INTERNAL_ERROR, "Subgraph: %s add label goto failed.", body_graph->GetName().c_str()); + GELOGE(INTERNAL_ERROR, "[Add][LabelGotoLeave] in Subgraph:%s failed.", body_graph->GetName().c_str()); return FAILED; } if (AddLabelSetLeave(body_graph, body_leave_name, body_leave_index) == nullptr) { REPORT_CALL_ERROR("E19999", "Add LabelSetLeave node in graph:%s fail", body_graph->GetName().c_str()); - GELOGE(INTERNAL_ERROR, "Subgraph: %s add label set failed.", body_graph->GetName().c_str()); + GELOGE(INTERNAL_ERROR, "[Add][LabelSetLeave] in Subgraph:%s failed.", body_graph->GetName().c_str()); return FAILED; } @@ -126,14 +126,14 @@ Status WhileOpLabelMaker::Run(uint32_t &label_index) { if (switch_node == nullptr) { REPORT_CALL_ERROR("E19999", "Add LabelSwitchLeave node in graph:%s fail", cond_graph->GetName().c_str()); - GELOGE(INTERNAL_ERROR, "Subgraph: %s add label switch failed.", cond_graph->GetName().c_str()); + GELOGE(INTERNAL_ERROR, "[Add][LabelSwitchLeave] in Subgraph:%s failed.", cond_graph->GetName().c_str()); return FAILED; } // link Data input. const auto &all_in_data = cond_out_node->GetAllInDataAnchors(); if (all_in_data.size() != kCondOutputNum) { - GELOGE(FAILED, "Node: %s Cond sbugraph output size:%zu should equal size:%u.", + GELOGE(FAILED, "[Check][Param] Node: %s Cond sbugraph output size:%zu should equal size:%u.", switch_node->GetName().c_str(), all_in_data.size(), kCondOutputNum); return FAILED; } @@ -144,7 +144,7 @@ Status WhileOpLabelMaker::Run(uint32_t &label_index) { REPORT_CALL_ERROR("E19999", "Add ctrl edge from %s to %s in graph:%s fail", in_anchor->GetPeerOutAnchor()->GetOwnerNode()->GetName().c_str(), switch_node->GetName().c_str(), cond_graph->GetName().c_str()); - GELOGE(FAILED, "Node: %s Add pred data input failed.", switch_node->GetName().c_str()); + GELOGE(FAILED, "[Add][PredDataInput] to Node:%s failed.", switch_node->GetName().c_str()); return FAILED; } diff --git a/ge/graph/load/model_manager/cpu_queue_schedule.cc b/ge/graph/load/model_manager/cpu_queue_schedule.cc index c92e2a04..91f54a55 100644 --- a/ge/graph/load/model_manager/cpu_queue_schedule.cc +++ b/ge/graph/load/model_manager/cpu_queue_schedule.cc @@ -53,7 +53,7 @@ Status CpuTaskModelDequeue::Init(uint32_t queue_id, uintptr_t &in_mbuf) { if ((args_ != nullptr) || (args_size_ > 0)) { REPORT_INNER_ERROR("E19999", "Param args_ is not nullptr or args_size_:%u > 0," "check invalid", args_size_); - GELOGE(FAILED, "Task already initialized, size: %u", args_size_); + GELOGE(FAILED, "[Check][Param] Task already initialized, size:%u", args_size_); return FAILED; } @@ -62,7 +62,7 @@ Status CpuTaskModelDequeue::Init(uint32_t queue_id, uintptr_t &in_mbuf) { if (status != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMalloc failed, size:%u, ret:0x%X", args_size_, status); - GELOGE(RT_FAILED, "Call rt malloc failed, status: 0x%x", status); + GELOGE(RT_FAILED, "[Call][RtMalloc] failed, status:0x%x", status); return RT_ERROR_TO_GE_STATUS(status); } in_mbuf = reinterpret_cast(args_) + sizeof(MbufQueueInfo); @@ -75,7 +75,7 @@ Status CpuTaskModelDequeue::Init(uint32_t queue_id, uintptr_t &in_mbuf) { if (status != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMemcpy failed, size:%u, ret:0x%X", args_size_, status); - GELOGE(RT_FAILED, "Call rt memcpy failed, status: 0x%x", status); + GELOGE(RT_FAILED, "[Call][RtMemcpy] failed, status:0x%x", status); return RT_ERROR_TO_GE_STATUS(status); } @@ -86,7 +86,7 @@ Status CpuTaskModelDequeue::Distribute() { if ((args_ == nullptr) || (args_size_ == 0) || (stream_ == nullptr)) { REPORT_INNER_ERROR("E19999", "Param args_ is nullptr or args_size_:%u is 0 or stream_ is nullptr," "check invalid", args_size_); - GELOGE(FAILED, "Task not initialized, distribute failed, size: %u", args_size_); + GELOGE(FAILED, "[Check][Param] Task not initialized, distribute failed, size:%u", args_size_); return FAILED; } @@ -94,7 +94,7 @@ Status CpuTaskModelDequeue::Distribute() { if (status != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtCpuKernelLaunch failed, ret:0x%X", status); - GELOGE(RT_FAILED, "Call rt CpuKernelLaunch ModelDequeue failed, status: 0x%X", status); + GELOGE(RT_FAILED, "[Call][RtCpuKernelLaunch] failed, status:0x%X", status); return RT_ERROR_TO_GE_STATUS(status); } @@ -113,7 +113,7 @@ Status CpuTaskZeroCopy::Init(std::vector &mbuf_list, const map 0)) { REPORT_INNER_ERROR("E19999", "Param args_ is not nullptr or args_size_:%u > 0," "check invalid", args_size_); - GELOGE(FAILED, "Task already initialized, size: %u", args_size_); + GELOGE(FAILED, "[Check][Param] Task already initialized, size:%u", args_size_); return FAILED; } @@ -143,13 +143,13 @@ Status CpuTaskZeroCopy::Init(std::vector &mbuf_list, const map &mbuf_list, const map 0)) { REPORT_INNER_ERROR("E19999", "Param args_ is not nullptr or args_size_:%u > 0," "check invalid", args_size_); - GELOGE(FAILED, "Task already initialized, size: %u", args_size_); + GELOGE(FAILED, "[Check][Param] Task already initialized, size:%u", args_size_); return FAILED; } @@ -226,7 +226,7 @@ Status CpuTaskPrepareOutput::Init(uintptr_t addr, uint32_t size, uintptr_t in_mb if (status != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMalloc failed, size:%u, ret:0x%X", args_size_, status); - GELOGE(RT_FAILED, "Call rt malloc failed, status: 0x%x", status); + GELOGE(RT_FAILED, "[Call][RtMalloc] failed, status:0x%x", status); return RT_ERROR_TO_GE_STATUS(status); } out_mbuf = reinterpret_cast(args_) + sizeof(PrepareOutputInfo); @@ -242,7 +242,7 @@ Status CpuTaskPrepareOutput::Init(uintptr_t addr, uint32_t size, uintptr_t in_mb if (status != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMemcpy failed, size:%u, ret:0x%X", args_size_, status); - GELOGE(RT_FAILED, "Call rt memcpy failed, status: 0x%x", status); + GELOGE(RT_FAILED, "[Call][RtMemcpy] failed, status:0x%x", status); return RT_ERROR_TO_GE_STATUS(status); } @@ -253,7 +253,7 @@ Status CpuTaskPrepareOutput::Distribute() { if ((args_ == nullptr) || (args_size_ == 0) || (stream_ == nullptr)) { REPORT_INNER_ERROR("E19999", "Param args_ is nullptr or args_size_:%u is 0 or stream_ is nullptr," "check invalid", args_size_); - GELOGE(FAILED, "Task not initialized, distribute failed, size: %u", args_size_); + GELOGE(FAILED, "[Check][Param] Task not initialized, distribute failed, size:%u", args_size_); return FAILED; } @@ -261,7 +261,7 @@ Status CpuTaskPrepareOutput::Distribute() { if (status != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtCpuKernelLaunch failed, ret:0x%X", status); - GELOGE(RT_FAILED, "Call rt CpuKernelLaunch PrepareOutput failed, status: 0x%X", status); + GELOGE(RT_FAILED, "[Call][RtCpuKernelLaunch]failed, status:0x%X", status); return RT_ERROR_TO_GE_STATUS(status); } @@ -280,7 +280,7 @@ Status CpuTaskModelEnqueue::Init(uint32_t queue_id, uintptr_t out_mbuf) { if ((args_ != nullptr) || (args_size_ > 0)) { REPORT_INNER_ERROR("E19999", "Param args_ is not nullptr or args_size_:%u > 0," "check invalid", args_size_); - GELOGE(FAILED, "Task already initialized, size: %u", args_size_); + GELOGE(FAILED, "[Check][Param] Task already initialized, size:%u", args_size_); return FAILED; } @@ -290,7 +290,7 @@ Status CpuTaskModelEnqueue::Init(uint32_t queue_id, uintptr_t out_mbuf) { if (status != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMalloc failed, size:%u, ret:0x%X", args_size_, status); - GELOGE(RT_FAILED, "Call rt malloc failed, status: 0x%x", status); + GELOGE(RT_FAILED, "[Call][RtMalloc] failed, status:0x%x", status); return RT_ERROR_TO_GE_STATUS(status); } GE_PRINT_DYNAMIC_MEMORY(rtMalloc, "args data.", args_size_) @@ -302,7 +302,7 @@ Status CpuTaskModelEnqueue::Init(uint32_t queue_id, uintptr_t out_mbuf) { if (status != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMemcpy failed, size:%u, ret:0x%X", args_size_, status); - GELOGE(RT_FAILED, "Call rt memcpy failed, status: 0x%x", status); + GELOGE(RT_FAILED, "[Call][RtMemcpy] failed, status:0x%x", status); return RT_ERROR_TO_GE_STATUS(status); } @@ -313,7 +313,7 @@ Status CpuTaskModelEnqueue::Distribute() { if ((args_ == nullptr) || (args_size_ == 0) || (stream_ == nullptr)) { REPORT_INNER_ERROR("E19999", "Param args_ is nullptr or args_size_ is 0 or stream_ is nullptr, arg_size:%u," "check invalid", args_size_); - GELOGE(FAILED, "Task not initialized, distribute failed, size: %u", args_size_); + GELOGE(FAILED, "[Check][Param] Task not initialized, distribute failed, size:%u", args_size_); return FAILED; } @@ -321,7 +321,7 @@ Status CpuTaskModelEnqueue::Distribute() { if (status != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtCpuKernelLaunch failed, ret:0x%X", status); - GELOGE(RT_FAILED, "Call rt CpuKernelLaunch ModelEnqueue failed, status: 0x%X", status); + GELOGE(RT_FAILED, "[Call][RtCpuKernelLaunch] failed, status:0x%X", status); return RT_ERROR_TO_GE_STATUS(status); } @@ -338,7 +338,7 @@ Status CpuTaskModelEnqueue::Distribute() { Status CpuTaskActiveEntry::Init(rtStream_t stream) { if (stream == nullptr) { REPORT_INNER_ERROR("E19999", "Param stream is nullptr, check invalid"); - GELOGE(FAILED, "Task active stream not valid"); + GELOGE(FAILED, "[Check][Param] Task active stream not valid"); return FAILED; } @@ -350,7 +350,7 @@ Status CpuTaskActiveEntry::Distribute() { if ((active_stream_ == nullptr) || (stream_ == nullptr)) { REPORT_INNER_ERROR("E19999", "Param stream is nullptr or active_stream_ is nullptr, " "check invalid"); - GELOGE(FAILED, "Task not initialized, distribute failed, size: %u", args_size_); + GELOGE(FAILED, "[Check][Param] Task not initialized, distribute failed, size:%u", args_size_); return FAILED; } @@ -358,7 +358,7 @@ Status CpuTaskActiveEntry::Distribute() { if (ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtStreamActive failed, ret:0x%X", ret); - GELOGE(RT_FAILED, "Call rt StreamActive failed, ret: 0x%X", ret); + GELOGE(RT_FAILED, "[Call][RtStreamActive] failed, ret:0x%X", ret); return RT_ERROR_TO_GE_STATUS(ret); } @@ -376,7 +376,7 @@ Status CpuTaskWaitEndGraph::Init(uint32_t model_id) { if ((args_ != nullptr) || (args_size_ > 0)) { REPORT_INNER_ERROR("E19999", "Param args_ is not nullptr or args_size_:%u > 0," "check invalid", args_size_); - GELOGE(FAILED, "Task already initialized, size: %u", args_size_); + GELOGE(FAILED, "[Check][Param] Task already initialized, size:%u", args_size_); return FAILED; } @@ -385,7 +385,7 @@ Status CpuTaskWaitEndGraph::Init(uint32_t model_id) { if (status != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMalloc failed, size:%u, ret:0x%X", args_size_, status); - GELOGE(RT_FAILED, "Call rt malloc failed, status: 0x%x", status); + GELOGE(RT_FAILED, "[Call][RtMalloc] failed, status:0x%x", status); return RT_ERROR_TO_GE_STATUS(status); } GE_PRINT_DYNAMIC_MEMORY(rtMalloc, "args data.", args_size_) @@ -394,7 +394,7 @@ Status CpuTaskWaitEndGraph::Init(uint32_t model_id) { if (status != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMemcpy failed, size:%u, ret:0x%X", args_size_, status); - GELOGE(RT_FAILED, "Call rt memcpy failed, status: 0x%x", status); + GELOGE(RT_FAILED, "[Call][RtMemcpy] failed, status:0x%x", status); return RT_ERROR_TO_GE_STATUS(status); } @@ -405,7 +405,7 @@ Status CpuTaskWaitEndGraph::Distribute() { if ((args_ == nullptr) || (args_size_ == 0) || (stream_ == nullptr)) { REPORT_INNER_ERROR("E19999", "Param args_ is nullptr or args_size_:%u is 0 or stream_ is nullptr," "check invalid", args_size_); - GELOGE(FAILED, "Task not initialized, distribute failed, size: %u", args_size_); + GELOGE(FAILED, "[Check][Param] Task not initialized, distribute failed, size:%u", args_size_); return FAILED; } @@ -413,7 +413,7 @@ Status CpuTaskWaitEndGraph::Distribute() { if (status != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtCpuKernelLaunch failed, ret:0x%X", status); - GELOGE(RT_FAILED, "Call rt CpuKernelLaunch WaitEndGraph failed, status: 0x%X", status); + GELOGE(RT_FAILED, "[Call][RtCpuKernelLaunch] failed, status:0x%X", status); return RT_ERROR_TO_GE_STATUS(status); } @@ -431,7 +431,7 @@ Status CpuTaskModelRepeat::Init(uint32_t model_id) { if ((args_ != nullptr) || (args_size_ > 0)) { REPORT_INNER_ERROR("E19999", "Param args_ is not nullptr or args_size_:%u > 0," "check invalid", args_size_); - GELOGE(FAILED, "Task already initialized, size: %u", args_size_); + GELOGE(FAILED, "[Check][Param] Task already initialized, size:%u", args_size_); return FAILED; } @@ -440,7 +440,7 @@ Status CpuTaskModelRepeat::Init(uint32_t model_id) { if (status != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMalloc failed, size:%u, ret:0x%X", args_size_, status); - GELOGE(RT_FAILED, "Call rt malloc failed, status: 0x%x", status); + GELOGE(RT_FAILED, "[Call][RtMalloc] failed, status:0x%x", status); return RT_ERROR_TO_GE_STATUS(status); } GE_PRINT_DYNAMIC_MEMORY(rtMalloc, "args data.", args_size_) @@ -449,7 +449,7 @@ Status CpuTaskModelRepeat::Init(uint32_t model_id) { if (status != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMemcpy failed, size:%u, ret:0x%X", args_size_, status); - GELOGE(RT_FAILED, "Call rt memcpy failed, status: 0x%x", status); + GELOGE(RT_FAILED, "[Call][RtMemcpy] failed, status:0x%x", status); return RT_ERROR_TO_GE_STATUS(status); } @@ -460,7 +460,7 @@ Status CpuTaskModelRepeat::Distribute() { if ((args_ == nullptr) || (args_size_ == 0) || (stream_ == nullptr)) { REPORT_INNER_ERROR("E19999", "Param args_ is nullptr or args_size_:%u is 0 or stream_ is nullptr," "check invalid", args_size_); - GELOGE(FAILED, "Task not initialized, distribute failed, size: %u", args_size_); + GELOGE(FAILED, "[Check][Param] Task not initialized, distribute failed, size:%u", args_size_); return FAILED; } @@ -468,7 +468,7 @@ Status CpuTaskModelRepeat::Distribute() { if (status != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtCpuKernelLaunch failed, ret:0x%X", status); - GELOGE(RT_FAILED, "Call rt CpuKernelLaunch ModelRepeat failed, status: 0x%x", status); + GELOGE(RT_FAILED, "[Call][RtCpuKernelLaunch] failed, status:0x%x", status); return RT_ERROR_TO_GE_STATUS(status); } diff --git a/ge/graph/load/model_manager/data_dumper.cc b/ge/graph/load/model_manager/data_dumper.cc index c7463001..5712e26b 100644 --- a/ge/graph/load/model_manager/data_dumper.cc +++ b/ge/graph/load/model_manager/data_dumper.cc @@ -127,7 +127,7 @@ void DataDumper::ReleaseDevMem(void **ptr) noexcept { if (*ptr != nullptr) { rtError_t rt_ret = rtFree(*ptr); if (rt_ret != RT_ERROR_NONE) { - GELOGE(RT_FAILED, "Call rtFree failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtFree] failed, ret:0x%X", rt_ret); } *ptr = nullptr; @@ -144,7 +144,7 @@ void DataDumper::SaveDumpInput(const std::shared_ptr &node) { if (node != nullptr) { auto input_op_desc = node->GetOpDesc(); if (input_op_desc == nullptr) { - GELOGE(PARAM_INVALID, "input op desc is null."); + GELOGE(PARAM_INVALID, "[Get][OpDesc] input op desc is null."); return; } @@ -153,7 +153,7 @@ void DataDumper::SaveDumpInput(const std::shared_ptr &node) { ge::NodePtr dst_node = dst_in_data_anchor->GetOwnerNode(); auto op_desc = dst_node->GetOpDesc(); if (op_desc == nullptr) { - GELOGE(PARAM_INVALID, "input op desc is null."); + GELOGE(PARAM_INVALID, "[Get][OpDesc] input op desc is null."); return; } @@ -179,7 +179,7 @@ void DataDumper::SaveOpDebugId(uint32_t task_id, uint32_t stream_id, void *op_de void DataDumper::SaveDumpTask(uint32_t task_id, uint32_t stream_id, const std::shared_ptr &op_desc, uintptr_t args) { if (op_desc == nullptr) { - GELOGE(PARAM_INVALID, "Opdesc is nullptr"); + GELOGE(PARAM_INVALID, "[Check][Param] Opdesc is nullptr"); return; } @@ -190,14 +190,14 @@ void DataDumper::SaveDumpTask(uint32_t task_id, uint32_t stream_id, const std::s InnerInputMapping &inner_input_mapping = iter.first->second; auto &data_op = inner_input_mapping.data_op; if (data_op == nullptr) { - GELOGE(PARAM_INVALID, "data_op is null."); + GELOGE(PARAM_INVALID, "[Check][Param] data_op is null."); return; } auto input_tensor = op_desc->GetInputDescPtr(inner_input_mapping.input_anchor_index); if (input_tensor == nullptr) { - GELOGE(PARAM_INVALID, "input_tensor is null, index: %d, size: %zu.", inner_input_mapping.input_anchor_index, - op_desc->GetInputsSize()); + GELOGE(PARAM_INVALID, "[Get][InputDescPtr] input_tensor is null, index: %d, size: %zu.", + inner_input_mapping.input_anchor_index, op_desc->GetInputsSize()); return; } @@ -205,7 +205,7 @@ void DataDumper::SaveDumpTask(uint32_t task_id, uint32_t stream_id, const std::s if (AttrUtils::GetInt(input_tensor, ATTR_NAME_INPUT_ORIGIN_SIZE, data_size)) { GELOGI("Get aipp data size according to attr is %ld", data_size); } else if (TensorUtils::GetTensorSizeInBytes(*input_tensor, data_size) != SUCCESS) { - GELOGE(PARAM_INVALID, "Get input size filed"); + GELOGE(PARAM_INVALID, "[Get][InputSize] filed"); return; } @@ -249,7 +249,7 @@ Status DataDumper::GenerateOutput(toolkit::aicpu::dump::Output &output, int64_t output_size = 0; if (TensorUtils::GetTensorSizeInBytes(tensor_descs.at(index), output_size) != SUCCESS) { REPORT_CALL_ERROR("E19999", "Get tensor size fail"); - GELOGE(PARAM_INVALID, "Get output size filed"); + GELOGE(PARAM_INVALID, "[Get][OutputSize] filed"); return PARAM_INVALID; } GELOGD("Get output size in dump is %ld", output_size); @@ -274,34 +274,35 @@ Status DataDumper::DumpRefOutput(const DataDumper::InnerDumpInfo &inner_dump_inf size_t index; // parser and find which node's input or output tensor desc is chosen for dump info if (!ParseNameIndex(node_name_index, dump_op_name, input_or_output, index)) { - GELOGE(PARAM_INVALID, "Op [%s] output desc[%zu] with invalid ATTR_DATA_DUMP_REF attr[%s].", + GELOGE(PARAM_INVALID, "[Parse][Name] Op [%s] output desc[%zu] with invalid ATTR_DATA_DUMP_REF attr[%s].", inner_dump_info.op->GetName().c_str(), i, node_name_index.c_str()); return PARAM_INVALID; } GE_CHECK_NOTNULL(compute_graph_); auto replace_node = compute_graph_->FindNode(dump_op_name); GE_RT_PARAM_INVALID_WITH_LOG_IF_TRUE(replace_node == nullptr, - "Op [%s] output desc[%zu] with invalid ATTR_DATA_DUMP_REF attr[%s]," - " cannot find redirect node[%s].", + "[Check][Param] Op [%s] output desc[%zu] with invalid ATTR_DATA_DUMP_REF " + "attr[%s], cannot find redirect node[%s].", inner_dump_info.op->GetName().c_str(), i, node_name_index.c_str(), dump_op_name.c_str()); auto replace_opdesc = replace_node->GetOpDesc(); GE_CHECK_NOTNULL(replace_opdesc); auto iter = ref_info_.find(replace_opdesc); GE_RT_PARAM_INVALID_WITH_LOG_IF_TRUE(iter == ref_info_.end(), - "Op [%s] output desc[%zu] cannot find any saved redirect node[%s]'s info.", + "[Check][Param] Op [%s] output desc[%zu] cannot find " + "any saved redirect node[%s]'s info.", inner_dump_info.op->GetName().c_str(), i, replace_opdesc->GetName().c_str()); GE_CHECK_NOTNULL(iter->second); auto addr = reinterpret_cast(iter->second); if (input_or_output == kDumpInput) { const auto &replace_input_descs = replace_opdesc->GetAllInputsDesc(); addr += kAddrLen * index; - GE_CHK_STATUS_RET(GenerateOutput(output, replace_input_descs, addr, index), "Generate output failed"); + GE_CHK_STATUS_RET(GenerateOutput(output, replace_input_descs, addr, index), "[Generate][Output] failed"); } else if (input_or_output == kDumpOutput) { const auto &replace_output_descs = replace_opdesc->GetAllOutputsDesc(); const auto replace_input_size = replace_opdesc->GetAllInputsDesc().size(); addr += (index + replace_input_size) * kAddrLen; - GE_CHK_STATUS_RET(GenerateOutput(output, replace_output_descs, addr, index), "Generate output failed"); + GE_CHK_STATUS_RET(GenerateOutput(output, replace_output_descs, addr, index), "[Generate][Output] failed"); } GELOGD("Op [%s] output desc[%zu] dump info is replaced by node[%s] [%s] tensor_desc [%zu]", inner_dump_info.op->GetName().c_str(), i, dump_op_name.c_str(), input_or_output.c_str(), index); @@ -314,9 +315,9 @@ Status DataDumper::DumpOutputWithTask(const InnerDumpInfo &inner_dump_info, tool std::vector v_memory_type; bool has_mem_type_attr = ge::AttrUtils::GetListInt(inner_dump_info.op, ATTR_NAME_OUTPUT_MEM_TYPE_LIST, v_memory_type); GE_RT_PARAM_INVALID_WITH_LOG_IF_TRUE(has_mem_type_attr && (v_memory_type.size() != output_descs.size()), - "DumpOutputWithTask[%s], output size[%zu], output memory type size[%zu]", - inner_dump_info.op->GetName().c_str(), output_descs.size(), - v_memory_type.size()); + "[Check][Param] DumpOutputWithTask[%s], output size[%zu], " + "output memory type size[%zu]", inner_dump_info.op->GetName().c_str(), + output_descs.size(), v_memory_type.size()); size_t no_need_dump_output_num = 0; for (size_t i = 0; i < output_descs.size(); ++i) { @@ -338,10 +339,10 @@ Status DataDumper::DumpOutputWithTask(const InnerDumpInfo &inner_dump_info, tool "output which is need to dump.", inner_dump_info.op->GetName().c_str(), inner_dump_info.op->GetType().c_str(), no_need_dump_output_num, output_descs.size(), output_addrs.size()); - GELOGE(PARAM_INVALID, "The number of output does not match in op:%s(%s). The size[%zu] of output which is no need" - " to dump should not greater than the size[%zu] of output descs minus the size[%zu] of output which is " - "need to dump.", inner_dump_info.op->GetName().c_str(), inner_dump_info.op->GetType().c_str(), - no_need_dump_output_num, output_descs.size(), output_addrs.size()); + GELOGE(PARAM_INVALID, "[Check][Param] The number of output does not match in op:%s(%s). The size[%zu] of output " + "which is no need to dump should not greater than the size[%zu] of output descs minus the size[%zu] " + "of output which is need to dump.", inner_dump_info.op->GetName().c_str(), + inner_dump_info.op->GetType().c_str(), no_need_dump_output_num, output_descs.size(), output_addrs.size()); return PARAM_INVALID; } @@ -356,7 +357,7 @@ Status DataDumper::DumpOutputWithTask(const InnerDumpInfo &inner_dump_info, tool if (TensorUtils::GetTensorSizeInBytes(output_descs.at(i), output_size) != SUCCESS) { REPORT_CALL_ERROR("E19999", "Get output tensor size fail in op:%s(%s), index:%zu", inner_dump_info.op->GetName().c_str(), inner_dump_info.op->GetType().c_str(), i); - GELOGE(PARAM_INVALID, "Get output size failed."); + GELOGE(PARAM_INVALID, "[Get][OutputSize] failed."); return PARAM_INVALID; } GELOGI("Get output size of l1_fusion_dump is %ld", output_size); @@ -364,7 +365,7 @@ Status DataDumper::DumpOutputWithTask(const InnerDumpInfo &inner_dump_info, tool } else { const auto input_size = inner_dump_info.op->GetInputsSize(); auto addr = inner_dump_info.args + (i + input_size) * kAddrLen; - GE_CHK_STATUS_RET(GenerateOutput(output, output_descs, addr, i), "Generate output failed"); + GE_CHK_STATUS_RET(GenerateOutput(output, output_descs, addr, i), "[Generate][Output] failed"); task.mutable_output()->Add(std::move(output)); } } @@ -387,8 +388,8 @@ Status DataDumper::DumpOutput(const InnerDumpInfo &inner_dump_info, toolkit::aic "check invalid", inner_dump_info.op->GetName().c_str(), inner_dump_info.op->GetType().c_str(), inner_dump_info.output_anchor_index); - GELOGE(PARAM_INVALID, "output_tensor is null, index: %d, size: %zu.", inner_dump_info.output_anchor_index, - inner_dump_info.op->GetOutputsSize()); + GELOGE(PARAM_INVALID, "[Get][OutputDescPtr] output_tensor is null, index:%d, size:%zu.", + inner_dump_info.output_anchor_index, inner_dump_info.op->GetOutputsSize()); return PARAM_INVALID; } diff --git a/ge/graph/load/model_manager/davinci_model.cc b/ge/graph/load/model_manager/davinci_model.cc index 993400db..a7639e15 100755 --- a/ge/graph/load/model_manager/davinci_model.cc +++ b/ge/graph/load/model_manager/davinci_model.cc @@ -3598,7 +3598,7 @@ Status DavinciModel::InitConstant(const OpDescPtr &op_desc) { GE_IF_BOOL_EXEC(static_cast(v_output_size[0]) < tensor->GetData().size(), REPORT_INNER_ERROR("E19999", "Output size:%zu < weight size:%zu in op:%s(%s) model_id:%u, " "check invalid", v_output_size[0], tensor->GetData().size(), - op_desc->GetName().c_str(), op_desc->GetType().c_str() ,model_id_); + op_desc->GetName().c_str(), op_desc->GetType().c_str(), model_id_); GELOGE(PARAM_INVALID, "output size:%ld less than weight data size:%zu", v_output_size[0], tensor->GetData().size()); return PARAM_INVALID;); @@ -3649,7 +3649,7 @@ Status DavinciModel::InitTbeHandle(const OpDescPtr &op_desc) { auto tbe_kernel = (kernel != nullptr) ? kernel : op_desc->TryGetExtAttr(OP_EXTATTR_NAME_TBE_KERNEL, TBEKernelPtr()); if (tbe_kernel == nullptr) { REPORT_INNER_ERROR("E19999", "Get tbe_kernel for op:%s(%s) fail, model_id:%u", - op_desc->GetName().c_str(), op_desc->GetType().c_str() ,model_id_); + op_desc->GetName().c_str(), op_desc->GetType().c_str(), model_id_); GELOGE(INTERNAL_ERROR, "TBE: %s can't find tvm bin file!", op_desc->GetName().c_str()); return INTERNAL_ERROR; } @@ -3678,7 +3678,7 @@ Status DavinciModel::InitTbeHandle(const OpDescPtr &op_desc) { } else { REPORT_INNER_ERROR("E19999", "Attr:%s value:%s in op:%s(%s), model_id:%u, check invalid", TVM_ATTR_NAME_MAGIC.c_str(), json_string.c_str(), - op_desc->GetName().c_str(), op_desc->GetType().c_str() ,model_id_); + op_desc->GetName().c_str(), op_desc->GetType().c_str(), model_id_); GELOGE(PARAM_INVALID, "TBE: Invalid parameter magic number! json: %s", json_string.c_str()); return PARAM_INVALID; } diff --git a/ge/graph/load/model_manager/task_info/end_graph_task_info.cc b/ge/graph/load/model_manager/task_info/end_graph_task_info.cc index d3c98684..d08ce344 100644 --- a/ge/graph/load/model_manager/task_info/end_graph_task_info.cc +++ b/ge/graph/load/model_manager/task_info/end_graph_task_info.cc @@ -28,13 +28,13 @@ Status EndGraphTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *davin GELOGI("InitEndGraphTaskInfo Init Start."); if (davinci_model == nullptr) { REPORT_INNER_ERROR("E19999", "Check param davinci_model nullptr"); - GELOGE(PARAM_INVALID, "davinci_model is null!"); + GELOGE(PARAM_INVALID, "[Check][Param] davinci_model is null!"); return PARAM_INVALID; } davinci_model_ = davinci_model; Status ret = SetStream(task_def.stream_id(), davinci_model->GetStreamList()); if (ret != SUCCESS) { - GELOGE(ret, "SetStream fail, stream_id:%u", task_def.stream_id()); + GELOGE(ret, "[Set][Stream] fail, stream_id:%u", task_def.stream_id()); return ret; } @@ -51,7 +51,7 @@ Status EndGraphTaskInfo::Distribute() { rtError_t rt_ret = rtEndGraphEx(model_, stream_, kDumpFlag); if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtEndGraphEx failed, ret:0x%X", rt_ret); - GELOGE(RT_FAILED, "Call rtEndGraphEx failed, ret: 0x%x", rt_ret); + GELOGE(RT_FAILED, "[Call][RtEndGraphEx] failed, ret:0x%x", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } } else { @@ -59,7 +59,7 @@ Status EndGraphTaskInfo::Distribute() { rtError_t rt_ret = rtEndGraph(model_, stream_); if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtEndGraph failed, ret:0x%X", rt_ret); - GELOGE(RT_FAILED, "Call rtEndGraph failed, ret: 0x%x", rt_ret); + GELOGE(RT_FAILED, "[Call][RtEndGraph] failed, ret:0x%x", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } } @@ -70,7 +70,7 @@ Status EndGraphTaskInfo::Distribute() { if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtModelGetTaskId failed, ret:0x%X", rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtModelGetTaskId] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } task_id_ = task_id; diff --git a/ge/graph/load/model_manager/task_info/event_record_task_info.cc b/ge/graph/load/model_manager/task_info/event_record_task_info.cc index 13dae9ee..7fd62f44 100755 --- a/ge/graph/load/model_manager/task_info/event_record_task_info.cc +++ b/ge/graph/load/model_manager/task_info/event_record_task_info.cc @@ -24,7 +24,7 @@ Status EventRecordTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *da GELOGI("EventRecordTaskInfo Init Start."); if (davinci_model == nullptr) { REPORT_INNER_ERROR("E19999", "Check param davinci_model nullptr"); - GELOGE(PARAM_INVALID, "davinci_model is null!"); + GELOGE(PARAM_INVALID, "[Check][Param] davinci_model is null!"); return PARAM_INVALID; } @@ -37,7 +37,7 @@ Status EventRecordTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *da if (task_def.event_id() >= eventList.size()) { REPORT_INNER_ERROR("E19999", "Task event_id:%u > model event size:%zu, check invalid", task_def.event_id(), eventList.size()); - GELOGE(INTERNAL_ERROR, "event list size:%zu, cur:%u!", eventList.size(), task_def.event_id()); + GELOGE(INTERNAL_ERROR, "[Check][Param] event list size:%zu, cur:%u!", eventList.size(), task_def.event_id()); return INTERNAL_ERROR; } @@ -52,7 +52,7 @@ Status EventRecordTaskInfo::Distribute() { if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtEventRecord failed, ret:0x%X", rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtEventRecord] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } diff --git a/ge/graph/load/model_manager/task_info/event_wait_task_info.cc b/ge/graph/load/model_manager/task_info/event_wait_task_info.cc index 8fae9225..ca606ff5 100755 --- a/ge/graph/load/model_manager/task_info/event_wait_task_info.cc +++ b/ge/graph/load/model_manager/task_info/event_wait_task_info.cc @@ -24,7 +24,7 @@ Status EventWaitTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *davi GELOGI("EventWaitTaskInfo Init Start."); if (davinci_model == nullptr) { REPORT_INNER_ERROR("E19999", "Check param davinci_model nullptr"); - GELOGE(PARAM_INVALID, "davinci_model is null!"); + GELOGE(PARAM_INVALID, "[Check][Param] davinci_model is null!"); return PARAM_INVALID; } @@ -37,7 +37,7 @@ Status EventWaitTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *davi if (task_def.event_id() >= eventList.size()) { REPORT_INNER_ERROR("E19999", "Task event_id:%u > model event size:%zu, check invalid", task_def.event_id(), eventList.size()); - GELOGE(INTERNAL_ERROR, "event list size:%zu, cur:%u!", eventList.size(), task_def.event_id()); + GELOGE(INTERNAL_ERROR, "[Check][Param] event list size:%zu, cur:%u!", eventList.size(), task_def.event_id()); return INTERNAL_ERROR; } @@ -53,7 +53,7 @@ Status EventWaitTaskInfo::Distribute() { if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtStreamWaitEvent failed, ret:0x%X", rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtStreamWaitEvent] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } @@ -61,7 +61,7 @@ Status EventWaitTaskInfo::Distribute() { if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtEventReset failed, ret:0x%X", rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtEventReset] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } diff --git a/ge/graph/load/model_manager/task_info/fusion_start_task_info.cc b/ge/graph/load/model_manager/task_info/fusion_start_task_info.cc index b47ac097..091a9318 100755 --- a/ge/graph/load/model_manager/task_info/fusion_start_task_info.cc +++ b/ge/graph/load/model_manager/task_info/fusion_start_task_info.cc @@ -24,7 +24,7 @@ Status FusionStartTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *da GELOGI("FusionStartTaskInfo Init Start."); if (davinci_model == nullptr) { REPORT_INNER_ERROR("E19999", "Check param davinci_model nullptr"); - GELOGE(PARAM_INVALID, "davinci_model is null!"); + GELOGE(PARAM_INVALID, "[Check][Param] davinci_model is null!"); return PARAM_INVALID; } @@ -42,7 +42,7 @@ Status FusionStartTaskInfo::Distribute() { if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtKernelFusionStart failed, ret:0x%X", rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtKernelFusionStart] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } diff --git a/ge/graph/load/model_manager/task_info/fusion_stop_task_info.cc b/ge/graph/load/model_manager/task_info/fusion_stop_task_info.cc index 6188cfc8..efce62ad 100755 --- a/ge/graph/load/model_manager/task_info/fusion_stop_task_info.cc +++ b/ge/graph/load/model_manager/task_info/fusion_stop_task_info.cc @@ -24,7 +24,7 @@ Status FusionStopTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *dav GELOGI("FusionStopTaskInfo Init Start."); if (davinci_model == nullptr) { REPORT_INNER_ERROR("E19999", "Check param davinci_model nullptr"); - GELOGE(PARAM_INVALID, "davinci_model is null!"); + GELOGE(PARAM_INVALID, "[Check][Param] davinci_model is null!"); return PARAM_INVALID; } @@ -41,7 +41,7 @@ Status FusionStopTaskInfo::Distribute() { rtError_t rt_ret = rtKernelFusionEnd(stream_); if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtKernelFusionEnd failed, ret:0x%X", rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtKernelFusionEnd] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } diff --git a/ge/graph/load/model_manager/task_info/hccl_task_info.cc b/ge/graph/load/model_manager/task_info/hccl_task_info.cc index 7a435f91..77fcfab1 100644 --- a/ge/graph/load/model_manager/task_info/hccl_task_info.cc +++ b/ge/graph/load/model_manager/task_info/hccl_task_info.cc @@ -31,7 +31,7 @@ HcclTaskInfo::~HcclTaskInfo() { rtError_t ret = rtFreeHost(private_def_); if (ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtFreeHost failed, ret:0x%X", ret); - GELOGE(RT_FAILED, "Call rtFree Fail, ret = 0x%X.", ret); + GELOGE(RT_FAILED, "[Call][RtFree] Fail, ret = 0x%X.", ret); } private_def_ = nullptr; } @@ -43,7 +43,7 @@ Status HcclTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *davinci_m GELOGI("HcclTaskInfo Init Start."); if (davinci_model == nullptr) { REPORT_INNER_ERROR("E19999", "Check param davinci_model nullptr"); - GELOGE(PARAM_INVALID, "davinci_model is null!"); + GELOGE(PARAM_INVALID, "[Check][Param] davinci_model is null!"); return PARAM_INVALID; } davinci_model_ = davinci_model; @@ -71,21 +71,21 @@ Status HcclTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *davinci_m if (ret != SUCCESS) { REPORT_CALL_ERROR("E19999", "Call GetHorovodInputs fail for op:%s(%s)", op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(ret, "davinci_model: GetHorovodInputs fail! domi error: %u", ret); + GELOGE(ret, "[Get][HorovodInputs] fail! domi error:%u", ret); return ret; } Status dmrt = HcomOmeUtil::GetHcclDataType(op_desc, kernel_hccl_infos_); if (dmrt != SUCCESS) { REPORT_CALL_ERROR("E19999", "Call GetHcclDataType fail for op:%s(%s)", op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(dmrt, "davinci_model: GetHcomDataType fail! domi error: %u", dmrt); + GELOGE(dmrt, "[Get][HcomDataType] fail! domi error:%u", dmrt); return dmrt; } dmrt = HcomOmeUtil::GetHcclCount(op_desc, kernel_hccl_infos_); if (dmrt != SUCCESS) { REPORT_CALL_ERROR("E19999", "Call GetHcclCount fail for op:%s(%s)", op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(dmrt, "davinci_model: GetHcomCount fail! domi error: %u", dmrt); + GELOGE(dmrt, "[Get][HcomCount] fail! domi error:%u", dmrt); return dmrt; } // Only HCOMBROADCAST and HVDCALLBACKBROADCAST need to get the rootId @@ -93,14 +93,14 @@ Status HcclTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *davinci_m if (dmrt != SUCCESS) { REPORT_CALL_ERROR("E19999", "Call GetAllRootId fail for op:%s(%s)", op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(dmrt, "davinci_model: Get rootId fail! domi error: %u", dmrt); + GELOGE(dmrt, "[Get][RootId] fail! domi error:%u", dmrt); return dmrt; } // GE's new process: hccl declares the number of streams required, creates a stream by GE, and sends it to hccl ret = SetFollowStream(op_desc, davinci_model); if (ret != SUCCESS) { - GELOGE(ret, "SetStream Fail."); + GELOGE(ret, "[Set][Stream] Fail."); return ret; } @@ -111,13 +111,13 @@ Status HcclTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *davinci_m ret = SetAddrs(op_desc, kernel_hccl_infos_); if (ret != SUCCESS) { - GELOGE(ret, "Setaddrs Fail."); + GELOGE(ret, "[Set][Addrs] Fail."); return ret; } // GE's new process: hccl declares the need for Workspace size, and GE allocates Workspace ret = SetWorkspace(op_desc, kernel_hccl_infos_); if (ret != SUCCESS) { - GELOGE(ret, "SetWorkspace Fail."); + GELOGE(ret, "[Set][Workspace] Fail."); return ret; } @@ -156,7 +156,7 @@ Status HcclTaskInfo::SetFollowStream(const ge::ConstOpDescPtr &op_desc, DavinciM } ret = CreateStream(hccl_stream_num - created_stream_num, davinci_model, main_stream_id); if (ret != SUCCESS) { - GELOGE(RT_FAILED, "Create hccl stream failed."); + GELOGE(RT_FAILED, "[Create][Stream] failed."); return RT_ERROR_TO_GE_STATUS(ret); } } @@ -165,7 +165,7 @@ Status HcclTaskInfo::SetFollowStream(const ge::ConstOpDescPtr &op_desc, DavinciM GELOGI("need to create follow stream for %s with new mainstream %ld.", op_desc->GetName().c_str(), main_stream_id); ret = CreateStream(hccl_stream_num, davinci_model, main_stream_id); if (ret != SUCCESS) { - GELOGE(RT_FAILED, "Create hccl stream failed."); + GELOGE(RT_FAILED, "[Create][Stream] failed."); return RT_ERROR_TO_GE_STATUS(ret); } } @@ -181,7 +181,7 @@ Status HcclTaskInfo::CreateStream(int64_t stream_num, DavinciModel *davinci_mode if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtStreamCreateWithFlags failed, ret:0x%X, stream_idx:%ld, stream_num:%ld", rt_ret, i, stream_num); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtStreamCreateWithFlags] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } // Create slave stream, inactive by default, activated by hccl @@ -189,7 +189,7 @@ Status HcclTaskInfo::CreateStream(int64_t stream_num, DavinciModel *davinci_mode if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtModelBindStream failed, ret:0x%X, stream_idx:%ld, stream_num:%ld", rt_ret, i, stream_num); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtModelBindStream] failed, ret:0x%X", rt_ret); (void)rtStreamDestroy(stream); return RT_ERROR_TO_GE_STATUS(rt_ret); } @@ -207,7 +207,7 @@ Status HcclTaskInfo::Distribute() { GELOGI("HcclTaskInfo Distribute Start. begin to call function LoadTask in hccl."); if (ops_kernel_store_ == nullptr) { REPORT_INNER_ERROR("E19999", "Check param ops_kernel_store_ nullptr"); - GELOGE(INTERNAL_ERROR, "ops kernel store is null."); + GELOGE(INTERNAL_ERROR, "[Check][Param] ops kernel store is null."); return INTERNAL_ERROR; } OpsKernelInfoStore *ops_kernel_info_store = reinterpret_cast(ops_kernel_store_); @@ -217,7 +217,7 @@ Status HcclTaskInfo::Distribute() { auto result = ops_kernel_info_store->LoadTask(ge_task); if (result != HCCL_SUCCESS) { REPORT_CALL_ERROR("E19999", "Call ops_kernel_info_store LoadTask fail"); - GELOGE(INTERNAL_ERROR, "davinci_model : load task fail, return ret: %u", result); + GELOGE(INTERNAL_ERROR, "[Load][Task] fail, return ret:%u", result); return INTERNAL_ERROR; } GELOGI("HcclTaskInfo Distribute Success."); @@ -265,7 +265,7 @@ Status HcclTaskInfo::SetAddrs(const std::shared_ptr &op_desc, std::vector &kernel_hccl_infos) { GE_CHECK_NOTNULL(op_desc); GE_CHK_STATUS_RET(HcomOmeUtil::CheckKernelHcclInfo(op_desc, kernel_hccl_infos), - "HcomOmeUtil:: the number of GETaskKernelHcclInfo is invalid."); + "[Check][Param] HcomOmeUtil:: the number of GETaskKernelHcclInfo is invalid."); GELOGI("Set hccl task input output address, node[%s}, type[%s] kernel_hccl_infos.size[%zu].", op_desc->GetName().c_str(), op_desc->GetType().c_str(), kernel_hccl_infos.size()); if (op_desc->GetType() == HVDWAIT) { @@ -300,7 +300,7 @@ Status HcclTaskInfo::SetAddrs(const std::shared_ptr &op_desc, } else if (hccl_type == HCOMALLREDUCE || hccl_type == HCOMREDUCESCATTER || hccl_type == HVDCALLBACKALLREDUCE || hccl_type == HCOMREDUCE) { GE_CHK_STATUS_RET(HcomOmeUtil::GetHcclOperationType(op_desc, op_type), - "davinci_model: GetHcomOperationType fail!"); + "[Get][HcomOperationType] fail!"); kernel_hccl_infos[i].outputDataAddr = output_data_addr; kernel_hccl_infos[i].opType = op_type; } @@ -334,7 +334,7 @@ void HcclTaskInfo::GetPrivateDefByTaskDef(const domi::TaskDef &task) { if (ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMallocHost failed, ret:0x%X, size:%u", ret, private_def_len_); - GELOGE(RT_FAILED, "Call rtMallocHost Fail, ret = 0x%X.", ret); + GELOGE(RT_FAILED, "[Call][RtMallocHost] Fail, ret = 0x%X.", ret); return; } @@ -343,7 +343,7 @@ void HcclTaskInfo::GetPrivateDefByTaskDef(const domi::TaskDef &task) { if (ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMemcpy failed, ret:0x%X, size:%u", ret, private_def_len_); - GELOGE(RT_FAILED, "Call rtMemcpy Fail, ret = 0x%X.", ret); + GELOGE(RT_FAILED, "[Call][RtMemcpy] Fail, ret = 0x%X.", ret); return; } GELOGI("The first address of the custom info, privateDef=%p.", private_def_); diff --git a/ge/graph/load/model_manager/task_info/kernel_ex_task_info.cc b/ge/graph/load/model_manager/task_info/kernel_ex_task_info.cc index 5b65f57e..0bf33f5b 100644 --- a/ge/graph/load/model_manager/task_info/kernel_ex_task_info.cc +++ b/ge/graph/load/model_manager/task_info/kernel_ex_task_info.cc @@ -48,10 +48,10 @@ Status KernelExTaskInfo::InitTaskExtInfo(const std::string &ext_info, const OpDe num_inputs, num_outputs, unknown_type)); - GE_CHK_BOOL_RET_STATUS(ext_handle != nullptr, FAILED, "Malloc aicpu_ext_handle mem failed!"); + GE_CHK_BOOL_RET_STATUS(ext_handle != nullptr, FAILED, "[Malloc][Memory] for aicpu_ext_handle failed!"); GE_CHK_STATUS_RET(ext_handle->Parse(ext_info), - "Parse kernel ext info failed, kernel_ext_info_size=%zu.", ext_info.size()); - GE_CHK_STATUS_RET(ext_handle->UpdateExecuteMode(true), "UpdateExecuteMode failed."); + "[Parse][KernelExtInfo] failed, kernel_ext_info_size=%zu.", ext_info.size()); + GE_CHK_STATUS_RET(ext_handle->UpdateExecuteMode(true), "[Update][ExecuteMode] failed."); GELOGD("Update aicpu_task ext_info bit_map execute mode to 1."); bool all_shape = false; @@ -62,14 +62,14 @@ Status KernelExTaskInfo::InitTaskExtInfo(const std::string &ext_info, const OpDe auto input_desc = op_desc->MutableInputDesc(i); GE_CHECK_NOTNULL(input_desc); GE_CHK_STATUS_RET(ext_handle->UpdateInputShapeAndType(i, *input_desc), - "Input[%u] update input shape failed.", i); + "[Call][UpdateInputShapeAndType] Input[%u] update input shape failed.", i); } if (unknown_type != DEPEND_COMPUTE) { for (uint32_t j = 0; j < num_outputs; j++) { auto output_desc = op_desc->MutableOutputDesc(j); GE_CHECK_NOTNULL(output_desc); GE_CHK_STATUS_RET(ext_handle->UpdateOutputShapeAndType(j, *output_desc), - "Output[%u] update output shape failed.", j); + "[Call][UpdateOutputShapeAndType] Output[%u] update output shape failed.", j); } } } @@ -77,14 +77,14 @@ Status KernelExTaskInfo::InitTaskExtInfo(const std::string &ext_info, const OpDe GE_IF_BOOL_EXEC(rt_ret != RT_ERROR_NONE, REPORT_CALL_ERROR("E19999", "Call rtMalloc failed, size:%zu, ret:0x%X", ext_info.size(), rt_ret); - GELOGE(RT_FAILED, "rtMalloc ext_info error: 0x%X, size=%zu", rt_ret, ext_info.size()); + GELOGE(RT_FAILED, "[RtMalloc][ExtInfo] error:0x%X, size=%zu", rt_ret, ext_info.size()); return RT_ERROR_TO_GE_STATUS(rt_ret);) rt_ret = rtMemcpy(ext_info_addr_, ext_handle->GetExtInfoLen(), ext_handle->GetExtInfo(), ext_handle->GetExtInfoLen(), RT_MEMCPY_HOST_TO_DEVICE); GE_IF_BOOL_EXEC(rt_ret != RT_ERROR_NONE, REPORT_CALL_ERROR("E19999", "Call rtMemcpy failed, size:%zu, ret:0x%X", ext_handle->GetExtInfoLen(), rt_ret); - GELOGE(RT_FAILED, "rtMemcpy ext_info error: 0x%X, size=%zu", rt_ret, ext_info.size()); + GELOGE(RT_FAILED, "[RtMemcpy][ExtInfo] error:0x%X, size=%zu", rt_ret, ext_info.size()); return RT_ERROR_TO_GE_STATUS(rt_ret);) return SUCCESS; } @@ -107,7 +107,7 @@ Status KernelExTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *davin if (op_desc == nullptr) { REPORT_INNER_ERROR("E19999", "Can't get op_desc from davinci_model by index:%u", op_index); - GELOGE(INTERNAL_ERROR, "Init aicpu task info error, index is out of range!"); + GELOGE(INTERNAL_ERROR, "[Get][Op] by index failed, index is out of range!"); return INTERNAL_ERROR; } @@ -116,7 +116,7 @@ Status KernelExTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *davin if (sizeof(STR_FWK_OP_KERNEL) < kernel_ex_def.args_size()) { REPORT_INNER_ERROR("E19999", "Param kernel_ex_def.args_size():%u > sizeof(STR_FWK_OP_KERNEL):%zu, " "check invalid", kernel_ex_def.args_size(), sizeof(STR_FWK_OP_KERNEL)); - GELOGE(FAILED, "sizeof STR_FWK_OP_KERNEL is: %zu, but args_size is: %u", sizeof(STR_FWK_OP_KERNEL), + GELOGE(FAILED, "[Check][Param] sizeof STR_FWK_OP_KERNEL is: %zu, but args_size is: %u", sizeof(STR_FWK_OP_KERNEL), kernel_ex_def.args_size()); return FAILED; } @@ -125,13 +125,13 @@ Status KernelExTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *davin if (sec_ret != EOK) { REPORT_CALL_ERROR("E19999", "Call memcpy_s fail, size:%zu, ret:0x%X", sizeof(STR_FWK_OP_KERNEL), sec_ret); - GELOGE(FAILED, "memcpy failed, ret: %d", sec_ret); + GELOGE(FAILED, "[Call][Memcpy] failed, ret: %d", sec_ret); return FAILED; } const auto &ext_info = kernel_ex_def.kernel_ext_info(); GE_CHK_STATUS_RET(InitTaskExtInfo(ext_info, op_desc), - "Init aicpu tf_task ext info failed, ext_info size=%zu", ext_info.size()); + "[Init][TaskExtInfo] failed, ext_info size=%zu", ext_info.size()); GELOGI("Node[%s] type[%s] kernel_ext_info size=%zu, ext_info_addr_=%p", op_desc->GetName().c_str(), op_desc->GetType().c_str(), ext_info.size(), ext_info_addr_); @@ -148,7 +148,7 @@ Status KernelExTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *davin davinci_model->SubModelId(), kernel_id) != SUCCESS, REPORT_CALL_ERROR("E19999", "CreateAicpuKernel fail, session_id:%lu, model_id:%u, kernel_id:%lu", session_id, davinci_model->Id(), kernel_id); - GELOGE(FAILED, "CreateAicpuKernel error."); + GELOGE(FAILED, "[Create][AicpuKernel] error."); return FAILED;) // 2.3 Create session GE_CHECK_NOTNULL(ModelManager::GetInstance()); @@ -156,7 +156,7 @@ Status KernelExTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *davin GE_IF_BOOL_EXEC(ret != SUCCESS, REPORT_CALL_ERROR("E19999", "CreateAicpuSession fail, session_id:%lu", session_id); - GELOGE(ret, "CreateAicpuSession error. session id: %lu", session_id); + GELOGE(ret, "[Create][AicpuSession] error. session id:%lu", session_id); return ret;) kernel_buf_size_ = sizeof(STR_FWK_OP_KERNEL); @@ -169,7 +169,7 @@ Status KernelExTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *davin GE_IF_BOOL_EXEC(rt_ret != RT_ERROR_NONE, REPORT_CALL_ERROR("E19999", "Call rtMalloc failed, size:%u, ret:0x%X", kernel_ex_def.task_info_size(), rt_ret); - GELOGE(RT_FAILED, "rtMalloc error, ret: Ox%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMalloc] error, ret:Ox%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret);); rt_ret = rtMemcpy(workspace_base_addr, kernel_ex_def.task_info_size(), kernel_ex_def.task_info().data(), kernel_ex_def.task_info_size(), RT_MEMCPY_HOST_TO_DEVICE); @@ -183,7 +183,7 @@ Status KernelExTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *davin GE_IF_BOOL_EXEC(rt_ret != RT_ERROR_NONE, REPORT_CALL_ERROR("E19999", "Call rtMalloc failed, ret:0x%X, size:%u", rt_ret, kernel_buf_size_); - GELOGE(RT_FAILED, "rtMalloc error: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMalloc] error:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret);) rt_ret = rtMemcpy(kernel_buf_, kernel_buf_size_, static_cast(&fwk_op_kernel), kernel_buf_size_, @@ -191,7 +191,7 @@ Status KernelExTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *davin GE_IF_BOOL_EXEC(rt_ret != RT_ERROR_NONE, REPORT_CALL_ERROR("E19999", "Call rtMemcpy failed, ret:0x%X, size:%u", rt_ret, kernel_buf_size_); - GELOGE(RT_FAILED, "rtMemcpy error, ret: Ox%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMemcpy] error, ret:Ox%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret);) SetIoAddrs(op_desc); @@ -203,7 +203,7 @@ Status KernelExTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *davin // 3. Set workspaceaddr, inputOutputDataAddr Status ge_ret = CopyTaskInfo(kernel_ex_def, rts_param, op_desc); if (ge_ret != SUCCESS) { - GELOGE(ge_ret, "copy task info to workspace failed."); + GELOGE(ge_ret, "[Copy][TaskInfo] to workspace failed."); return ge_ret; } @@ -211,7 +211,7 @@ Status KernelExTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *davin if (workspace_data_addrs.empty()) { REPORT_CALL_ERROR("E19999", "workspace_data_addrs is empty in op:%s(%s), check invalid", op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(FAILED, "workspace_data_addrs is empty."); + GELOGE(FAILED, "[Check][Param] workspace_data_addrs is empty."); return FAILED; } @@ -228,14 +228,14 @@ Status KernelExTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *davin GE_IF_BOOL_EXEC(rt_ret != RT_ERROR_NONE, REPORT_CALL_ERROR("E19999", "Call rtMalloc failed, ret:0x%X, size:%lu", rt_ret, addrs_size); - GELOGE(RT_FAILED, "rtMalloc error, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMalloc] error, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret);) rt_ret = rtMemcpy(input_output_addr_, addrs_size, io_addrs.data(), addrs_size, RT_MEMCPY_HOST_TO_DEVICE); GE_IF_BOOL_EXEC(rt_ret != RT_ERROR_NONE, REPORT_CALL_ERROR("E19999", "Call rtMemcpy failed, ret:0x%X, size:%lu", rt_ret, addrs_size); - GELOGE(RT_FAILED, "rtMemcpy to input_output_addr_ error: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMemcpy] to input_output_addr_ error:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret);) InitDumpTask(input_output_addr_, op_desc); @@ -253,7 +253,7 @@ Status KernelExTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *davin GE_IF_BOOL_EXEC(rt_ret != RT_ERROR_NONE, REPORT_CALL_ERROR("E19999", "Call rtMalloc failed, ret:0x%X, size:%zu", rt_ret, sizeof(STR_FWK_OP_KERNEL)); - GELOGE(RT_FAILED, "rtMalloc error: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMalloc] error:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret);) rt_ret = rtMemcpy(kernel_buf_, sizeof(STR_FWK_OP_KERNEL), static_cast(&fwk_op_kernel), @@ -261,7 +261,7 @@ Status KernelExTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *davin GE_IF_BOOL_EXEC(rt_ret != RT_ERROR_NONE, REPORT_CALL_ERROR("E19999", "Call rtMemcpy failed, ret:0x%X, size:%zu", rt_ret, sizeof(STR_FWK_OP_KERNEL)); - GELOGE(RT_FAILED, "rtMemcpy error, ret: Ox%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMemcpy] error, ret:Ox%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret);) davinci_model_->SetZeroCopyAddr(op_desc, io_addrs, io_addrs.data(), input_output_addr_, addrs_size, 0); @@ -289,7 +289,7 @@ Status KernelExTaskInfo::CalculateArgs(const domi::TaskDef &task_def, DavinciMod if (op_desc == nullptr) { REPORT_INNER_ERROR("E19999", "Can't get op_desc from davinci_model by index:%u", op_index); - GELOGE(INTERNAL_ERROR, "Init aicpu task info error, index is out of range!"); + GELOGE(INTERNAL_ERROR, "[Get][Op] By Index, index is out of range!"); return INTERNAL_ERROR; } args_offset_ = davinci_model->GetTotalArgsSize(); @@ -309,7 +309,8 @@ Status KernelExTaskInfo::CalculateArgs(const domi::TaskDef &task_def, DavinciMod REPORT_INNER_ERROR("E19999", "The output size[%zu] and output index[%u] in op:%s(%s) are inconsistent, " "check invalid", outputs_size, output_index, op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(FAILED, "The output size[%zu] and output index[%u] are inconsistent.", outputs_size, output_index); + GELOGE(FAILED, "[Check][Param] The output size[%zu] and output index[%u] are inconsistent.", + outputs_size, output_index); return FAILED; } fixed_addr_offset_ = davinci_model->GetFixedAddrsSize(peer_input_name); @@ -338,7 +339,7 @@ void KernelExTaskInfo::SetIoAddrs(const OpDescPtr &op_desc) { REPORT_INNER_ERROR("E19999", "The output data addr size[%zu] and output index[%u] in op:%s(%s) are inconsistent" ", check invalid", output_data_addrs.size(), output_index, op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(FAILED, "The output data addr size[%zu] and output index[%u] are inconsistent.", + GELOGE(FAILED, "[Check][Param] The output data addr size[%zu] and output index[%u] are inconsistent.", output_data_addrs.size(), output_index); return; } @@ -372,7 +373,7 @@ Status KernelExTaskInfo::CopyTaskInfo(const domi::KernelExDef &kernel_def, const REPORT_INNER_ERROR("E19999", "Node:%s(%s) workspace addr:%zu or size:%zu empty, check invalid", op_desc->GetName().c_str(), op_desc->GetType().c_str(), workspace_data_addrs.size(), workspace_data_sizes.size()); - GELOGE(FAILED, "Node:%s invalid workspace, addrs is %zu, size is %zu.", op_desc->GetName().c_str(), + GELOGE(FAILED, "[Check][Param] Node:%s invalid workspace, addrs is %zu, size is %zu.", op_desc->GetName().c_str(), workspace_data_addrs.size(), workspace_data_sizes.size()); return FAILED; } @@ -380,7 +381,7 @@ Status KernelExTaskInfo::CopyTaskInfo(const domi::KernelExDef &kernel_def, const if (workspace_data_addrs[0] == nullptr) { REPORT_INNER_ERROR("E19999", "Node:%s(%s) workspace addr is nullptr, check invalid", op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(FAILED, "Node:%s workspace addrs is null.", op_desc->GetName().c_str()); + GELOGE(FAILED, "[Check][Param] Node:%s workspace addrs is null.", op_desc->GetName().c_str()); return FAILED; } @@ -388,7 +389,7 @@ Status KernelExTaskInfo::CopyTaskInfo(const domi::KernelExDef &kernel_def, const REPORT_INNER_ERROR("E19999", "Node:%s(%s) workspace size:%ld < task info size:%d, check invalid", op_desc->GetName().c_str(), op_desc->GetType().c_str(), workspace_data_sizes[0], kernel_def.task_info_size()); - GELOGE(FAILED, "Node:%s workspace size is %ld, task info size is %d.", op_desc->GetName().c_str(), + GELOGE(FAILED, "[Check][Param] Node:%s workspace size is %ld, task info size is %d.", op_desc->GetName().c_str(), workspace_data_sizes[0], kernel_def.task_info_size()); return FAILED; } @@ -398,7 +399,7 @@ Status KernelExTaskInfo::CopyTaskInfo(const domi::KernelExDef &kernel_def, const if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMemcpy failed, ret:0x%X, size:%d", rt_ret, kernel_def.task_info_size()); - GELOGE(RT_FAILED, "rtMemcpy error: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMemcpy] error:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } @@ -411,13 +412,13 @@ Status KernelExTaskInfo::Distribute() { if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtKernelLaunchEx failed, ret:0x%X", rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtKernelLaunchEx] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } if (davinci_model_ == nullptr) { REPORT_INNER_ERROR("E19999", "Check param davinci_model nullptr"); - GELOGE(PARAM_INVALID, "davinci_model_ is null."); + GELOGE(PARAM_INVALID, "[Check][Param] davinci_model_ is null."); return PARAM_INVALID; } @@ -427,7 +428,7 @@ Status KernelExTaskInfo::Distribute() { if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtModelGetTaskId failed, ret:0x%X", rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtModelGetTaskId] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } task_id_ = task_id; diff --git a/ge/graph/load/model_manager/task_info/kernel_task_info.cc b/ge/graph/load/model_manager/task_info/kernel_task_info.cc index 9ac77531..c3ba8d6d 100755 --- a/ge/graph/load/model_manager/task_info/kernel_task_info.cc +++ b/ge/graph/load/model_manager/task_info/kernel_task_info.cc @@ -98,7 +98,7 @@ Status KernelTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *davinci "bin_file_key:%s, ret:0x%X", op_desc_->GetName().c_str(), op_desc_->GetType().c_str(), kernel_def.stub_func().c_str(), rt_ret); - GELOGE(RT_FAILED, "execute rtGetFunctionByName failed. stub_func: %s", + GELOGE(RT_FAILED, "[Execute][RtGetFunctionByName] failed. stub_func:%s", kernel_def.stub_func().c_str()); return RT_ERROR_TO_GE_STATUS(rt_ret);); } else if (kernel_type_ == ccKernelType::TE) { @@ -112,15 +112,16 @@ Status KernelTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *davinci "bin_file_key:%s, ret:0x%X", op_desc_->GetName().c_str(), op_desc_->GetType().c_str(), bin_file_key, rt_ret); - GELOGE(RT_FAILED, "execute rtGetFunctionByName failed. bin_file_key: %s", bin_file_key); + GELOGE(RT_FAILED, "[Execute][RtGetFunctionByName] failed. bin_file_key:%s", bin_file_key); return RT_ERROR_TO_GE_STATUS(rt_ret);); } if (context.origin_op_index_size() > CC_FUSION_OP_MAX) { - REPORT_INNER_ERROR("E19999", "context.origin_op_index_size():%d is more than CC_FUSION_OP_MAX(%d), op:%s(%s) ," + REPORT_INNER_ERROR("E19999", "context.origin_op_index_size():%d is more than CC_FUSION_OP_MAX(%d), op:%s(%s), " "check invalid", context.origin_op_index_size(), CC_FUSION_OP_MAX, op_desc_->GetName().c_str(), op_desc_->GetType().c_str()); - GELOGE(PARAM_INVALID, "context.origin_op_index_size() is more than CC_FUSION_OP_MAX(%d)", CC_FUSION_OP_MAX); + GELOGE(PARAM_INVALID, "[Check][Param] context.origin_op_index_size() is more than CC_FUSION_OP_MAX(%d)", + CC_FUSION_OP_MAX); return PARAM_INVALID; } @@ -132,10 +133,10 @@ Status KernelTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *davinci ctx_.opIndex = context.op_index(); uint16_t *args_offset_tmp = reinterpret_cast(const_cast(context.args_offset().data())); if (context.args_offset().size() / sizeof(uint16_t) < 1) { - REPORT_INNER_ERROR("E19999", "context.args_offset().size():%zu / sizeof(uint16_t) less than 1, op:%s(%s) ," + REPORT_INNER_ERROR("E19999", "context.args_offset().size():%zu / sizeof(uint16_t) less than 1, op:%s(%s), " "check invalid", context.args_offset().size(), op_desc_->GetName().c_str(), op_desc_->GetType().c_str()); - GELOGE(FAILED, "context.args_offset().size() / sizeof(uint16_t) less than 1"); + GELOGE(FAILED, "[Check][Param] context.args_offset().size() / sizeof(uint16_t) less than 1"); return FAILED; } @@ -149,7 +150,7 @@ Status KernelTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *davinci if (kernel_def.args().empty() || args_size_ == 0) { REPORT_INNER_ERROR("E19999", "kernel_def.args() is empty, op:%s(%s), check invalid", op_desc_->GetName().c_str(), op_desc_->GetType().c_str()); - GELOGE(FAILED, "args is null."); + GELOGE(FAILED, "[Check][Param] args is null."); return FAILED; } ret = InitCceTask(kernel_def); @@ -183,7 +184,7 @@ void KernelTaskInfo::UpdateSKTTaskId() { if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtModelGetTaskId failed, ret:0x%X", rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtModelGetTaskId] failed, ret:0x%X", rt_ret); return; } SuperKernelTaskInfo &skt_info = davinci_model_->GetSuperKernelTaskInfo(); @@ -203,7 +204,7 @@ void KernelTaskInfo::UpdateTaskId() { if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtModelGetTaskId failed, ret:0x%X", rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtModelGetTaskId] failed, ret:0x%X", rt_ret); return; } task_id_ = task_id; @@ -214,7 +215,7 @@ void KernelTaskInfo::UpdateTaskId() { Status KernelTaskInfo::SKTFinalize() { UpdateSKTTaskId(); - GE_CHK_STATUS_RET(SaveSKTDumpInfo(), "skt save dump info failed"); + GE_CHK_STATUS_RET(SaveSKTDumpInfo(), "[Save][SKTDumpInfo] failed"); GELOGI("SuperKernel Distribute [skt_id:%u]", skt_id_); SuperKernelTaskInfo &skt_info = davinci_model_->GetSuperKernelTaskInfo(); skt_info.kernel_list.clear(); @@ -260,7 +261,7 @@ Status KernelTaskInfo::SuperKernelLaunch() { if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtKernelLaunchWithFlag failed, ret:0x%X", rt_ret); - GELOGE(RT_FAILED, "SuperKernelLaunch: Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtKernelLaunchWithFlag] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } call_save_dump_ = true; @@ -274,7 +275,7 @@ Status KernelTaskInfo::SuperKernelLaunch() { if (ge_ret != SUCCESS) { REPORT_CALL_ERROR("E19999", "Call SuperKernelFactory init fail, ret:0x%X", ge_ret); - GELOGE(ge_ret, "SuperKernelLaunch: SuperKernelFactory init failed"); + GELOGE(ge_ret, "[Init][SuperKernelFactory] failed"); return ge_ret; } // Call the fuse API @@ -283,7 +284,7 @@ Status KernelTaskInfo::SuperKernelLaunch() { if (ge_ret != SUCCESS) { REPORT_CALL_ERROR("E19999", "Call SuperKernelFactory FuseKernels fail, ret:0x%X", ge_ret); - GELOGE(ge_ret, "SuperKernelLaunch: fuse call failed"); + GELOGE(ge_ret, "[Call][FuseKernels] failed"); return ge_ret; } // Launch a super kernel @@ -292,7 +293,7 @@ Status KernelTaskInfo::SuperKernelLaunch() { if (ge_ret != SUCCESS) { REPORT_CALL_ERROR("E19999", "Call SuperKernelFactory Launch fail, ret:0x%X", ge_ret); - GELOGE(ge_ret, "SuperKernelLaunch: launch failed"); + GELOGE(ge_ret, "[Call][Launch] failed"); return ge_ret; } GELOGI("SuperKernelLaunch: success[skt_kernel_list size[%zu] skt_arg_list[%zu]]", skt_kernel_list.size(), @@ -300,7 +301,7 @@ Status KernelTaskInfo::SuperKernelLaunch() { // record skt addr for release superkernel_dev_nav_table_ = superKernel->GetNavTablePtr(); superkernel_device_args_addr_ = superKernel->GetDeviceArgsPtr(); - GE_CHK_STATUS_RET(SKTFinalize(), "Skt finalize failed"); + GE_CHK_STATUS_RET(SKTFinalize(), "[Call][SKTFinalize] failed"); return SUCCESS; } @@ -331,14 +332,14 @@ Status KernelTaskInfo::SaveSuperKernelInfo() { bool KernelTaskInfo::IsMarkedLastNode() { if (davinci_model_ == nullptr) { REPORT_INNER_ERROR("E19999", "Check param davinci_model nullptr"); - GELOGE(PARAM_INVALID, "davinci_model is null!"); + GELOGE(PARAM_INVALID, "[Check][Param] davinci_model is null!"); return false; } OpDescPtr op_desc = davinci_model_->GetOpByIndex(ctx_.opIndex); if (op_desc == nullptr) { REPORT_INNER_ERROR("E19999", "Can't get op_desc from davinci_model by index:%u", ctx_.opIndex); - GELOGE(INTERNAL_ERROR, "InitTVMTaskInfo error, index is out of range!"); + GELOGE(INTERNAL_ERROR, "[Get][Op] by index failed, index is out of range!"); return false; } bool is_last_node = false; @@ -349,14 +350,14 @@ bool KernelTaskInfo::IsMarkedLastNode() { bool KernelTaskInfo::IsMarkedFirstNode() { if (davinci_model_ == nullptr) { REPORT_INNER_ERROR("E19999", "Check param davinci_model nullptr"); - GELOGE(PARAM_INVALID, "davinci_model is null!"); + GELOGE(PARAM_INVALID, "[Check][Param] davinci_model is null!"); return false; } OpDescPtr op_desc = davinci_model_->GetOpByIndex(ctx_.opIndex); if (op_desc == nullptr) { REPORT_INNER_ERROR("E19999", "Can't get op_desc from davinci_model by index:%u", ctx_.opIndex); - GELOGE(INTERNAL_ERROR, "InitTVMTaskInfo error, index is out of range!"); + GELOGE(INTERNAL_ERROR, "[Get][Op] by index failed, index is out of range!"); return false; } bool is_first_node = false; @@ -381,7 +382,7 @@ Status KernelTaskInfo::SuperKernelDistribute() { if (FirstCallSKTLaunchCheck()) { ret = SuperKernelLaunch(); if (ret != SUCCESS) { - GELOGE(FAILED, "Call SuperKernelLaunch failed!"); + GELOGE(FAILED, "[Call][SuperKernelLaunch] failed!"); return FAILED; } } @@ -389,7 +390,7 @@ Status KernelTaskInfo::SuperKernelDistribute() { // 1.launch before ret = SuperKernelLaunch(); if (ret != SUCCESS) { - GELOGE(ret, "Call SuperKernelLaunch failed!"); + GELOGE(ret, "[Call][SuperKernelLaunch] failed!"); return ret; } // 2.launch current @@ -398,7 +399,7 @@ Status KernelTaskInfo::SuperKernelDistribute() { if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtKernelLaunchWithFlag failed, ret:0x%X", rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtKernelLaunchWithFlag] failed, ret:0x%X", rt_ret); return rt_ret; } call_save_dump_ = true; @@ -407,7 +408,7 @@ Status KernelTaskInfo::SuperKernelDistribute() { } else { ret = SaveSuperKernelInfo(); if (ret != SUCCESS) { - GELOGE(ret, "Call SuperKernelLaunch failed!"); + GELOGE(ret, "[Call][SaveSuperKernelInfo] failed!"); return ret; } } @@ -461,7 +462,7 @@ Status KernelTaskInfo::Distribute() { if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtKernelLaunchWithFlag or rtCpuKernelLaunchWithFlag failed, " "ret:0x%X", rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtApi] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } // set for task_id_ @@ -499,7 +500,7 @@ Status KernelTaskInfo::CopyNoncontinuousArgs(uint16_t offset) { if (sec_ret != EOK) { REPORT_CALL_ERROR("E19999", "Call memcpy_s fail, size:%zu, ret:0x%X", addr_size, sec_ret); - GELOGE(FAILED, "memcpy failed, ret: %d", sec_ret); + GELOGE(FAILED, "[Call][Memcpy] failed, ret:%d", sec_ret); return FAILED; } @@ -508,7 +509,7 @@ Status KernelTaskInfo::CopyNoncontinuousArgs(uint16_t offset) { if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMemcpy failed, size:%u, ret:0x%X", args_size_, rt_ret); - GELOGE(RT_FAILED, "Call rt api(rtMemcpy) failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMemcpy] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } GELOGD("Copy noncontinuous args success, kernel type %d.", kernel_type_); @@ -558,7 +559,7 @@ Status KernelTaskInfo::Release() { ret = (sm_desc_ != nullptr) ? rtMemFreeManaged(sm_desc_) : RT_ERROR_NONE; if (ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMemFreeManaged failed, ret:0x%X", ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", static_cast(ret)); + GELOGE(RT_FAILED, "[Call][RtMemFreeManaged] failed, ret:0x%X", static_cast(ret)); return RT_ERROR_TO_GE_STATUS(ret); } sm_desc_ = nullptr; @@ -590,7 +591,7 @@ Status KernelTaskInfo::UpdateL2Data(const domi::KernelDef &kernel_def) { if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMemAllocManaged failed, ret:0x%X", rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMemAllocManaged] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } @@ -598,7 +599,7 @@ Status KernelTaskInfo::UpdateL2Data(const domi::KernelDef &kernel_def) { if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMemcpy failed, size:%zu, ret:0x%X", sm_desc.size(), rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMemcpy] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } @@ -646,7 +647,7 @@ Status KernelTaskInfo::InitTVMTask(uint16_t offset, const domi::KernelDef &kerne if (sec_ret != EOK) { REPORT_CALL_ERROR("E19999", "Call memcpy_s fail, size:%u, ret:0x%X", args_size_, sec_ret); - GELOGE(FAILED, "memcpy failed, ret: %d", sec_ret); + GELOGE(FAILED, "[Call][Memcpy] failed, ret:%d", sec_ret); return FAILED; } @@ -690,7 +691,7 @@ Status KernelTaskInfo::InitTVMTask(uint16_t offset, const domi::KernelDef &kerne if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMalloc failed, size:%u, ret:0x%X", args_size_, rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMalloc] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } @@ -699,7 +700,7 @@ Status KernelTaskInfo::InitTVMTask(uint16_t offset, const domi::KernelDef &kerne if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMemcpy failed, size:%u, ret:0x%X", args_size_, rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMemcpy] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } @@ -707,7 +708,7 @@ Status KernelTaskInfo::InitTVMTask(uint16_t offset, const domi::KernelDef &kerne REPORT_INNER_ERROR("E19999", "offset:%u >= kernelInfo.argsSize:%u or copy content:%zu beyond applied memory:%u, " "check invalid", offset, args_size_, kAddrLen * tensor_device_addrs.size(), args_size_ - offset); - GELOGE(FAILED, "offset >= kernelInfo.argsSize or copy content beyond applied memory."); + GELOGE(FAILED, "[Check][Param] offset >= kernelInfo.argsSize or copy content beyond applied memory."); return FAILED; } @@ -717,7 +718,7 @@ Status KernelTaskInfo::InitTVMTask(uint16_t offset, const domi::KernelDef &kerne if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMemcpy failed, size:%u, ret:0x%X", args_size_ - offset, rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMemcpy] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } sec_ret = memcpy_s(args_addr.get() + offset, args_size_ - offset, tensor_device_addrs.data(), @@ -725,7 +726,7 @@ Status KernelTaskInfo::InitTVMTask(uint16_t offset, const domi::KernelDef &kerne if (sec_ret != EOK) { REPORT_CALL_ERROR("E19999", "Call memcpy_s failed, size:%u, ret:0x%X", args_size_ - offset, sec_ret); - GELOGE(FAILED, "memcpy failed, ret: %d", sec_ret); + GELOGE(FAILED, "[Call][Memcpy] failed, ret:%d", sec_ret); return FAILED; } skt_dump_args_ = static_cast(args_) + offset; @@ -768,7 +769,7 @@ Status KernelTaskInfo::InitAICPUCustomTask(uint32_t op_index, const domi::Kernel if (op_desc == nullptr) { REPORT_INNER_ERROR("E19999", "Can't get op_desc from davinci_model by index:%u", op_index); - GELOGE(INTERNAL_ERROR, "index is out of range, index: %u", op_index); + GELOGE(INTERNAL_ERROR, "[Get][Op] index is out of range, index:%u", op_index); return INTERNAL_ERROR; } @@ -780,7 +781,7 @@ Status KernelTaskInfo::InitAICPUCustomTask(uint32_t op_index, const domi::Kernel if (ctx_.argsOffset == nullptr) { REPORT_CALL_ERROR("E19999", "New ctx_.argsOffset fail, size:%u, op:%s(%s)", kCustomAicpuArgsLen, op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(PARAM_INVALID, "ctx_.argsOffset is null!"); + GELOGE(PARAM_INVALID, "[Malloc][Memory] ctx_.argsOffset is null!"); return PARAM_INVALID; } @@ -789,7 +790,8 @@ Status KernelTaskInfo::InitAICPUCustomTask(uint32_t op_index, const domi::Kernel "kCustomAicpuArgsLen:%u, op:%s(%s), check invalid", context.args_offset().size(), kCustomAicpuArgsLen, op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(PARAM_INVALID, "context.args_offset().size() / sizeof(uint16_t) is less than kCustomAicpuArgsLen"); + GELOGE(PARAM_INVALID, "[Check][Param] context.args_offset().size() / sizeof(uint16_t) is less " + "than kCustomAicpuArgsLen"); return PARAM_INVALID; } @@ -802,7 +804,7 @@ Status KernelTaskInfo::InitAICPUCustomTask(uint32_t op_index, const domi::Kernel Status ret = StoreInputOutputTensor(input_data_addrs, output_data_addrs, ModelUtils::GetInputDescs(op_desc), ModelUtils::GetOutputDescs(op_desc)); if (ret != SUCCESS) { - GELOGE(ret, "StoreInputOutputTensor Failed"); + GELOGE(ret, "[Store][InputOutputTensor] Failed"); return ret; } @@ -811,7 +813,7 @@ Status KernelTaskInfo::InitAICPUCustomTask(uint32_t op_index, const domi::Kernel if (!AttrUtils::GetBytes(op_desc, ATTR_NAME_OPATTR, buffer)) { REPORT_INNER_ERROR("E19999", "Get Attr:%s in op:%s(%s) fail", ATTR_NAME_OPATTR.c_str(), op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(FAILED, "can't find opattr bytes!."); + GELOGE(FAILED, "[Get][Attr] can't find opattr bytes!."); return FAILED; } @@ -819,7 +821,7 @@ Status KernelTaskInfo::InitAICPUCustomTask(uint32_t op_index, const domi::Kernel if (op_attr_size == 0) { REPORT_INNER_ERROR("E19999", "Attr:%s in op:%s(%s) size is 0, check invalid", ATTR_NAME_OPATTR.c_str(), op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(PARAM_INVALID, "param op_attr_size is out of range"); + GELOGE(PARAM_INVALID, "[Check][Param] param op_attr_size is out of range"); return PARAM_INVALID; } @@ -827,7 +829,7 @@ Status KernelTaskInfo::InitAICPUCustomTask(uint32_t op_index, const domi::Kernel if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMalloc failed for op:%s(%s), size:%u, ret:0x%X", op_desc->GetName().c_str(), op_desc->GetType().c_str(), op_attr_size, rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMalloc] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } @@ -835,7 +837,7 @@ Status KernelTaskInfo::InitAICPUCustomTask(uint32_t op_index, const domi::Kernel if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMemcpy failed for op:%s(%s), size:%u, ret:0x%X", op_desc->GetName().c_str(), op_desc->GetType().c_str(), op_attr_size, rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMemcpy] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } @@ -848,7 +850,7 @@ Status KernelTaskInfo::InitAICPUCustomTask(uint32_t op_index, const domi::Kernel "op:%s(%s) check invalid", i, (uint32_t)ctx_.argsOffset[i], sizeof(uint64_t), kernel_def.args().size(), op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(FAILED, "ctx.argsOffset[%u]: %u + sizeof(uint64_t): %zu >= kernelDef.args().size():%zu", i, + GELOGE(FAILED, "[Check][Param] ctx.argsOffset[%u]:%u + sizeof(uint64_t):%zu >= kernelDef.args().size():%zu", i, (uint32_t)ctx_.argsOffset[i], sizeof(uint64_t), kernel_def.args().size()); return FAILED; } @@ -868,7 +870,7 @@ Status KernelTaskInfo::InitAICPUCustomTask(uint32_t op_index, const domi::Kernel if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMalloc failed for op:%s(%s), size:%u, ret:0x%X", op_desc->GetName().c_str(), op_desc->GetType().c_str(), args_size_, rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMalloc] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } @@ -878,7 +880,7 @@ Status KernelTaskInfo::InitAICPUCustomTask(uint32_t op_index, const domi::Kernel REPORT_CALL_ERROR("E19999", "Call rtMemcpy failed for op:%s(%s), size:%u, ret:0x%X", op_desc->GetName().c_str(), op_desc->GetType().c_str(), kernel_def.args_size(), rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMemcpy] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } @@ -893,12 +895,12 @@ Status KernelTaskInfo::InitCceTask(const domi::KernelDef &kernel_def) { GELOGI("Do InitCCETask"); if (davinci_model_ == nullptr) { REPORT_INNER_ERROR("E19999", "Check param davinci_model nullptr"); - GELOGE(PARAM_INVALID, "davinci_model is null!"); + GELOGE(PARAM_INVALID, "[Check][Param] davinci_model is null!"); return PARAM_INVALID; } Status ret = SetContext(kernel_def); if (ret != SUCCESS) { - GELOGE(ret, "SetContext Fail."); + GELOGE(ret, "[Set][Context] Fail."); return ret; } @@ -908,7 +910,7 @@ Status KernelTaskInfo::InitCceTask(const domi::KernelDef &kernel_def) { if (context.is_flowtable()) { if (flowtable.empty()) { REPORT_INNER_ERROR("E19999", "kernel_def.flowtable is empty, check invalid"); - GELOGE(FAILED, "flowtable is null."); + GELOGE(FAILED, "[Check][Param] flowtable is null."); return FAILED; } } @@ -928,14 +930,14 @@ Status KernelTaskInfo::InitCceTask(const domi::KernelDef &kernel_def) { ret = UpdateCceArgs(sm_desc, flowtable, kernel_def); if (ret != SUCCESS) { - GELOGE(ret, "update cce args fail"); + GELOGE(ret, "[Update][CceArgs] fail"); return ret; } // flowtable ret = SetFlowtable(flowtable, kernel_def); if (ret != SUCCESS) { - GELOGE(ret, "SetFlowtable Fail"); + GELOGE(ret, "[Set][Flowtable] Fail"); return ret; } @@ -944,7 +946,7 @@ Status KernelTaskInfo::InitCceTask(const domi::KernelDef &kernel_def) { if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMalloc failed, size:%u, ret:0x%X", kernel_def.args_size(), rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMalloc] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } GE_PRINT_DYNAMIC_MEMORY(rtMalloc, "cce task physical memory.", kernel_def.args_size()) @@ -954,7 +956,7 @@ Status KernelTaskInfo::InitCceTask(const domi::KernelDef &kernel_def) { if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMemcpy failed, size:%u, ret:0x%X", kernel_def.args_size(), rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMemcpy] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } @@ -964,7 +966,7 @@ Status KernelTaskInfo::InitCceTask(const domi::KernelDef &kernel_def) { if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMemAllocManaged failed, ret:0x%X", rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMemAllocManaged] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } @@ -972,7 +974,7 @@ Status KernelTaskInfo::InitCceTask(const domi::KernelDef &kernel_def) { if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMemcpy failed, size:%zu, ret:0x%X", sm_desc.size(), rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMemcpy] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } } @@ -988,7 +990,7 @@ Status KernelTaskInfo::InitAicpuTask(uint32_t op_index, const domi::KernelDef &k if (op_desc == nullptr) { REPORT_INNER_ERROR("E19999", "Can't get op_desc from davinci_model by index:%u", op_index); - GELOGE(INTERNAL_ERROR, "index is out of range, index: %u", op_index); + GELOGE(INTERNAL_ERROR, "[Get][Op] index is out of range, index:%u", op_index); return INTERNAL_ERROR; } GELOGI("node[%s] test so name %s, kernel name %s", op_desc->GetName().c_str(), so_name_.c_str(), @@ -997,7 +999,7 @@ Status KernelTaskInfo::InitAicpuTask(uint32_t op_index, const domi::KernelDef &k if (kernel_type_ == ccKernelType::CUST_AI_CPU) { bool loaded = false; GE_CHK_STATUS_RET(ModelManager::GetInstance()->LoadCustAicpuSo(op_desc, so_name_, loaded), - "launch cust aicpu so failed"); + "[Launch][CustAicpuSo] failed"); } // copy args to new host memory @@ -1007,7 +1009,7 @@ Status KernelTaskInfo::InitAicpuTask(uint32_t op_index, const domi::KernelDef &k if (sec_ret != EOK) { REPORT_CALL_ERROR("E19999", "Call memcpy_s fail, size:%u, ret:0x%X", args_size_, sec_ret); - GELOGE(FAILED, "memcpy failed, ret: %d", sec_ret); + GELOGE(FAILED, "[Call][Memcpy] failed, ret:%d", sec_ret); return FAILED; } @@ -1015,7 +1017,7 @@ Status KernelTaskInfo::InitAicpuTask(uint32_t op_index, const domi::KernelDef &k const auto &ext_info = kernel_def.kernel_ext_info(); auto init_ret = InitAicpuTaskExtInfo(ext_info); if (init_ret != SUCCESS) { - GELOGE(init_ret, "Init aicpu task ext info failed, ext_info size=%zu", ext_info.size()); + GELOGE(init_ret, "[Init][AicpuTaskExtInfo] failed, ext_info size=%zu", ext_info.size()); return init_ret; } GELOGI("Node[%s] type[%s] kernel_ext_info size=%zu, aicpu_ext_info_addr_=%p", op_desc->GetName().c_str(), @@ -1043,7 +1045,7 @@ Status KernelTaskInfo::InitAicpuTask(uint32_t op_index, const domi::KernelDef &k if (sec_ret != EOK) { REPORT_CALL_ERROR("E19999", "Call memcpy_s fail, size:%lu, ret:0x%X", addrs_size, sec_ret); - GELOGE(FAILED, "memcpy failed, ret: %d", sec_ret); + GELOGE(FAILED, "[Call][Memcpy] failed, ret:%d", sec_ret); return FAILED; } } @@ -1053,7 +1055,7 @@ Status KernelTaskInfo::InitAicpuTask(uint32_t op_index, const domi::KernelDef &k if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMalloc failed for op:%s(%s), size:%u, ret:0x%X", op_desc->GetName().c_str(), op_desc->GetType().c_str(), args_size_, rt_ret); - GELOGE(RT_FAILED, "Call rt api(rtMalloc) failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMalloc] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } GE_PRINT_DYNAMIC_MEMORY(rtMalloc, "cce task physical memory.", args_size_) @@ -1063,7 +1065,7 @@ Status KernelTaskInfo::InitAicpuTask(uint32_t op_index, const domi::KernelDef &k if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMemcpy failed for op:%s(%s), size:%u, ret:0x%X", op_desc->GetName().c_str(), op_desc->GetType().c_str(), args_size_, rt_ret); - GELOGE(RT_FAILED, "Call rt api(rtMemcpy) failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMemcpy] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } InitDumpTask(sizeof(aicpu::AicpuParamHead)); @@ -1108,13 +1110,13 @@ Status KernelTaskInfo::InitAicpuTaskExtInfo(const std::string &ext_info) { num_inputs, num_outputs, unknown_type)); - GE_CHK_BOOL_RET_STATUS(ext_handle != nullptr, FAILED, "Malloc aicpu_ext_handle mem failed!"); + GE_CHK_BOOL_RET_STATUS(ext_handle != nullptr, FAILED, "[Malloc][Memory] for aicpu_ext_handle failed!"); GE_CHK_STATUS_RET(ext_handle->Parse(ext_info), - "Parse kernel ext info failed, kernel_ext_info_size=%zu.", ext_info.size()); + "[Parse][KernelExtInfo] failed, kernel_ext_info_size=%zu.", ext_info.size()); GE_CHK_STATUS_RET(ext_handle->UpdateSessionInfoSessionId(davinci_model_->GetSessionId()), - "Update session info session id failed."); + "[Update][SessionInfoSessionId] failed."); GELOGD("Update aicpu_task ext_info session_info session_id is %lu", davinci_model_->GetSessionId()); - GE_CHK_STATUS_RET(ext_handle->UpdateExecuteMode(true), "UpdateExecuteMode failed."); + GE_CHK_STATUS_RET(ext_handle->UpdateExecuteMode(true), "[Update][ExecuteMode] failed."); GELOGD("Update aicpu_task ext_info bit_map execute mode to 1."); bool all_shape = false; @@ -1125,13 +1127,13 @@ Status KernelTaskInfo::InitAicpuTaskExtInfo(const std::string &ext_info) { auto input_desc = op_desc_->MutableInputDesc(i); GE_CHECK_NOTNULL(input_desc); GE_CHK_STATUS_RET(ext_handle->UpdateInputShapeAndType(i, *input_desc), - "Input[%u] update input shape failed.", i); + "[Call][UpdateInputShapeAndType] Input[%u] update input shape failed.", i); } for (uint32_t j = 0; j < num_outputs; j++) { auto output_desc = op_desc_->MutableOutputDesc(j); GE_CHECK_NOTNULL(output_desc); GE_CHK_STATUS_RET(ext_handle->UpdateOutputShapeAndType(j, *output_desc), - "Output[%u] update output shape failed.", j); + "[Call][UpdateOutputShapeAndType] Output[%u] update output shape failed.", j); } } auto rt_ret = rtMalloc(&aicpu_ext_info_addr_, ext_handle->GetExtInfoLen(), RT_MEMORY_HBM); @@ -1139,7 +1141,7 @@ Status KernelTaskInfo::InitAicpuTaskExtInfo(const std::string &ext_info) { REPORT_CALL_ERROR("E19999", "Call rtMalloc failed for op:%s(%s), size:%zu, ret:0x%X", op_desc_->GetName().c_str(), op_desc_->GetType().c_str(), ext_handle->GetExtInfoLen(), rt_ret); - GELOGE(RT_FAILED, "rtMalloc ext_info error: 0x%X, size=%zu", rt_ret, ext_info.size()); + GELOGE(RT_FAILED, "[RtMalloc][ExtInfo] error:0x%X, size=%zu", rt_ret, ext_info.size()); return RT_ERROR_TO_GE_STATUS(rt_ret); } rt_ret = rtMemcpy(aicpu_ext_info_addr_, ext_handle->GetExtInfoLen(), ext_handle->GetExtInfo(), @@ -1148,7 +1150,7 @@ Status KernelTaskInfo::InitAicpuTaskExtInfo(const std::string &ext_info) { REPORT_CALL_ERROR("E19999", "Call rtMemcpy failed for op:%s(%s), size:%zu, ret:0x%X", op_desc_->GetName().c_str(), op_desc_->GetType().c_str(), ext_handle->GetExtInfoLen(), rt_ret); - GELOGE(RT_FAILED, "rtMemcpy ext_info error: 0x%X, size=%zu", rt_ret, ext_info.size()); + GELOGE(RT_FAILED, "[RtMemcpy][ExtInfo] error:0x%X, size=%zu", rt_ret, ext_info.size()); return RT_ERROR_TO_GE_STATUS(rt_ret); } @@ -1167,7 +1169,7 @@ Status KernelTaskInfo::StoreInputOutputTensor(const std::vector &input_d if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMalloc failed, size:%zu, ret:0x%X", sizeof(opTensor_t) * input_size, rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMalloc] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } @@ -1177,7 +1179,7 @@ Status KernelTaskInfo::StoreInputOutputTensor(const std::vector &input_d if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMemcpy failed, size:%zu, ret:0x%X", sizeof(opTensor_t), rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMemcpy] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } } @@ -1187,7 +1189,7 @@ Status KernelTaskInfo::StoreInputOutputTensor(const std::vector &input_d if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMalloc failed, size:%zu, ret:0x%X", sizeof(opTensor_t) * input_size, rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMalloc] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } @@ -1197,7 +1199,7 @@ Status KernelTaskInfo::StoreInputOutputTensor(const std::vector &input_d if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMemcpy failed, size:%zu, ret:0x%X", kAddrLen * input_size, rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMemcpy] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } } @@ -1207,7 +1209,7 @@ Status KernelTaskInfo::StoreInputOutputTensor(const std::vector &input_d if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMalloc failed, size:%zu, ret:0x%X", sizeof(opTensor_t) * output_size, rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMalloc] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } for (std::size_t i = 0; i < output_size; ++i) { @@ -1216,7 +1218,7 @@ Status KernelTaskInfo::StoreInputOutputTensor(const std::vector &input_d if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMemcpy failed, size:%zu, ret:0x%X", sizeof(opTensor_t), rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMemcpy] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } } @@ -1226,7 +1228,7 @@ Status KernelTaskInfo::StoreInputOutputTensor(const std::vector &input_d if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMalloc failed, size:%zu, ret:0x%X", sizeof(opTensor_t) * output_size, rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMalloc] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } @@ -1236,7 +1238,7 @@ Status KernelTaskInfo::StoreInputOutputTensor(const std::vector &input_d if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMemcpy failed, size:%zu, ret:0x%X", kAddrLen * output_size, rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMemcpy] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } } @@ -1253,7 +1255,7 @@ Status KernelTaskInfo::SetContext(const domi::KernelDef &kernel_def) { ctx_.argsCount = context.args_count(); if (ctx_.argsCount == 0) { REPORT_INNER_ERROR("E19999", "kernel_def.context.args_count is 0, check invalid"); - GELOGE(INTERNAL_ERROR, "check argsCount fail:%u.", ctx_.argsCount); + GELOGE(INTERNAL_ERROR, "[Check][Param] argsCount is %u.", ctx_.argsCount); return INTERNAL_ERROR; } @@ -1261,7 +1263,8 @@ Status KernelTaskInfo::SetContext(const domi::KernelDef &kernel_def) { REPORT_INNER_ERROR("E19999", "param [context.args_offset().size():%zu / sizeof(uint16_t)] " "is less than [ctx_.argsCount:%u], check invalid", context.args_offset().size(), ctx_.argsCount); - GELOGE(PARAM_INVALID, "param [context.args_offset().size() / sizeof(uint16_t)] is less than [ctx_.argsCount]"); + GELOGE(PARAM_INVALID, "[Check][Param] [context.args_offset().size() / sizeof(uint16_t)] is less " + "than [ctx_.argsCount]"); return PARAM_INVALID; } @@ -1270,7 +1273,7 @@ Status KernelTaskInfo::SetContext(const domi::KernelDef &kernel_def) { if (ctx_.argsOffset == nullptr) { REPORT_CALL_ERROR("E19999", "New ctx_.argsOffset fail, size:%u", ctx_.argsCount); - GELOGE(PARAM_INVALID, "(param [ctx_.argsOffset] must not be null."); + GELOGE(PARAM_INVALID, "[Malloc][Memory] param [ctx_.argsOffset] must not be null."); return PARAM_INVALID; } @@ -1288,7 +1291,7 @@ void KernelTaskInfo::FreeRtMem(void **ptr) { rtError_t ret = rtFree(*ptr); if (ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtFree failed, ret:0x%X", ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", ret); + GELOGE(RT_FAILED, "[Call][RtFree] failed, ret:0x%X", ret); } *ptr = nullptr; @@ -1306,7 +1309,7 @@ Status KernelTaskInfo::UpdateCceArgs(std::string &sm_desc, std::string &flowtabl Status status = CceUpdateKernelArgs(context, data_base_addr, weight_base_addr, var_base_addr, sm_desc, flowtable, kernel_def); if (status != SUCCESS) { - GELOGE(status, "Call cce api failed"); + GELOGE(status, "[Call][CceUpdateKernelArgs] failed"); return status; } return SUCCESS; @@ -1337,7 +1340,7 @@ Status KernelTaskInfo::CceUpdateKernelArgs(const domi::KernelContext &context, u GE_IF_BOOL_EXEC(error == nullptr, error = ""); REPORT_INNER_ERROR("E19999", "Failed in dlopen:%s, dlerror:%s", canonicalPath.c_str(), error); - GELOGE(GE_PLGMGR_SO_NOT_EXIST, "Failed in dlopen %s! ", error); + GELOGE(GE_PLGMGR_SO_NOT_EXIST, "[Open][File] failed, reason:%s! ", error); return FAILED; } ccStatus_t cc_ret; @@ -1347,7 +1350,7 @@ Status KernelTaskInfo::CceUpdateKernelArgs(const domi::KernelContext &context, u if (cceUpdateKernelArgs == nullptr) { REPORT_INNER_ERROR("E19999", "No symbol:%s in %s, check invalid", update_kernel_args.c_str(), canonicalPath.c_str()); - GELOGE(FAILED, "Failed to invoke function ccUpdateKernelArgs"); + GELOGE(FAILED, "[Invoke][Function] ccUpdateKernelArgs failed."); if (mmDlclose(handle) != 0) { error = mmDlerror(); GE_IF_BOOL_EXEC(error == nullptr, error = ""); @@ -1373,7 +1376,7 @@ Status KernelTaskInfo::CceUpdateKernelArgs(const domi::KernelContext &context, u if (cc_ret != CC_STATUS_SUCCESS) { REPORT_CALL_ERROR("E19999", "Call cceUpdateKernelArgs fail, ret:0x%X", cc_ret); - GELOGE(CCE_FAILED, "Call cce api failed, ret: 0x%X", cc_ret); + GELOGE(CCE_FAILED, "[Call][CceUpdateKernelArgs] failed, ret:0x%X", cc_ret); return CCE_FAILED; } @@ -1388,7 +1391,7 @@ Status KernelTaskInfo::SetFlowtable(std::string &flowtable, const domi::KernelDe if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMalloc failed, size:%zu, ret:0x%X", flowtable.size(), rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMalloc] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } GE_PRINT_DYNAMIC_MEMORY(rtMalloc, "flowtable refresh of cce scence.", flowtable.size()) @@ -1397,7 +1400,7 @@ Status KernelTaskInfo::SetFlowtable(std::string &flowtable, const domi::KernelDe if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMemcpy failed, size:%zu, ret:0x%X", flowtable.size(), rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMemcpy] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } @@ -1411,7 +1414,8 @@ Status KernelTaskInfo::SetFlowtable(std::string &flowtable, const domi::KernelDe "kernelDef.args().size():%zu, check invalid", (uint32_t)((reinterpret_cast(const_cast(context.args_offset().data())))[0]), sizeof(uint64_t), kernel_def.args().size()); - GELOGE(FAILED, "(context.args_offset().data()))[0]:%u + sizeof(uint64_t):%zu > kernelDef.args().size():%zu", + GELOGE(FAILED, "[Check][Param] (context.args_offset().data()))[0]:%u + sizeof(uint64_t):%zu > " + "kernelDef.args().size():%zu", (uint32_t)((reinterpret_cast(const_cast(context.args_offset().data())))[0]), sizeof(uint64_t), kernel_def.args().size()); return FAILED; diff --git a/ge/graph/load/model_manager/task_info/label_goto_ex_task_info.cc b/ge/graph/load/model_manager/task_info/label_goto_ex_task_info.cc index b858259e..1901b700 100755 --- a/ge/graph/load/model_manager/task_info/label_goto_ex_task_info.cc +++ b/ge/graph/load/model_manager/task_info/label_goto_ex_task_info.cc @@ -40,7 +40,7 @@ Status LabelGotoExTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *da if (op_desc == nullptr) { REPORT_INNER_ERROR("E19999", "Can't get op_desc from davinci_model by index:%u", label_goto.op_index()); - GELOGE(INTERNAL_ERROR, "Task op index:%u out of range!", label_goto.op_index()); + GELOGE(INTERNAL_ERROR, "[Get][Op] Task op index:%u out of range!", label_goto.op_index()); return INTERNAL_ERROR; } @@ -49,8 +49,8 @@ Status LabelGotoExTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *da REPORT_INNER_ERROR("E19999", "Get Attr:%s in op:%s(%s) fail", ATTR_NAME_LABEL_SWITCH_INDEX.c_str(), op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(INTERNAL_ERROR, "LabelGotoExTaskInfo: %s attr [%s] not exist.", - op_desc->GetName().c_str(), ATTR_NAME_LABEL_SWITCH_INDEX.c_str()); + GELOGE(INTERNAL_ERROR, "[Get][Attr] %s in op:%s(%s) fail.", + ATTR_NAME_LABEL_SWITCH_INDEX.c_str(), op_desc->GetName().c_str(), op_desc->GetType().c_str()); return INTERNAL_ERROR; } @@ -63,7 +63,7 @@ Status LabelGotoExTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *da if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMalloc failed for op:%s(%s), size:%lu, ret:0x%X", op_desc->GetName().c_str(), op_desc->GetType().c_str(), sizeof(uint64_t), rt_ret); - GELOGE(RT_FAILED, "Call rtMalloc failed, error: %#x", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMalloc] failed, error:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } @@ -72,7 +72,7 @@ Status LabelGotoExTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *da if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMemcpy failed for op:%s(%s), size:%lu, ret:0x%X", op_desc->GetName().c_str(), op_desc->GetType().c_str(), sizeof(uint64_t), rt_ret); - GELOGE(RT_FAILED, "Call rtMemcpy failed, error: %#x", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMemcpy] failed, error:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } @@ -86,7 +86,7 @@ Status LabelGotoExTaskInfo::Distribute() { GE_CHECK_NOTNULL(index_value_); if (args_size_ == 0) { REPORT_INNER_ERROR("E19999", "Param args_size_ is 0, check fail"); - GELOGE(PARAM_INVALID, "branch max: %u, args size: %u invalid.", kGotoBranchMax, args_size_); + GELOGE(PARAM_INVALID, "[Check][Param] branch max:%u, args size:%u invalid.", kGotoBranchMax, args_size_); return PARAM_INVALID; } @@ -94,7 +94,7 @@ Status LabelGotoExTaskInfo::Distribute() { if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtLabelSwitchByIndex failed, ret:0x%X", rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtLabelSwitchByIndex] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } diff --git a/ge/graph/load/model_manager/task_info/label_set_task_info.cc b/ge/graph/load/model_manager/task_info/label_set_task_info.cc index c8cb7975..a7fb650e 100644 --- a/ge/graph/load/model_manager/task_info/label_set_task_info.cc +++ b/ge/graph/load/model_manager/task_info/label_set_task_info.cc @@ -34,7 +34,7 @@ Status LabelSetTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *davin if (op_desc == nullptr) { REPORT_INNER_ERROR("E19999", "Can't get op_desc from davinci_model by index:%u", label_set.op_index()); - GELOGE(INTERNAL_ERROR, "Task op index:%u out of range!", label_set.op_index()); + GELOGE(INTERNAL_ERROR, "[Get][Op] Task op index:%u out of range!", label_set.op_index()); return INTERNAL_ERROR; } @@ -43,7 +43,7 @@ Status LabelSetTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *davin REPORT_INNER_ERROR("E19999", "Get Attr:%s in op:%s(%s) fail", ATTR_NAME_LABEL_SWITCH_INDEX.c_str(), op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(INTERNAL_ERROR, "LabelSetTaskInfo: %s attr [%s] not exist.", + GELOGE(INTERNAL_ERROR, "[Get][Attr] LabelSetTaskInfo:%s attr [%s] not exist.", op_desc->GetName().c_str(), ATTR_NAME_LABEL_SWITCH_INDEX.c_str()); return INTERNAL_ERROR; } @@ -53,7 +53,8 @@ Status LabelSetTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *davin REPORT_INNER_ERROR("E19999", "lable_index:%u >= label_list.size():%zu in model, op:%s(%s), " "check invalid", label_index, label_list.size(), op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(INTERNAL_ERROR, "LabelSetTaskInfo: Invalid label id:%u, label size:%zu", label_index, label_list.size()); + GELOGE(INTERNAL_ERROR, "[Check][Param] LabelSetTaskInfo: Invalid label id:%u, label size:%zu", + label_index, label_list.size()); return INTERNAL_ERROR; } label_ = label_list[label_index]; @@ -68,7 +69,7 @@ Status LabelSetTaskInfo::Distribute() { if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtLabelSet failed, ret:0x%X", rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtLabelSet] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } diff --git a/ge/graph/load/model_manager/task_info/label_switch_by_index_task_info.cc b/ge/graph/load/model_manager/task_info/label_switch_by_index_task_info.cc index b7ffdb84..e2528351 100644 --- a/ge/graph/load/model_manager/task_info/label_switch_by_index_task_info.cc +++ b/ge/graph/load/model_manager/task_info/label_switch_by_index_task_info.cc @@ -41,7 +41,7 @@ Status LabelSwitchByIndexTaskInfo::Init(const domi::TaskDef &task_def, DavinciMo if (op_desc == nullptr) { REPORT_INNER_ERROR("E19999", "Can't get op_desc from davinci_model by index:%u", label_switch.op_index()); - GELOGE(INTERNAL_ERROR, "Task op index:%u out of range!", label_switch.op_index()); + GELOGE(INTERNAL_ERROR, "[Get][Op] Task op index:%u out of range!", label_switch.op_index()); return INTERNAL_ERROR; } @@ -52,7 +52,7 @@ Status LabelSwitchByIndexTaskInfo::Init(const domi::TaskDef &task_def, DavinciMo REPORT_INNER_ERROR("E19999", "input_data_addr size:%zu != kLabelSwitchIndexNum:%u, op:%s(%s), " "check invalid", input_data_addr.size(), kLabelSwitchIndexNum, op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(INTERNAL_ERROR, "LabelSwitchByIndexTaskInfo: %s invalid addr size: %zu, num: %u!", + GELOGE(INTERNAL_ERROR, "[Check][Param] %s invalid addr size:%zu, num:%u!", op_desc->GetName().c_str(), input_data_addr.size(), kLabelSwitchIndexNum); return INTERNAL_ERROR; } @@ -70,8 +70,8 @@ Status LabelSwitchByIndexTaskInfo::Init(const domi::TaskDef &task_def, DavinciMo REPORT_INNER_ERROR("E19999", "Get Attr:%s in op:%s(%s) fail", ATTR_NAME_LABEL_SWITCH_LIST.c_str(), op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(INTERNAL_ERROR, "LabelSwitchByIndexTaskInfo: %s Get attr %s failed.", op_desc->GetName().c_str(), - ATTR_NAME_LABEL_SWITCH_LIST.c_str()); + GELOGE(INTERNAL_ERROR, "[Get][Attr] %s in op:%s(%s) failed.", ATTR_NAME_LABEL_SWITCH_LIST.c_str(), + op_desc->GetName().c_str(), op_desc->GetType().c_str()); return INTERNAL_ERROR; } @@ -80,7 +80,7 @@ Status LabelSwitchByIndexTaskInfo::Init(const domi::TaskDef &task_def, DavinciMo "check invalid", op_desc->GetName().c_str(), op_desc->GetType().c_str(), label_idx_list.size(), branch_max_); - GELOGE(INTERNAL_ERROR, "LabelSwitchByIndexTaskInfo: %s label index size: %zu, task branch max: %u.", + GELOGE(INTERNAL_ERROR, "[Check][Param] %s label index size:%zu, task branch max:%u.", op_desc->GetName().c_str(), label_idx_list.size(), branch_max_); return INTERNAL_ERROR; } @@ -93,7 +93,7 @@ Status LabelSwitchByIndexTaskInfo::Init(const domi::TaskDef &task_def, DavinciMo REPORT_INNER_ERROR("E19999", "label_id:%u in op:%s(%s) >= label_list.size():%zu in model" "check invalid", label_id, op_desc->GetName().c_str(), op_desc->GetType().c_str(), label_list.size()); - GELOGE(INTERNAL_ERROR, "LabelSwitchByIndexTaskInfo: %s index: %zu, label index: %u, model label size: %zu.", + GELOGE(INTERNAL_ERROR, "[Check][Param] %s index:%zu, label index:%u, model label size:%zu.", op_desc->GetName().c_str(), idx, label_id, label_list.size()); return INTERNAL_ERROR; } @@ -108,7 +108,7 @@ Status LabelSwitchByIndexTaskInfo::Init(const domi::TaskDef &task_def, DavinciMo if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMalloc failed for op:%s(%s), size:%u, ret:0x%X", op_desc->GetName().c_str(), op_desc->GetType().c_str(), args_size_, rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMalloc] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } @@ -116,7 +116,7 @@ Status LabelSwitchByIndexTaskInfo::Init(const domi::TaskDef &task_def, DavinciMo if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtLabelListCpy failed, ret:0x%X", rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtLabelListCpy] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } @@ -131,7 +131,7 @@ Status LabelSwitchByIndexTaskInfo::Distribute() { if (branch_max_ == 0 || args_size_ == 0) { REPORT_INNER_ERROR("E19999", "branch_max_:%u or args_size_:%u is 0" "check invalid", branch_max_, args_size_); - GELOGE(PARAM_INVALID, "branch max: %u, args size: %u invalid.", branch_max_, args_size_); + GELOGE(PARAM_INVALID, "[Check][Param] branch max:%u, args size:%u invalid.", branch_max_, args_size_); return PARAM_INVALID; } @@ -139,7 +139,7 @@ Status LabelSwitchByIndexTaskInfo::Distribute() { if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtLabelSwitchByIndex failed, ret:0x%X", rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtLabelSwitchByIndex] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } @@ -159,7 +159,8 @@ Status LabelSwitchByIndexTaskInfo::CalculateArgs(const domi::TaskDef &task_def, REPORT_INNER_ERROR("E19999", "input size:%zu in op:%s(%s) != kLabelSwitchIndexNum" "check invalid", op_desc->GetInputsSize(), op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(FAILED, "Label switch op only have one data input. Now input size is %zu", op_desc->GetInputsSize()); + GELOGE(FAILED, "[Check][Param] Label switch op only have one data input. Now input size is %zu", + op_desc->GetInputsSize()); return FAILED; } string input_tensor_name = op_desc->GetName(); diff --git a/ge/graph/load/model_manager/task_info/memcpy_addr_async_task_info.cc b/ge/graph/load/model_manager/task_info/memcpy_addr_async_task_info.cc index 960862b4..8e2958dc 100755 --- a/ge/graph/load/model_manager/task_info/memcpy_addr_async_task_info.cc +++ b/ge/graph/load/model_manager/task_info/memcpy_addr_async_task_info.cc @@ -38,7 +38,7 @@ Status MemcpyAddrAsyncTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel if (op_desc == nullptr) { REPORT_INNER_ERROR("E19999", "Can't get op_desc from davinci_model by index:%u", memcpy_async.op_index()); - GELOGE(INTERNAL_ERROR, "Task op index:%u out of range", memcpy_async.op_index()); + GELOGE(INTERNAL_ERROR, "[Get][Op] Task op index:%u out of range", memcpy_async.op_index()); return INTERNAL_ERROR; } @@ -66,7 +66,7 @@ Status MemcpyAddrAsyncTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel REPORT_CALL_ERROR("E19999", "Call rtMalloc failed for op:%s(%s), size:%lu, ret:0x%X", op_desc->GetName().c_str(), op_desc->GetType().c_str(), args_size + kAlignBytes, rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMalloc] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } @@ -78,7 +78,7 @@ Status MemcpyAddrAsyncTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMemcpy failed for op:%s(%s), size:%zu, ret:0x%X", op_desc->GetName().c_str(), op_desc->GetType().c_str(), args_size, rt_ret); - GELOGE(RT_FAILED, "Call rt api for src failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMemcpy] for src failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } @@ -100,7 +100,7 @@ Status MemcpyAddrAsyncTaskInfo::Distribute() { if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMemcpyAsync failed, size:%lu, ret:0x%X", dst_max_, rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMemcpyAsync] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } diff --git a/ge/graph/load/model_manager/task_info/memcpy_async_task_info.cc b/ge/graph/load/model_manager/task_info/memcpy_async_task_info.cc index 0bc8fb8d..f4303ff2 100755 --- a/ge/graph/load/model_manager/task_info/memcpy_async_task_info.cc +++ b/ge/graph/load/model_manager/task_info/memcpy_async_task_info.cc @@ -38,7 +38,7 @@ Status MemcpyAsyncTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *da if (op_desc == nullptr) { REPORT_INNER_ERROR("E19999", "Can't get op_desc from davinci_model by index:%u", memcpy_async.op_index()); - GELOGE(INTERNAL_ERROR, "Task op index:%u out of range", memcpy_async.op_index()); + GELOGE(INTERNAL_ERROR, "[Get][Op] Task op index:%u out of range", memcpy_async.op_index()); return INTERNAL_ERROR; } @@ -47,7 +47,7 @@ Status MemcpyAsyncTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *da dst_ = reinterpret_cast(reinterpret_cast(src_) + sizeof(void *)); // for zero copy kind_ = RT_MEMCPY_ADDR_DEVICE_TO_DEVICE; - GE_CHK_STATUS_RET(SetIoAddrs(op_desc, memcpy_async), "Set addrs failed"); + GE_CHK_STATUS_RET(SetIoAddrs(op_desc, memcpy_async), "[Set][Addrs] failed"); GELOGI("MemcpyAsyncTaskInfo op name %s, src_ %p, dst_ %p, args_offset %u.", op_desc->GetName().c_str(), src_, dst_, args_offset_); return SUCCESS; @@ -77,7 +77,7 @@ Status MemcpyAsyncTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *da davinci_model_->DisableZeroCopy(src_); davinci_model_->DisableZeroCopy(dst_); - GE_CHK_STATUS_RET(SetIoAddrs(op_desc, memcpy_async), "Set addrs failed"); + GE_CHK_STATUS_RET(SetIoAddrs(op_desc, memcpy_async), "[Set][Addrs] failed"); GELOGI("MemcpyAsyncTaskInfo Init Success, logic[0x%lx, 0x%lx], src:%p, dst:%p, max:%lu, count:%lu", memcpy_async.src(), memcpy_async.dst(), src_, dst_, dst_max_, count_); return SUCCESS; @@ -90,7 +90,7 @@ Status MemcpyAsyncTaskInfo::Distribute() { if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtMemcpyAsync failed, size:%lu, ret:0x%X", dst_max_, rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMemcpyAsync] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } diff --git a/ge/graph/load/model_manager/task_info/model_exit_task_info.cc b/ge/graph/load/model_manager/task_info/model_exit_task_info.cc index f0e3dfb7..e42ea861 100644 --- a/ge/graph/load/model_manager/task_info/model_exit_task_info.cc +++ b/ge/graph/load/model_manager/task_info/model_exit_task_info.cc @@ -25,13 +25,13 @@ Status ModelExitTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *davi GELOGI("InitModelExitTaskInfo Init Start."); if (davinci_model == nullptr) { REPORT_INNER_ERROR("E19999", "Check param davinci_model nullptr"); - GELOGE(PARAM_INVALID, "davinci_model is null!"); + GELOGE(PARAM_INVALID, "[Check][Param] davinci_model is null!"); return PARAM_INVALID; } Status ret = SetStream(task_def.stream_id(), davinci_model->GetStreamList()); if (ret != SUCCESS) { - GELOGE(ret, "SetStream fail, stream_id:%u", task_def.stream_id()); + GELOGE(ret, "[Set][Stream] fail, stream_id:%u", task_def.stream_id()); return ret; } @@ -46,7 +46,7 @@ Status ModelExitTaskInfo::Distribute() { if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtModelExit failed, ret:0x%X", rt_ret); - GELOGE(RT_FAILED, "Call rtModelExit failed, ret: 0x%x", rt_ret); + GELOGE(RT_FAILED, "[Call][RtModelExit] failed, ret:0x%x", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } GELOGI("ModelExitTaskInfo Distribute Success."); diff --git a/ge/graph/load/model_manager/task_info/profiler_trace_task_info.cc b/ge/graph/load/model_manager/task_info/profiler_trace_task_info.cc index 4e829182..111ef144 100755 --- a/ge/graph/load/model_manager/task_info/profiler_trace_task_info.cc +++ b/ge/graph/load/model_manager/task_info/profiler_trace_task_info.cc @@ -24,7 +24,7 @@ Status ProfilerTraceTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel * GELOGI("ProfilerTraceTaskInfo Init Start."); if (davinci_model == nullptr) { REPORT_INNER_ERROR("E19999", "Check param davinci_model nullptr"); - GELOGE(PARAM_INVALID, "davinci_model is null!"); + GELOGE(PARAM_INVALID, "[Check][Param] davinci_model is null!"); return PARAM_INVALID; } @@ -49,7 +49,7 @@ Status ProfilerTraceTaskInfo::Distribute() { if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtProfilerTrace failed, ret:0x%X", rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtProfilerTrace] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } diff --git a/ge/graph/load/model_manager/task_info/stream_active_task_info.cc b/ge/graph/load/model_manager/task_info/stream_active_task_info.cc index 4ab4951d..5f128191 100755 --- a/ge/graph/load/model_manager/task_info/stream_active_task_info.cc +++ b/ge/graph/load/model_manager/task_info/stream_active_task_info.cc @@ -27,7 +27,7 @@ Status StreamActiveTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *d GELOGI("StreamActiveTaskInfo Init Start."); if (davinci_model == nullptr) { REPORT_INNER_ERROR("E19999", "Check param davinci_model nullptr"); - GELOGE(PARAM_INVALID, "davinci_model is null!"); + GELOGE(PARAM_INVALID, "[Check][Param] davinci_model is null!"); return PARAM_INVALID; } @@ -49,7 +49,7 @@ Status StreamActiveTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *d REPORT_INNER_ERROR("E19999", "Get Attr:%s in op:%s(%s) fail", ATTR_NAME_ACTIVE_STREAM_LIST.c_str(), op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(INTERNAL_ERROR, "StreamActiveOp get attr ACTIVE_STREAM fail, node name:%s.", op_desc->GetName().c_str()); + GELOGE(INTERNAL_ERROR, "[Get][Attr] ACTIVE_STREAM fail, node name:%s.", op_desc->GetName().c_str()); return INTERNAL_ERROR; } @@ -57,8 +57,8 @@ Status StreamActiveTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *d REPORT_INNER_ERROR("E19999", "flowctrl index:%u >= active_stream_list size:%zu in op:%s(%s), " "check invalid", internal_index, active_stream_index_list.size(), op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(INTERNAL_ERROR, "InitStreamSwitchTaskInfo stream id index invalid. index:%u, list size:%zu.", internal_index, - active_stream_index_list.size()); + GELOGE(INTERNAL_ERROR, "[Check][Param] stream id index invalid. index:%u, list size:%zu.", + internal_index, active_stream_index_list.size()); return INTERNAL_ERROR; } @@ -66,7 +66,7 @@ Status StreamActiveTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *d REPORT_INNER_ERROR("E19999", "active_stream_index:%u in op:%s(%s) >= stream size:%zu in model, " "check invalid", active_stream_index_list[internal_index], op_desc->GetName().c_str(), op_desc->GetType().c_str(), davinci_model->GetStreamList().size()); - GELOGE(INTERNAL_ERROR, "InitStreamSwitchTaskInfo stream index invalid. index:%u, stream list size:%zu.", + GELOGE(INTERNAL_ERROR, "[Check][Param] stream index invalid. index:%u, stream list size:%zu.", active_stream_index_list[internal_index], davinci_model->GetStreamList().size()); return INTERNAL_ERROR; } @@ -85,7 +85,7 @@ Status StreamActiveTaskInfo::Distribute() { if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtStreamActive failed, ret:0x%X", rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtStreamActive] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } diff --git a/ge/graph/load/model_manager/task_info/stream_switch_task_info.cc b/ge/graph/load/model_manager/task_info/stream_switch_task_info.cc index 33dfacf7..576895c7 100644 --- a/ge/graph/load/model_manager/task_info/stream_switch_task_info.cc +++ b/ge/graph/load/model_manager/task_info/stream_switch_task_info.cc @@ -32,7 +32,7 @@ Status StreamSwitchTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *d GELOGI("StreamSwitchTaskInfo Init Start."); if (davinci_model == nullptr) { REPORT_INNER_ERROR("E19999", "Check param davinci_model nullptr"); - GELOGE(PARAM_INVALID, "davinci_model is null!"); + GELOGE(PARAM_INVALID, "[Check][Param] davinci_model is null!"); return PARAM_INVALID; } @@ -53,7 +53,8 @@ Status StreamSwitchTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *d REPORT_INNER_ERROR("E19999", "Get Attr:%s in op:%s(%s) fail", ATTR_NAME_STREAM_SWITCH_COND.c_str(), op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(INTERNAL_ERROR, "StreamSwitchOp get attr STREAM_SWITCH_COND fail."); + GELOGE(INTERNAL_ERROR, "[Get][Attr] %s in op:%s(%s) fail", + ATTR_NAME_STREAM_SWITCH_COND.c_str(), op_desc->GetName().c_str(), op_desc->GetType().c_str()); return INTERNAL_ERROR; } cond_ = static_cast(cond); @@ -63,7 +64,7 @@ Status StreamSwitchTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *d REPORT_INNER_ERROR("E19999", "input_data_addr.size():%zu or input size:%zu != STREAM_SWITCH_INPUT_NUM:%u " "in op:%s(%s), check invalid", input_data_addr.size(), input_size, STREAM_SWITCH_INPUT_NUM, op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(INTERNAL_ERROR, "Input num should be %u. inputAddr size:%zu, inputDesc size:%zu.", + GELOGE(INTERNAL_ERROR, "[Check][Param] Input num should be %u. inputAddr size:%zu, inputDesc size:%zu.", STREAM_SWITCH_INPUT_NUM, input_data_addr.size(), input_size); return INTERNAL_ERROR; } @@ -73,7 +74,8 @@ Status StreamSwitchTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *d REPORT_INNER_ERROR("E19999", "Get Attr:%s in op:%s(%s) fail", ATTR_NAME_ACTIVE_STREAM_LIST.c_str(), op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(INTERNAL_ERROR, "StreamSwitchOp get attr ACTIVE_STREAM_LIST fail."); + GELOGE(INTERNAL_ERROR, "[Get][Attr] %s in op:%s(%s) fail", + ATTR_NAME_ACTIVE_STREAM_LIST.c_str(), op_desc->GetName().c_str(), op_desc->GetType().c_str()); return INTERNAL_ERROR; } @@ -81,7 +83,7 @@ Status StreamSwitchTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *d REPORT_INNER_ERROR("E19999", "active_stream_list.size():%zu in op:%s(%s) != kTrueBranchStreamNum:%u, " "check invalid", active_stream_list.size(), op_desc->GetName().c_str(), op_desc->GetType().c_str(), kTrueBranchStreamNum); - GELOGE(FAILED, "Stream num of switch true branch must be %u.", kTrueBranchStreamNum); + GELOGE(FAILED, "[Check][Param] Stream num of switch true branch must be %u.", kTrueBranchStreamNum); return FAILED; } @@ -90,7 +92,7 @@ Status StreamSwitchTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *d REPORT_INNER_ERROR("E19999", "active_stream_index:%zu in op:%s(%s) >= stream list size:%zu in model," "check invalid", true_stream_index, op_desc->GetName().c_str(), op_desc->GetType().c_str(), davinci_model->GetStreamList().size()); - GELOGE(INTERNAL_ERROR, "InitStreamSwitchTaskInfo stream index invalid. index:%zu, stream list size:%zu.", + GELOGE(INTERNAL_ERROR, "[Check][Param] stream index invalid. index:%zu, stream list size:%zu.", true_stream_index, davinci_model->GetStreamList().size()); return INTERNAL_ERROR; } @@ -106,7 +108,8 @@ Status StreamSwitchTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel *d REPORT_INNER_ERROR("E19999", "Get Attr:%s in op:%s(%s) fail", ATTR_NAME_SWITCH_DATA_TYPE.c_str(), op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(FAILED, "StreamSwitchOp[node:%s] get attr SWITCH_DATA_TYPE fail.", op_desc->GetName().c_str()); + GELOGE(FAILED, "[Get][Attr] %s in op:%s(%s) fail", + ATTR_NAME_SWITCH_DATA_TYPE.c_str(), op_desc->GetName().c_str(), op_desc->GetType().c_str()); return FAILED; } data_type_ = static_cast(data_type); @@ -124,7 +127,7 @@ Status StreamSwitchTaskInfo::Distribute() { if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtStreamSwitchEx fail, ret:0x%X", rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtStreamSwitchEx] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } @@ -143,7 +146,8 @@ Status StreamSwitchTaskInfo::CalculateArgs(const domi::TaskDef &task_def, Davinc REPORT_INNER_ERROR("E19999", "input size:%zu in op:%s(%s) != STREAM_SWITCH_INPUT_NUM:%u," "check invalid", op_desc->GetInputsSize(), op_desc->GetName().c_str(), op_desc->GetType().c_str(), STREAM_SWITCH_INPUT_NUM); - GELOGE(FAILED, "Stream switch op only have one data input. Now input size is %zu", op_desc->GetInputsSize()); + GELOGE(FAILED, "[Check][Param] Stream switch op only have one data input. Now input size is %zu", + op_desc->GetInputsSize()); return FAILED; } for (uint32_t i = 0; i < STREAM_SWITCH_INPUT_NUM; ++i) { diff --git a/ge/graph/load/model_manager/task_info/stream_switchn_task_info.cc b/ge/graph/load/model_manager/task_info/stream_switchn_task_info.cc index 40bbff02..3a7b4fb6 100755 --- a/ge/graph/load/model_manager/task_info/stream_switchn_task_info.cc +++ b/ge/graph/load/model_manager/task_info/stream_switchn_task_info.cc @@ -38,7 +38,7 @@ Status StreamSwitchNTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel * if (op_desc == nullptr) { REPORT_INNER_ERROR("E19999", "Can't get op_desc from davinci_model by index:%u", stream_switchn_def.op_index()); - GELOGE(FAILED, "Index is out of range, index: %u", stream_switchn_def.op_index()); + GELOGE(FAILED, "[Get][Op] failed, as Index is out of range, index:%u", stream_switchn_def.op_index()); return FAILED; } @@ -51,7 +51,7 @@ Status StreamSwitchNTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel * REPORT_INNER_ERROR("E19999", "task_Def.stream_switch_n.target_value:%d in op:%s(%s) is 0," "check invalid", value.size(), op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(FAILED, "The number of gears in dynamic batch scenario can not be 0."); + GELOGE(FAILED, "[Check][Param] The number of gears in dynamic batch scenario can not be 0."); return FAILED; } for (int i = 0; i < value.size(); ++i) { @@ -65,12 +65,13 @@ Status StreamSwitchNTaskInfo::Init(const domi::TaskDef &task_def, DavinciModel * REPORT_INNER_ERROR("E19999", "Get Attr:%s in op:%s(%s) fail", ATTR_NAME_BATCH_NUM.c_str(), op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(FAILED, "Get ATTR_NAME_BATCH_NUM of switchN op failed."); + GELOGE(FAILED, "[Get][Attr] %s in op:%s(%s) fail", + ATTR_NAME_BATCH_NUM.c_str(), op_desc->GetName().c_str(), op_desc->GetType().c_str()); return FAILED; } if (GetTrueStreamPtr(op_desc, davinci_model) != SUCCESS) { - GELOGE(FAILED, "Get true stream ptr of switchN op failed."); + GELOGE(FAILED, "[Get][TrueStreamPtr] of switchN op failed."); return FAILED; } @@ -94,7 +95,7 @@ Status StreamSwitchNTaskInfo::Distribute() { if (rt_ret != RT_ERROR_NONE) { REPORT_CALL_ERROR("E19999", "Call rtStreamSwitchN failed, ret:0x%X", rt_ret); - GELOGE(RT_FAILED, "Call rt api failed, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtStreamSwitchN] failed, ret:0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } @@ -109,7 +110,8 @@ Status StreamSwitchNTaskInfo::GetTrueStreamPtr(const OpDescPtr &op_desc, Davinci REPORT_INNER_ERROR("E19999", "Get Attr:%s in op:%s(%s) fail", ATTR_NAME_ACTIVE_STREAM_LIST.c_str(), op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(FAILED, "StreamSwitchNOp get attr ACTIVE_STREAM_LIST fail."); + GELOGE(FAILED, "[Get][Attr] %s in op:%s(%s) fail", + ATTR_NAME_ACTIVE_STREAM_LIST.c_str(), op_desc->GetName().c_str(), op_desc->GetType().c_str()); return FAILED; } @@ -118,9 +120,8 @@ Status StreamSwitchNTaskInfo::GetTrueStreamPtr(const OpDescPtr &op_desc, Davinci "check invalid", true_stream_id_list.size(), op_desc->GetName().c_str(), op_desc->GetType().c_str(), davinci_model->GetStreamList().size()); GELOGE(FAILED, - "InitStreamSwitchNTaskInfo get true stream id list failed. true stream size:%zu, " - "stream list size:%zu.", - true_stream_id_list.size(), davinci_model->GetStreamList().size()); + "[Check][Param] InitStreamSwitchNTaskInfo get true stream id list failed. true stream size:%zu, " + "stream list size:%zu.", true_stream_id_list.size(), davinci_model->GetStreamList().size()); return FAILED; } @@ -131,8 +132,8 @@ Status StreamSwitchNTaskInfo::GetTrueStreamPtr(const OpDescPtr &op_desc, Davinci REPORT_INNER_ERROR("E19999", "active_stream_id:%u in op:%s(%s) >= stream list size:%zu in model," "check invalid", true_stream_id, op_desc->GetName().c_str(), op_desc->GetType().c_str(), davinci_model->GetStreamList().size()); - GELOGE(FAILED, "InitStreamSwitchNTaskInfo stream id invalid. id:%u, stream list size:%zu.", true_stream_id, - davinci_model->GetStreamList().size()); + GELOGE(FAILED, " [Check][Param] InitStreamSwitchNTaskInfo stream id invalid. id:%u, stream list size:%zu.", + true_stream_id, davinci_model->GetStreamList().size()); return FAILED; } rtStream_t true_stream = davinci_model->GetStreamList()[true_stream_id]; @@ -144,7 +145,7 @@ Status StreamSwitchNTaskInfo::GetTrueStreamPtr(const OpDescPtr &op_desc, Davinci REPORT_INNER_ERROR("E19999", "active_stream_list.size():%zu in op:%s(%s) is empty, " "check invalid", true_stream_id_list.size(), op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(FAILED, "true stream list is null."); + GELOGE(FAILED, "[Check][Param] true stream list is null."); return FAILED; } true_stream_ptr_ = &true_stream_list_[0]; @@ -160,10 +161,11 @@ Status StreamSwitchNTaskInfo::CalculateArgs(const domi::TaskDef &task_def, Davin GE_CHECK_NOTNULL(op_desc); GELOGI("Calc opType[%s] args size. Node name is [%s]", op_desc->GetType().c_str(), op_desc->GetName().c_str()); if (op_desc->GetInputsSize() != kStreamSwitchnInputNum) { - REPORT_INNER_ERROR("E19999", "input size:%zu in op:%s(%s) != kStreamSwitchnInputNum:%u ," + REPORT_INNER_ERROR("E19999", "input size:%zu in op:%s(%s) != kStreamSwitchnInputNum:%u, " "check invalid", op_desc->GetInputsSize(), op_desc->GetName().c_str(), op_desc->GetType().c_str(), kStreamSwitchnInputNum); - GELOGE(FAILED, "Stream switchn op only have one data input. Now input size is %zu", op_desc->GetInputsSize()); + GELOGE(FAILED, "[Check][Param] Stream switchn op only have one data input. Now input size is %zu", + op_desc->GetInputsSize()); return FAILED; } string input_tensor_name = op_desc->GetInputNameByIndex(0); @@ -187,7 +189,8 @@ Status StreamSwitchNTaskInfo::InputPtrUpdate(const OpDescPtr &op_desc, DavinciMo REPORT_INNER_ERROR("E19999", "input_offset size:%zu or input_length.size:%zu in op:%s(%s) is empty," "check invalid", input_offset.size(), input_legnth.size(), op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(FAILED, "input offset size %zu, input legnth size: %zu", input_offset.size(), input_legnth.size()); + GELOGE(FAILED, "[Check][Param] input offset size %zu, input legnth size:%zu", + input_offset.size(), input_legnth.size()); return FAILED; } const RuntimeParam &rts_param = davinci_model->GetRuntimeParam(); @@ -201,7 +204,7 @@ Status StreamSwitchNTaskInfo::InputPtrUpdate(const OpDescPtr &op_desc, DavinciMo REPORT_INNER_ERROR("E19999", "input_data_addr size:%zu in op:%s(%s) is empty," "check invalid", input_data_addr.size(), op_desc->GetName().c_str(), op_desc->GetType().c_str()); - GELOGE(FAILED, "input data addr is empty"); + GELOGE(FAILED, "[Check][Param] input data addr is empty"); return FAILED; } input_ptr_ = input_data_addr[0]; diff --git a/ge/graph/load/model_manager/task_info/super_kernel/super_kernel.cc b/ge/graph/load/model_manager/task_info/super_kernel/super_kernel.cc index 66bf5ab7..dc9d6768 100644 --- a/ge/graph/load/model_manager/task_info/super_kernel/super_kernel.cc +++ b/ge/graph/load/model_manager/task_info/super_kernel/super_kernel.cc @@ -29,21 +29,21 @@ Status SuperKernel::Launch(rtStream_t stream, uint32_t dump_flag) { GE_IF_BOOL_EXEC(rt_ret != RT_ERROR_NONE, REPORT_CALL_ERROR("E19999", "Call rtMalloc failed, size:%lu, ret:0x%X", sizeof(args), rt_ret); - GELOGE(RT_FAILED, "rtMalloc failied. error: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMalloc] failied. error: 0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret);) rt_ret = rtMemcpy(reinterpret_cast(device_args_addr_), sizeof(args), reinterpret_cast(args), sizeof(args), RT_MEMCPY_HOST_TO_DEVICE); GE_IF_BOOL_EXEC(rt_ret != RT_ERROR_NONE, REPORT_CALL_ERROR("E19999", "Call rtMemcpy failed, size:%lu, ret:0x%X", sizeof(args), rt_ret); - GELOGE(RT_FAILED, "rtMemcpy failied. error: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMemcpy] failied. error: 0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret);) rt_ret = rtKernelLaunchWithFlag((void *const)func_stub_, block_dim_, device_args_addr_, sizeof(args), NULL, stream, dump_flag); GE_IF_BOOL_EXEC(rt_ret != RT_ERROR_NONE, REPORT_CALL_ERROR("E19999", "Call rtKernelLaunchWithFlag failed, dump_flag:%u, ret:0x%X", dump_flag, rt_ret); - GELOGE(RT_FAILED, "rtKernelLaunchWithFlag failied. error: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtKernelLaunchWithFlag] failied. error: 0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret);) return SUCCESS; } diff --git a/ge/graph/load/model_manager/task_info/super_kernel/super_kernel_factory.cc b/ge/graph/load/model_manager/task_info/super_kernel/super_kernel_factory.cc index 2a3e3a17..79a715f9 100644 --- a/ge/graph/load/model_manager/task_info/super_kernel/super_kernel_factory.cc +++ b/ge/graph/load/model_manager/task_info/super_kernel/super_kernel_factory.cc @@ -33,20 +33,20 @@ Status SuperKernelFactory::Init() { if (handle_ == nullptr) { const char* error = mmDlerror(); GE_IF_BOOL_EXEC(error == nullptr, error = ""); - GELOGE(FAILED, "SKT: open skt lib failed, please check LD_LIBRARY_PATH. errmsg:%s", error); + GELOGE(FAILED, "[Open][SktLib] failed, please check LD_LIBRARY_PATH. errmsg:%s", error); } rtError_t rt_ret; rt_ret = rtGetFunctionByName(this->sk_stub_name_.c_str(), &this->func_stub_); GE_IF_BOOL_EXEC(rt_ret != RT_ERROR_NONE, REPORT_CALL_ERROR("E19999", "Call rtGetFunctionByName failed, stub_func:%s, ret:0x%X", this->sk_stub_name_.c_str(), rt_ret); - GELOGE(RT_FAILED, "rtGetFunctionByName failed. stub_func: %s, please export LD_LIBRARY_PATH for " - "libcce_aicore.so", this->sk_stub_name_.c_str()); + GELOGE(RT_FAILED, "[Call][RtGetFunctionByName] failed. stub_func: %s, " + "please export LD_LIBRARY_PATH for libcce_aicore.so", this->sk_stub_name_.c_str()); return RT_ERROR_TO_GE_STATUS(rt_ret);) rt_ret = rtGetAddrByFun(this->func_stub_, &this->func_ptr_); GE_IF_BOOL_EXEC(rt_ret != RT_ERROR_NONE, REPORT_CALL_ERROR("E19999", "Call rtGetAddrByFun failed, ret:0x%X", rt_ret); - GELOGE(RT_FAILED, "rtGetAddrByFun failed. error: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtGetAddrByFun] failed. error: 0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret);) GELOGD( "SKT: fuseKernels super_kernel_template subFunc %p, device func " @@ -104,7 +104,7 @@ Status SuperKernelFactory::FuseKernels(const std::vector &stub_func_list rt_ret = rtGetAddrByFun(stub_func_list[i], &sub_device_func); GE_IF_BOOL_EXEC(rt_ret != RT_ERROR_NONE, REPORT_CALL_ERROR("E19999", "Call rtGetAddrByFun failed, ret:0x%X", rt_ret); - GELOGE(RT_FAILED, "rtGetAddrByFun failed. error: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtGetAddrByFun] failed. error: 0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret);) GELOGD("SKT: fuseKernels subFunc %p, device func address %p", stub_func_list[i], sub_device_func); // store two uint64_t address @@ -118,14 +118,14 @@ Status SuperKernelFactory::FuseKernels(const std::vector &stub_func_list GE_IF_BOOL_EXEC(rt_ret != RT_ERROR_NONE, REPORT_CALL_ERROR("E19999", "Call rtMalloc failed, size:%lu, ret:0x%X", nav_table_size, rt_ret); - GELOGE(RT_FAILED, "rtMalloc failed. error: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMalloc] failed. error: 0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret);) rt_ret = rtMemcpy(reinterpret_cast(hbm_nav_table_addr), nav_table_size, reinterpret_cast(nav_table.get()), nav_table_size, RT_MEMCPY_HOST_TO_DEVICE); GE_IF_BOOL_EXEC(rt_ret != RT_ERROR_NONE, REPORT_CALL_ERROR("E19999", "Call rtMemcpy failed, size:%lu, ret:0x%X", nav_table_size, rt_ret); - GELOGE(RT_FAILED, "rtMemcpy failed. error: 0x%X", rt_ret); + GELOGE(RT_FAILED, "[Call][RtMemcpy] failed. error: 0x%X", rt_ret); GE_CHK_RT(rtFree(hbm_nav_table_addr)); return RT_ERROR_TO_GE_STATUS(rt_ret);) // Create the necessary metadata for the super kernel h = diff --git a/ge/graph/load/model_manager/task_info/task_info.cc b/ge/graph/load/model_manager/task_info/task_info.cc index fb446bf7..fad18d37 100755 --- a/ge/graph/load/model_manager/task_info/task_info.cc +++ b/ge/graph/load/model_manager/task_info/task_info.cc @@ -27,7 +27,7 @@ Status TaskInfo::SetStream(uint32_t stream_id, const std::vector &st } else { REPORT_INNER_ERROR("E19999", "stream_id:%u >= stream_list.size(): %zu, check invalid", stream_id, stream_list.size()); - GELOGE(FAILED, "index: %u >= stream_list.size(): %zu.", stream_id, stream_list.size()); + GELOGE(FAILED, "[Check][Param] index:%u >= stream_list.size():%zu.", stream_id, stream_list.size()); return FAILED; }