Browse Source

fix_assign_memory_bug_with_tuple_get_item_and_communication_ops

tags/v1.1.0
yao_yf 5 years ago
parent
commit
36fec5dca7
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

@@ -477,12 +477,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