From 82c1afa937b532e8b0e489718fe7c7d0065806ff Mon Sep 17 00:00:00 2001 From: lianghao Date: Sat, 9 Jan 2021 17:39:29 +0800 Subject: [PATCH] bug --- ge/graph/passes/subgraph_pass.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ge/graph/passes/subgraph_pass.cc b/ge/graph/passes/subgraph_pass.cc index 3286698b..be8c3e1d 100644 --- a/ge/graph/passes/subgraph_pass.cc +++ b/ge/graph/passes/subgraph_pass.cc @@ -443,7 +443,7 @@ Status SubgraphPass::InsertMemcpyNode(const ComputeGraphPtr &graph, const OutDat .AddOutput("y", in_node->GetOpDesc()->GetOutputDesc(0)) .Build(); (void)AttrUtils::SetBool(op_desc, ATTR_NO_NEED_CONSTANT_FOLDING, false); - if (graph->GetParentNode() != nullptr || !graph->GetParentNode()->GetOwnerComputeGraph()->GetGraphUnknownFlag()) { + if (graph->GetParentNode() != nullptr && !graph->GetGraphUnknownFlag()) { (void)AttrUtils::SetBool(op_desc, "_zero_copy_identity_reserved", true); } if (GraphUtils::InsertNodeAfter(out_anchor, in_anchors, graph->AddNode(op_desc)) != GRAPH_SUCCESS) {