From 20e6a6679f586de7bee8789fa7850b70720c86e1 Mon Sep 17 00:00:00 2001 From: zhaoxinxin Date: Thu, 29 Oct 2020 16:59:42 +0800 Subject: [PATCH] modified: ge/graph/optimize/mem_rw_conflict_optimize.cc --- ge/graph/optimize/mem_rw_conflict_optimize.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ge/graph/optimize/mem_rw_conflict_optimize.cc b/ge/graph/optimize/mem_rw_conflict_optimize.cc index 98024de2..4305d3fd 100644 --- a/ge/graph/optimize/mem_rw_conflict_optimize.cc +++ b/ge/graph/optimize/mem_rw_conflict_optimize.cc @@ -667,10 +667,6 @@ Status GraphOptimize::CheckRWConflict(ComputeGraphPtr &compute_graph, bool &has_ Status GraphOptimize::HandleMemoryRWConflict(ComputeGraphPtr &compute_graph) { node_rwtype_map_.clear(); auto sub_graph_vec = compute_graph->GetAllSubgraphs(); - if (sub_graph_vec.empty()) { - GELOGD("No sub graph here. Ignore memory conflict handle."); - return SUCCESS; - } GE_DUMP(compute_graph, "BeforeHandleMemConflict"); // 1.loop all subgraph, mark rw type from inside to outside Status ret = MarkRWTypeForAllSubgraph(sub_graph_vec); @@ -687,6 +683,12 @@ Status GraphOptimize::HandleMemoryRWConflict(ComputeGraphPtr &compute_graph) { if (node->GetType() == NETOUTPUT && AttrUtils::HasAttr(node->GetOpDesc(), ATTR_NAME_PARENT_NODE_INDEX)) { continue; } + // currently do not insert identity node between NpuAllocStatus and HcomAllreduce for accuracy issue + // fix it later + if (node->GetType() == "NPUAllocFloatStatus") { + GELOGI("Currently do not insert identity node between NpuAllocStatus and HcomAllreduce for accuracy issue"); + continue; + } if (node->GetType() == IDENTITY || node->GetType() == READVARIABLEOP) { // split identity ret = SplitIdentity(node);