Home
last modified time | relevance | path

Searched refs:return_node (Results 1 – 25 of 25) sorted by relevance

/third_party/mindspore/mindspore/lite/tools/optimizer/graph/
Dinfershape_pass.cc302 auto return_node = sub_graph->get_return(); in SetSubGraphOutput() local
303 MS_ASSERT(return_node != nullptr); in SetSubGraphOutput()
304 auto origin_input = return_node->inputs(); in SetSubGraphOutput()
305 lite::RemoveIfDepend(return_node); in SetSubGraphOutput()
306 lite::RemoveIfMakeTuple(return_node); in SetSubGraphOutput()
307 for (size_t i = 1; i < return_node->size(); ++i) { in SetSubGraphOutput()
308 if (!opt::CheckPrimitiveType(return_node->input(i), prim::kPrimTranspose)) { in SetSubGraphOutput()
311 auto node_name = return_node->input(i)->fullname_with_scope(); in SetSubGraphOutput()
315 auto trans_cnode = return_node->input(i)->cast<CNodePtr>(); in SetSubGraphOutput()
328 return_node->set_inputs(origin_input); in SetSubGraphOutput()
[all …]
Ddecrease_transpose_algo.cc551 auto return_node = sub_graph->get_return(); in SetSubGraphOutput() local
552 MS_ASSERT(return_node != nullptr); in SetSubGraphOutput()
553 auto origin_input = return_node->inputs(); in SetSubGraphOutput()
554 lite::RemoveIfDepend(return_node); in SetSubGraphOutput()
555 lite::RemoveIfMakeTuple(return_node); in SetSubGraphOutput()
556 for (size_t i = 1; i < return_node->size(); ++i) { in SetSubGraphOutput()
557 if (!CheckPrimitiveType(return_node->input(i), prim::kPrimTranspose)) { in SetSubGraphOutput()
560 auto node_name = return_node->input(i)->fullname_with_scope(); in SetSubGraphOutput()
564 auto trans_cnode = return_node->input(i)->cast<CNodePtr>(); in SetSubGraphOutput()
576 return_node->set_inputs(origin_input); in SetSubGraphOutput()
[all …]
Dadd_tensor_array.cc52 auto return_node = func_graph->get_return(); in SetGraphOutput() local
53 if (!CheckPrimitiveType(return_node, prim::kPrimReturn)) { in SetGraphOutput()
57 auto return_cnode = return_node->cast<CNodePtr>(); in SetGraphOutput()
62 auto output_node = return_node->input(kInputNodeIndex); in SetGraphOutput()
/third_party/mindspore/mindspore/lite/tools/converter/parser/
Dunused_node_remove_pass.cc25 auto return_node = func_graph->get_return(); in ProcessGraph() local
26 if (return_node == nullptr) { in ProcessGraph()
31 q.push_back(return_node); in ProcessGraph()
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/ascend/buffer_fusion/
Dfusion_base_pass.cc93 auto return_node = kernel_graph.get_return(); in MatchUBFusionPattern() local
94 MS_EXCEPTION_IF_NULL(return_node); in MatchUBFusionPattern()
95 if (return_node->inputs().size() <= 1) { in MatchUBFusionPattern()
/third_party/mindspore/mindspore/lite/tools/common/
Dfunc_graph_subgraph.cc462 auto return_node = belong_anf_->get_return(); in CreatePartialInBelongAnf() local
464 MS_ASSERT(return_node != nullptr && return_node->inputs().size() == 2); in CreatePartialInBelongAnf()
465 auto ori_output = return_node->inputs().at(1); in CreatePartialInBelongAnf()
602 auto return_node = belong_anf_->get_return(); in ApplySubGraph() local
603 MS_ASSERT(return_node != nullptr && return_node->inputs().size() == 2); in ApplySubGraph()
604 auto call_node = return_node->inputs().at(1); in ApplySubGraph()
/third_party/mindspore/mindspore/lite/tools/converter/import/
Dmindspore_importer.cc124 STATUS MindsporeImporter::GetFuncGraphOutputName(const CNodePtr &return_node) { in GetFuncGraphOutputName() argument
125 MS_ASSERT(return_node != nullptr); in GetFuncGraphOutputName()
126 for (size_t i = 0; i < return_node->inputs().size(); i++) { in GetFuncGraphOutputName()
127 auto output_node = return_node->input(i); in GetFuncGraphOutputName()
/third_party/glslang/glslang/MachineIndependent/
DpropagateNoContraction.cpp650 void propagateNoContractionInReturnNode(glslang::TIntermBranch* return_node) in propagateNoContractionInReturnNode() argument
653 assert(return_node->getFlowOp() == glslang::EOpReturn && return_node->getExpression()); in propagateNoContractionInReturnNode()
654 return_node->getExpression()->traverse(this); in propagateNoContractionInReturnNode()
/third_party/mindspore/mindspore/ccsrc/frontend/parallel/cache_embedding/
Dcache_embedding.cc663 CNodePtr return_node; in CacheEmbeddingForTrain() local
665 return_node = last_node->cast<CNodePtr>(); in CacheEmbeddingForTrain()
667 MS_EXCEPTION_IF_NULL(return_node); in CacheEmbeddingForTrain()
668 if (!IsPrimitiveCNode(return_node, prim::kPrimReturn)) { in CacheEmbeddingForTrain()
671 if (return_node->inputs().size() < 2) { in CacheEmbeddingForTrain()
675 auto depend_node = CreateDepend(graph, invalid_nodes, return_node->input(1)); in CacheEmbeddingForTrain()
676 if (!manager->Replace(return_node->input(1), depend_node)) { in CacheEmbeddingForTrain()
/third_party/mindspore/mindspore/core/load_mindir/
Danf_model_parser.cc995 auto return_node = outputFuncGraph->NewCNode(inputs); in BuildReturnForFuncGraph() local
996 MS_EXCEPTION_IF_NULL(return_node); in BuildReturnForFuncGraph()
997 return_node->set_load_flag(true); in BuildReturnForFuncGraph()
998 outputFuncGraph->set_return(return_node); in BuildReturnForFuncGraph()
1010 auto return_node = outputFuncGraph->NewCNode(inputs); in BuildReturnForFuncGraph() local
1011 MS_EXCEPTION_IF_NULL(return_node); in BuildReturnForFuncGraph()
1012 return_node->set_load_flag(true); in BuildReturnForFuncGraph()
1013 outputFuncGraph->set_return(return_node); in BuildReturnForFuncGraph()
/third_party/mindspore/mindspore/ccsrc/pipeline/jit/parse/
Dfunction_block.cc534 auto return_node = func_graph_->get_return(); in AttachIsolatedNodesBeforeReturn() local
535 if (return_node) { in AttachIsolatedNodesBeforeReturn()
537 if (return_node->inputs().size() < return_input_size) { in AttachIsolatedNodesBeforeReturn()
540 old_output = return_node->input(1); in AttachIsolatedNodesBeforeReturn()
Dparse.cc482 CNodePtr return_node = block_fg->NewCNodeInOrder({return_value_node, return_expr_node}); in ParseReturn() local
483 block_fg->set_return(return_node); in ParseReturn()
/third_party/mindspore/mindspore/lite/tools/converter/parser/onnx/
Donnx_model_parser.cc447 auto return_node = loop_body_graph->get_return(); in BuildBodyGraph() local
448 MS_CHECK_TRUE_MSG(return_node != nullptr, nullptr, "return node of subgraph is nullptr"); in BuildBodyGraph()
449 MS_ASSERT(return_node->inputs().size() == DIMENSION_2D); in BuildBodyGraph()
450 auto return_tuple_cnode = return_node->input(1)->cast<CNodePtr>(); in BuildBodyGraph()
762 auto return_node = subgraph->get_return(); in ConvertIfSubgraph() local
763 MS_CHECK_TRUE_MSG(return_node != nullptr, RET_ERROR, "subgraph has no return"); in ConvertIfSubgraph()
767 auto return_cnode = return_node->input(1)->cast<CNodePtr>(); in ConvertIfSubgraph()
772 return_act_inputs = {return_node->input(1)}; in ConvertIfSubgraph()
/third_party/mindspore/mindspore/lite/tools/anf_exporter/
Danf_exporter.cc280 schema::CNodeT *return_node) { in SetSubGraphOutputIndex() argument
282 MS_ASSERT(return_node != nullptr); in SetSubGraphOutputIndex()
289 auto ret = ConvertInputCNode(input_node, return_node); in SetSubGraphOutputIndex()
298 return_node->inputIndex.emplace_back(iter->second); in SetSubGraphOutputIndex()
304 return_node->inputIndex.emplace_back(meta_graphT->allTensors.size() - 1); in SetSubGraphOutputIndex()
311 for (unsigned int &i : return_node->inputIndex) { in SetSubGraphOutputIndex()
Danf_exporter.h66 … const std::unique_ptr<schema::MetaGraphT> &meta_graphT, schema::CNodeT *return_node);
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/graph_kernel/
Dgraph_kernel_splitter.cc284 auto return_node = func_graph->NewCNode(return_inputs); in CreateReturnNode() local
285 return_node->set_abstract(return_inputs.back()->abstract()); in CreateReturnNode()
286 func_graph->set_return(return_node); in CreateReturnNode()
287 nodes_.insert(return_node); in CreateReturnNode()
/third_party/mindspore/mindspore/lite/tools/optimizer/fusion/
Dtflite_lstm_cell_fusion.cc275 VectorRef return_node = VectorRef({is_return, make_tuple_node}); in GetBodyGraphPattern() local
279 auto pattern = SexpToNode(return_node, fg, primitive_vars.get(), true); in GetBodyGraphPattern()
315 auto return_node = func_graph->get_return(); in MatchGraph() local
321 EquivPtr equiv = pattern_engine.Match(pattern, return_node, *primitive_vars, empty_equiv); in MatchGraph()
Dtf_lstm_cell_fusion.cc177 VectorRef return_node = VectorRef({is_return, make_tuple_node}); in GetBodyGraphPattern() local
181 auto pattern = SexpToNode(return_node, is_fg, primitive_vars.get(), true); in GetBodyGraphPattern()
Dtf_bidirection_gru_fusion.cc370 VectorRef return_node = VectorRef({is_return, make_tuple_node}); in GetBodyGraphPattern() local
374 auto pattern = SexpToNode(return_node, is_fg, primitive_vars.get(), true); in GetBodyGraphPattern()
/third_party/mindspore/mindspore/core/ir/
Dfunc_graph_cloner.cc193 auto return_node = iter->second->cast<CNodePtr>(); in CloneFuncGraphValueNodes() local
194 MS_EXCEPTION_IF_NULL(return_node); in CloneFuncGraphValueNodes()
195 target_func_graph->set_return(return_node); in CloneFuncGraphValueNodes()
Dmanager.cc342 auto return_node = func_graph->get_return(); in AddFuncGraph() local
343 if (return_node != nullptr) { in AddFuncGraph()
344 (void)new_nodes.emplace_back(std::move(return_node)); in AddFuncGraph()
/third_party/mindspore/mindspore/ccsrc/backend/session/
Dsession_basic.cc486 auto return_node = node->cast<CNodePtr>(); in SetReturnNode() local
487 graph->set_return(return_node); in SetReturnNode()
488 auto graph_output = return_node->input(kReturnInputIdx); in SetReturnNode()
495 return_node->set_input(kReturnInputIdx, graph->TransTupleToMakeTuple(graph_output)); in SetReturnNode()
766 auto return_node = kernel_graph->NewCNode({primitive, parameter}); in CreateSwitchInput() local
767 return_node->set_abstract(cnode->abstract()); in CreateSwitchInput()
768 kernel_graph->set_return(return_node); in CreateSwitchInput()
855 auto return_node = kernel_graph->NewCNode(return_inputs); in ProcessNodeRetFunc() local
856 return_node->set_abstract(cnode->abstract()); in ProcessNodeRetFunc()
857 kernel_graph->set_return(return_node); in ProcessNodeRetFunc()
Danf_runtime_algorithm.cc200 auto return_node = kg->get_return(); in KeepOrder() local
201 MS_EXCEPTION_IF_NULL(return_node); in KeepOrder()
203 …{NewValueNode(prim::kPrimDepend), return_node->cast<CNodePtr>()->input(kFirstDataInputIndex), latt… in KeepOrder()
205 depend2->set_abstract(return_node->cast<CNodePtr>()->input(kFirstDataInputIndex)->abstract()); in KeepOrder()
2275 auto return_node = root_graph->get_return(); in InsertMakeTupleForOutput() local
2276 MS_EXCEPTION_IF_NULL(return_node); in InsertMakeTupleForOutput()
2277 if (return_node->size() <= kReturnDataIndex) { in InsertMakeTupleForOutput()
/third_party/mindspore/mindspore/ccsrc/frontend/parallel/
Dstep_parallel.cc2250 CNodePtr return_node = func_graph->get_return(); in FindLossCNode() local
2251 MS_EXCEPTION_IF_NULL(return_node); in FindLossCNode()
2252 if (return_node->size() < 2) { in FindLossCNode()
2253 MS_LOG(EXCEPTION) << "Failure: " << return_node->DebugString() << " size is smaller than 2"; in FindLossCNode()
2255 AnfNodePtr pre_node = return_node->input(1); in FindLossCNode()
2864 auto return_node = func_graph->get_return(); in MarkForwardCNode() local
2865 MS_EXCEPTION_IF_NULL(return_node); in MarkForwardCNode()
2866 auto all_dfs_nodes = DeepLinkedGraphSearch(return_node); in MarkForwardCNode()
/third_party/mindspore/mindspore/ccsrc/runtime/framework/
Dgraph_scheduler.cc765 const auto &return_node = func_graph_to_call_num.first->get_return(); in BuildSwitchActor() local
766 MS_EXCEPTION_IF_NULL(return_node); in BuildSwitchActor()
767 const auto &actor_name = return_node->DebugString(); in BuildSwitchActor()
769return_node->cast<CNodePtr>(), kInvalidBranchID, true); in BuildSwitchActor()
807 const auto &return_node = func_graph->get_return(); in BuildGatherActor() local
830 const auto &output_switch_actor = FetchActor(return_node->DebugString()); in BuildGatherActor()