|
|
|
@@ -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); |
|
|
|
|