From c75e7cd728dbf7daa0585295cca4d6ed6462f415 Mon Sep 17 00:00:00 2001 From: shenghong96 Date: Sat, 30 Jan 2021 10:33:45 +0800 Subject: [PATCH] fix the input_name --- mindspore/ccsrc/backend/optimizer/common/helper.cc | 6 ------ 1 file changed, 6 deletions(-) diff --git a/mindspore/ccsrc/backend/optimizer/common/helper.cc b/mindspore/ccsrc/backend/optimizer/common/helper.cc index 557f98b9af..8b89a536bf 100644 --- a/mindspore/ccsrc/backend/optimizer/common/helper.cc +++ b/mindspore/ccsrc/backend/optimizer/common/helper.cc @@ -523,7 +523,6 @@ CNodePtr CreatTupleGetItemNode(const FuncGraphPtr &func_graph, const AnfNodePtr void ConstInputToAttr(const CNodePtr &cnode, const std::unordered_set &input_attrs) { MS_EXCEPTION_IF_NULL(cnode); std::vector new_inputs; - std::vector new_input_names; auto primitive = AnfAlgo::GetCNodePrimitive(cnode); MS_EXCEPTION_IF_NULL(primitive); primitive = primitive->Clone(); @@ -550,17 +549,12 @@ void ConstInputToAttr(const CNodePtr &cnode, const std::unordered_set &i need_update = true; } else { new_inputs.push_back(input_node); - if (i < input_names_vec.size()) { - new_input_names.push_back(input_names_vec[i]); - } } } if (need_update) { // Update cnode's inputs new_inputs[0] = NewValueNode(primitive); cnode->set_inputs(new_inputs); - // Update cnode's input_names attr - primitive->set_attr(kAttrInputNames, MakeValue(new_input_names)); } }