Home
last modified time | relevance | path

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

12

/third_party/mindspore/mindspore/lite/tools/converter/acl/mapper/
Dspatial_node_adapter.cc43 CNodePtr CreateTupleGetItemNode(const FuncGraphPtr &func_graph, const CNodePtr &input_cnode) { in CreateTupleGetItemNode() argument
52 AnfNodePtrList inputs{tuple_get_item_prim, input_cnode, get_item_value}; in CreateTupleGetItemNode()
60 if (acl::GetShapeVectorFromCNode(input_cnode, &shape) != lite::RET_OK) { in CreateTupleGetItemNode()
64 TypeId type = acl::GetTypeFromNode(input_cnode); in CreateTupleGetItemNode()
71 get_item_cnode->set_fullname_with_scope(input_cnode->fullname_with_scope() + "_getitem"); in CreateTupleGetItemNode()
87 auto input_cnode = input->cast<CNodePtr>(); in AdapteNodeWithMultiOutputs() local
88 std::string input_func_name = GetCNodeFuncName(input_cnode); in AdapteNodeWithMultiOutputs()
91 CNodePtr get_item_cnode = CreateTupleGetItemNode(func_graph, input_cnode); in AdapteNodeWithMultiOutputs()
96 if (!manager->Replace(input_cnode, get_item_cnode)) { in AdapteNodeWithMultiOutputs()
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/ascend/buffer_fusion/
Dmulti_output_fusion_pass.cc35 auto input_cnode = eltwise_input->cast<CNodePtr>(); in MatchMultiOutputEltwise() local
36 MS_EXCEPTION_IF_NULL(input_cnode); in MatchMultiOutputEltwise()
37 eltwise_input = input_cnode->input(kIndex1); in MatchMultiOutputEltwise()
46 auto input_cnode = eltwise_input->cast<CNodePtr>(); in MatchMultiOutputEltwise() local
47 MS_EXCEPTION_IF_NULL(input_cnode); in MatchMultiOutputEltwise()
48 eltwise_input = input_cnode->input(kIndex1); in MatchMultiOutputEltwise()
Dconv2dbackprop_eltwise_eltwise_fusion_pass.cc39 auto input_cnode = eltwise_input->cast<CNodePtr>(); in MatchConv2DBackpropInputEltwiseEltwise() local
40 MS_EXCEPTION_IF_NULL(input_cnode); in MatchConv2DBackpropInputEltwiseEltwise()
41 auto double_in_eltwise_input = input_cnode->input(kIndex2); in MatchConv2DBackpropInputEltwiseEltwise()
52 auto double_in_eltwise_input_1 = input_cnode->input(kIndex1); in MatchConv2DBackpropInputEltwiseEltwise()
Dconv_single_in_fusion_pass.cc37 auto input_cnode = eltwise_input->cast<CNodePtr>(); in MatchConvSingleInEltwise() local
38 MS_EXCEPTION_IF_NULL(input_cnode); in MatchConvSingleInEltwise()
39 eltwise_input = input_cnode->input(kIndex1); in MatchConvSingleInEltwise()
Deltwise_fusion_pass.cc37 auto input_cnode = eltwise_input->cast<CNodePtr>(); in MatchEltwise() local
38 MS_EXCEPTION_IF_NULL(input_cnode); in MatchEltwise()
39 eltwise_input = input_cnode->input(kIndex1); in MatchEltwise()
Dconv_double_in_fusion_pass.cc37 auto input_cnode = eltwise_input->cast<CNodePtr>(); in MatchConvDoubleInEltwise() local
38 MS_EXCEPTION_IF_NULL(input_cnode); in MatchConvDoubleInEltwise()
39 auto double_in_eltwise_input = input_cnode->input(kIndex1); in MatchConvDoubleInEltwise()
Dstridedread_conv_stridedwrite_fusion_pass.cc34 auto input_cnode = write_input->cast<CNodePtr>(); in MatchStridedReadConvStridedWrite() local
35 MS_EXCEPTION_IF_NULL(input_cnode); in MatchStridedReadConvStridedWrite()
36 write_input = input_cnode->input(kIndex1); in MatchStridedReadConvStridedWrite()
Dsegment_eltwise_fusion_pass.cc33 auto input_cnode = eltwise_input->cast<CNodePtr>(); in MatchSegmentEltwise() local
34 MS_EXCEPTION_IF_NULL(input_cnode); in MatchSegmentEltwise()
35 eltwise_input = input_cnode->input(kIndex1); in MatchSegmentEltwise()
Dreduce_eltwise_fusion_pass.cc35 auto input_cnode = eltwise_input->cast<CNodePtr>(); in MatchReduceEltwise() local
36 MS_EXCEPTION_IF_NULL(input_cnode); in MatchReduceEltwise()
37 eltwise_input = input_cnode->input(kIndex1); in MatchReduceEltwise()
/third_party/mindspore/mindspore/ccsrc/frontend/optimizer/
Drecompute.cc132 auto input_cnode = input->cast<CNodePtr>(); in GetMaxSubGraph() local
133 if (recomputed_nodes->find(input_cnode) == recomputed_nodes->end() && in GetMaxSubGraph()
134 IsCandidateRecomputedNode(input_cnode)) { in GetMaxSubGraph()
135 nodes_to_visit.push(input_cnode); in GetMaxSubGraph()
374 auto input_cnode = input->cast<CNodePtr>(); in NewRecomputedNode() local
375 if (recomputed_origin_nodes.find(input_cnode) == recomputed_origin_nodes.end()) { in NewRecomputedNode()
376 if (IsPrimitiveCNode(input_cnode, prim::kPrimUpdateState)) { in NewRecomputedNode()
385 …(void)new_inputs.emplace_back(NewRecomputedNode(graph, input_cnode, first_target_inputs, recompute… in NewRecomputedNode()
425 auto input_cnode = input->cast<CNodePtr>(); in DuplicateRecomputedNodes() local
426 if (origin_recomputed_nodes.find(input_cnode) != origin_recomputed_nodes.end()) { in DuplicateRecomputedNodes()
[all …]
/third_party/mindspore/mindspore/lite/test/ut/tools/converter/registry/
Dpass_registry_test.cc78 auto input_cnode = input->cast<CNodePtr>(); in CanFusion() local
79 auto add_primc = GetValueNode<std::shared_ptr<ops::AddFusion>>(input_cnode->input(0)); in CanFusion()
117 auto input_cnode = input_node->cast<CNodePtr>(); in Execute() local
118 for (size_t j = 1; j < input_cnode->size(); ++j) { in Execute()
119 inputs.push_back(input_cnode->input(j)); in Execute()
/third_party/mindspore/mindspore/lite/tools/optimizer/fisson/
Diter_node_outputs.cc37 auto input_cnode = input_node->cast<CNodePtr>(); in Run() local
38 auto input_name = input_cnode->fullname_with_scope(); in Run()
/third_party/mindspore/mindspore/lite/tools/common/
Dfunc_graph_subgraph.cc194 auto input_cnode = utils::cast<CNodePtr>(input); in InitSubGraphNode() local
195 MS_CHECK_TRUE_MSG(input_cnode != nullptr, RET_NULL_PTR, "cast ptr failed"); in InitSubGraphNode()
196 if (this->nodes_.count(input_cnode) == 0) { in InitSubGraphNode()
233 auto input_cnode = utils::cast<CNodePtr>(input); in InitSubGraphInNode() local
234 MS_CHECK_TRUE_MSG(input_cnode != nullptr, false, "cast failed"); in InitSubGraphInNode()
235 if (this->nodes_.count(input_cnode) == 0) { in InitSubGraphInNode()
499 auto input_cnode = utils::cast<CNodePtr>(input); in CreateParameterForPartialSubGraph() local
500 MS_CHECK_TRUE_MSG(input_cnode != nullptr, RET_NULL_PTR, "cast ptr failed"); in CreateParameterForPartialSubGraph()
501 if (this->GetNodes().count(input_cnode) > 0) { in CreateParameterForPartialSubGraph()
/third_party/mindspore/mindspore/lite/tools/optimizer/fusion/
Dconstant_folding_fusion.cc324 auto input_cnode = input_node->cast<CNodePtr>(); in CheckCanFusion() local
325 if (IsMarkedTrainOp(input_cnode)) { in CheckCanFusion()
349 auto input_cnode = input_node->cast<CNodePtr>(); in Process() local
350 auto input_tensors = GetCNodeInputTensors(input_cnode, fmk_type_); in Process()
355 auto output_nums = GetOutputTensorNum(input_cnode); in Process()
366 if (CopyQuantParams(input_cnode, input_tensors, output_tensors) != lite::RET_OK) { in Process()
371 …auto lite_kernel = GetLiteKernel(input_tensors, &output_tensors, input_cnode, context_.get(), ms_c… in Process()
Dnorm_fusion.cc140 bool NormFusion::GetNormTypeAndAxis(const FuncGraphPtr &func_graph, const CNodePtr &input_cnode, in GetNormTypeAndAxis() argument
144 MS_ASSERT(input_cnode != nullptr); in GetNormTypeAndAxis()
148 auto abstract = input_cnode->abstract(); in GetNormTypeAndAxis()
161 if (shape_size_map.find(input_cnode->fullname_with_scope()) != shape_size_map.end()) { in GetNormTypeAndAxis()
162 shape_size = shape_size_map[input_cnode->fullname_with_scope()]; in GetNormTypeAndAxis()
259 auto input_cnode = input_node->cast<CNodePtr>(); in CheckPattern() local
273 …return GetNormTypeAndAxis(func_graph, input_cnode, mean1_axes, gamma_shape, type, begin_norm_axis,… in CheckPattern()
Dnorm_fusion.h49 bool GetNormTypeAndAxis(const FuncGraphPtr &func_graph, const CNodePtr &input_cnode,
/third_party/mindspore/mindspore/lite/tools/converter/quantizer/
Dquant_cast.cc53 auto input_cnode = std::dynamic_pointer_cast<mindspore::CNode>(input_node); in InsertCastNode() local
54 input_cnode_primitive_c = GetValueNode<std::shared_ptr<ops::PrimitiveC>>(input_cnode->input(0)); in InsertCastNode()
56 MS_LOG(DEBUG) << "input: " << input_index << " " << input_cnode->fullname_with_scope() << ": " in InsertCastNode()
Dfull_quant_quantizer.cc380 auto input_cnode = input->cast<CNodePtr>(); in ComputeThreshold() local
387 if (output_diverg_cnode == input_cnode) { in ComputeThreshold()
388 if (NodePrimitiveType(input_cnode) != lite::kNameTupleGetItem) { in ComputeThreshold()
737 auto input_cnode = input_node->cast<mindspore::CNodePtr>(); in QuantNodeSimpleOp() local
738 auto input_cnode_primitive = GetValueNode<PrimitivePtr>(input_cnode->input(0)); in QuantNodeSimpleOp()
740 MS_LOG(DEBUG) << "input: " << i << " " << input_cnode->fullname_with_scope() << ": " in QuantNodeSimpleOp()
810 auto input_cnode = input_node->cast<mindspore::CNodePtr>(); in QuantNode() local
811 MS_CHECK_TRUE_MSG(input_cnode != nullptr, RET_ERROR, "input_cnode == nullptr"); in QuantNode()
812 auto input_cnode_primitive = GetValueNode<PrimitivePtr>(input_cnode->input(0)); in QuantNode()
826 … MS_LOG(WARNING) << "this TupleGetItem node's input node: " << input_cnode->fullname_with_scope() in QuantNode()
/third_party/mindspore/mindspore/lite/tools/optimizer/graph/
Dinfershape_pass.cc354 auto input_cnode = return_node->input(i)->cast<CNodePtr>(); in SetSubGraphAbstract() local
355 MS_ASSERT(input_cnode != nullptr); in SetSubGraphAbstract()
356 if (opt::CheckPrimitiveType(input_cnode, prim::kPrimTupleGetItem)) { in SetSubGraphAbstract()
357 input_cnode = input_cnode->input(1)->cast<CNodePtr>(); in SetSubGraphAbstract()
359 auto input_prim = GetValueNode<PrimitivePtr>(input_cnode->input(0)); in SetSubGraphAbstract()
Dnode_infershape.cc340 auto input_cnode = cnode->input(i)->cast<CNodePtr>(); in GetCNodeVarInput() local
341 MS_ASSERT(input_cnode != nullptr); in GetCNodeVarInput()
342 PrimitivePtr input_prim = GetValueNode<PrimitivePtr>(input_cnode->input(0)); in GetCNodeVarInput()
343 if (CheckPrimitiveType(input_cnode, prim::kPrimTupleGetItem)) { in GetCNodeVarInput()
344 auto item_input_cnode = input_cnode->input(1)->cast<CNodePtr>(); in GetCNodeVarInput()
Ddecrease_transpose_algo.cc602 auto input_cnode = return_node->input(i)->cast<CNodePtr>(); in SetSubGraphAbstract() local
603 MS_CHECK_TRUE_MSG(input_cnode != nullptr, lite::RET_ERROR, "input_cnode is nullptr"); in SetSubGraphAbstract()
604 if (CheckPrimitiveType(input_cnode, prim::kPrimTupleGetItem)) { in SetSubGraphAbstract()
605 input_cnode = input_cnode->input(1)->cast<CNodePtr>(); in SetSubGraphAbstract()
607 auto input_prim = GetValueNode<PrimitivePtr>(input_cnode->input(0)); in SetSubGraphAbstract()
Dtranspose_strategy.cc349 auto input_cnode = trans_input_node->cast<CNodePtr>(); in TransposePairFuseWhenInsert() local
350 if (input_cnode == nullptr) { in TransposePairFuseWhenInsert()
354 if (GetTransposePerm(input_cnode, &trans_perm) != lite::RET_OK) { in TransposePairFuseWhenInsert()
359 return input_cnode->input(kFirstInput); in TransposePairFuseWhenInsert()
/third_party/mindspore/mindspore/ccsrc/pipeline/jit/static_analysis/
Dorder_enforce.cc295 auto input_cnode = dyn_cast<CNode>(input); in IsDependOn() local
296 if (input_cnode != nullptr) { in IsDependOn()
297 input_cnode->seen_ = seen; in IsDependOn()
298 q.push(input_cnode); in IsDependOn()
/third_party/mindspore/mindspore/lite/tools/anf_exporter/
Danf_exporter.cc628 auto input_cnode = utils::cast<CNodePtr>(input_anode); in ConvertInputCNode() local
629 MS_CHECK_TRUE_MSG(input_cnode != nullptr, RET_ERROR, "cast ptr failed"); in ConvertInputCNode()
630 auto input_value_node = input_cnode->input(kPrimIndex)->cast<ValueNodePtr>(); in ConvertInputCNode()
632 if (!IsCall(input_cnode)) { in ConvertInputCNode()
637 auto cnode_input = input_cnode->inputs(); in ConvertInputCNode()
640 input_cnode->set_inputs(cnode_input); in ConvertInputCNode()
644 input_value_node = input_cnode->input(kPrimIndex)->cast<ValueNodePtr>(); in ConvertInputCNode()
646 …if (input_value_node->value() == nullptr || !opt::CheckPrimitiveType(input_cnode, prim::kPrimTuple… in ConvertInputCNode()
649 auto inputs = input_cnode->inputs(); in ConvertInputCNode()
/third_party/mindspore/mindspore/lite/tools/converter/
Danf_transform.cc92 auto input_cnode = utils::cast<CNodePtr>(input_node); in MarkTrainInputOp() local
93 MS_CHECK_TRUE_RET(input_cnode != nullptr, RET_ERROR); in MarkTrainInputOp()
94 auto prim = GetValueNode<PrimitivePtr>(input_cnode->input(0)); in MarkTrainInputOp()

12