From 1efd304527bd5b8db930b6b66b1936b00d206e2f Mon Sep 17 00:00:00 2001 From: chuxing Date: Wed, 4 Nov 2020 20:02:50 +0800 Subject: [PATCH] fixing code review --- ge/hybrid/model/hybrid_model_builder.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ge/hybrid/model/hybrid_model_builder.cc b/ge/hybrid/model/hybrid_model_builder.cc index c9401c38..f47a02fd 100755 --- a/ge/hybrid/model/hybrid_model_builder.cc +++ b/ge/hybrid/model/hybrid_model_builder.cc @@ -71,11 +71,7 @@ Status CollectDependenciesForFusedGraph(NodeItem &node_item, std::set for (auto &input_name : depends) { auto input_index = op_desc->GetInputIndexByName(input_name); - const auto &in_anchor = node->GetInDataAnchor(input_index); - GE_CHECK_NOTNULL(in_anchor); - const auto &peer_out_anchor = in_anchor->GetPeerOutAnchor(); - GE_CHECK_NOTNULL(peer_out_anchor); - const auto &src_node = peer_out_anchor->GetOwnerNode(); + auto src_node = NodeUtils::GetInDataNodeByIndex(*node, input_index); GE_CHECK_NOTNULL(src_node); auto src_op_desc = src_node->GetOpDesc(); GE_CHECK_NOTNULL(src_op_desc);