!46501 fix_bug: insert conv2dbackpropinput

Merge pull request !46501 from hujiahui8/r2.0.0-alpha
This commit is contained in:
i-robot 2022-12-13 08:40:48 +00:00 committed by Gitee
commit da50667653
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 3 additions and 1 deletions

View File

@ -195,7 +195,9 @@ void CheckInplaceNodeInputs(std::vector<AnfNodeIndex> *inplace_node, size_t cove
MS_EXCEPTION_IF_NULL(new_input); MS_EXCEPTION_IF_NULL(new_input);
new_input->set_abstract(acc_input->abstract()); new_input->set_abstract(acc_input->abstract());
CopyKernelInfo(acc_input, new_input); CopyKernelInfo(acc_input, new_input);
auto new_inplace_node = graph->NewCNode({acc_node->input(0), new_input, acc_node->input(2)}); std::vector<AnfNodePtr> new_inplace_input = acc_node->inputs();
new_inplace_input[1] = new_input;
auto new_inplace_node = graph->NewCNode(new_inplace_input);
MS_EXCEPTION_IF_NULL(new_inplace_node); MS_EXCEPTION_IF_NULL(new_inplace_node);
new_inplace_node->set_abstract(acc_node->abstract()); new_inplace_node->set_abstract(acc_node->abstract());
CopyKernelInfo(acc_node, new_inplace_node); CopyKernelInfo(acc_node, new_inplace_node);