Browse Source

fix visit kernel missing the return_types

tags/v0.2.0-alpha
limingqi107 5 years ago
parent
commit
399d72874b
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      mindspore/ccsrc/session/anf_runtime_algorithm.cc

+ 3
- 3
mindspore/ccsrc/session/anf_runtime_algorithm.cc View File

@@ -111,12 +111,12 @@ KernelWithIndex AnfRuntimeAlgorithm::VisitKernelWithReturnType(const AnfNodePtr
MS_EXCEPTION_IF_NULL(value_node); MS_EXCEPTION_IF_NULL(value_node);
int item_idx = GetValue<int>(value_node->value()); int item_idx = GetValue<int>(value_node->value());
return VisitKernelWithReturnType(cnode->input(kRealInputNodeIndexInTupleGetItem), IntToSize(item_idx), return VisitKernelWithReturnType(cnode->input(kRealInputNodeIndexInTupleGetItem), IntToSize(item_idx),
visit_nop_node);
visit_nop_node, return_types);
} else if (IsPrimitive(input0, prim::kPrimDepend) || IsPrimitive(input0, prim::kPrimControlDepend)) { } else if (IsPrimitive(input0, prim::kPrimDepend) || IsPrimitive(input0, prim::kPrimControlDepend)) {
return VisitKernelWithReturnType(cnode->input(kRealInputIndexInDepend), 0, visit_nop_node);
return VisitKernelWithReturnType(cnode->input(kRealInputIndexInDepend), 0, visit_nop_node, return_types);
} else if (opt::IsNopNode(cnode) && visit_nop_node) { } else if (opt::IsNopNode(cnode) && visit_nop_node) {
if (cnode->inputs().size() == 2) { if (cnode->inputs().size() == 2) {
return VisitKernelWithReturnType(cnode->input(1), 0, visit_nop_node);
return VisitKernelWithReturnType(cnode->input(1), 0, visit_nop_node, return_types);
} else { } else {
MS_LOG(EXCEPTION) << cnode->DebugString() << "Invalid nop node"; MS_LOG(EXCEPTION) << cnode->DebugString() << "Invalid nop node";
} }


Loading…
Cancel
Save