Browse Source

!8805 fix assign memory bug when tuple_get_item connecting communication operator

From: @yao_yf
Reviewed-by: @kisnwang,@jjfeing
Signed-off-by: @jjfeing
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
816f22efeb
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      mindspore/ccsrc/runtime/device/kernel_runtime.cc

+ 1
- 2
mindspore/ccsrc/runtime/device/kernel_runtime.cc View File

@@ -476,12 +476,11 @@ DeviceAddressPtr KernelRuntime::PreAssignCNodeMemory(const AnfNodePtr &anf_node,
auto cnode = anf_node->cast<CNodePtr>();
if (opt::IsNopNode(cnode)) {
size_t kNopNodeInputSize = 2;
size_t kNopNodeRealInputIndex = 1;
if (cnode->size() != kNopNodeInputSize) {
MS_LOG(EXCEPTION) << cnode->fullname_with_scope() << " has invalid input size: " << cnode->size();
}
auto input_node_with_index = AnfAlgo::GetPrevNodeOutput(anf_node, index);
return PreAssignCNodeMemory(cnode->input(kNopNodeRealInputIndex), input_node_with_index.second);
return PreAssignCNodeMemory(input_node_with_index.first, input_node_with_index.second);
}
auto kernel_mod = AnfAlgo::GetKernelMod(anf_node);
MS_EXCEPTION_IF_NULL(kernel_mod);


Loading…
Cancel
Save