Home
last modified time | relevance | path

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

12345678

/third_party/mindspore/mindspore/ccsrc/frontend/parallel/
Dstep_parallel_utils.cc52 ValueNodePtr anf_node = cnode->input(0)->cast<ValueNodePtr>(); in IsSomePrimitive()
60 ValueNodePtr prim_node = cnode->input(0)->cast<ValueNodePtr>(); in IsParallelCareNode()
87 inputs_seq = node->cast<ValueNodePtr>()->value()->cast<ValueListPtr>()->value(); in GetValueListShape()
89 inputs_seq = node->cast<ValueNodePtr>()->value()->cast<ValueTuplePtr>()->value(); in GetValueListShape()
168 auto prim_anf_node = new_node_input[0]->cast<ValueNodePtr>(); in SetCommunicationOpGroupLabel()
Dstep_auto_parallel.cc184 ValueNodePtr prim_node = cnode->input(0)->cast<ValueNodePtr>(); in IsAutoParallelCareNode()
412 ValueNodePtr prim_anf_node = cnode->input(0)->cast<ValueNodePtr>(); in ConstructCostGraphNodesByUniqueId()
525 ValueNodePtr prim_anf_node = cnode->input(0)->cast<ValueNodePtr>(); in ConstructCostGraphNodesByUniqueIdTC()
660 ValueNodePtr prim_anf_node = inputs[0]->cast<ValueNodePtr>(); in ConstructCostGraphEdges()
674 ValueNodePtr prev_prim_anf_node = prev_cnode->input(0)->cast<ValueNodePtr>(); in ConstructCostGraphEdges()
695 prev_prim_anf_node = prev_cnode->input(0)->cast<ValueNodePtr>(); in ConstructCostGraphEdges()
712 prev_prim_anf_node = prev_cnode->input(0)->cast<ValueNodePtr>(); in ConstructCostGraphEdges()
1008 CNodePtr GetInternalOperatorInfo(const CNodePtr &cnode, const ValueNodePtr &prim_anf_node) { in GetInternalOperatorInfo()
1015 auto prev_prim = prev_cnode->input(0)->cast<ValueNodePtr>()->value()->cast<PrimitivePtr>(); in GetInternalOperatorInfo()
1021 prev_prim = prev_cnode->input(0)->cast<ValueNodePtr>()->value()->cast<PrimitivePtr>(); in GetInternalOperatorInfo()
Dstep_parallel.cc71 auto prim_anf_node = new_node_input[0]->cast<ValueNodePtr>(); in SetMiniStepOpDoMirrorLabel()
85 auto prim_anf_node = new_node_input[0]->cast<ValueNodePtr>(); in SetAllReduceRecomputeFlag()
90 auto anf_node = node->input(0)->cast<ValueNodePtr>(); in SetAllReduceRecomputeFlag()
216 auto new_node_value = node_input[0]->cast<ValueNodePtr>(); in InsertNode()
394 auto value_node = middle_node->input(2)->cast<ValueNodePtr>(); in GetTensorInLayout()
438 auto middle_value = middle_node->input(0)->cast<ValueNodePtr>(); in Redistribution()
502 ValueNodePtr prim_anf_node = cnode->input(0)->cast<ValueNodePtr>(); in HasStrategy()
528 ValueNodePtr prim_value_node = cnode->input(0)->cast<ValueNodePtr>(); in FindCommunicationOp()
559 auto current_value = node->input(0)->cast<ValueNodePtr>(); in StepRedistribution()
574 ValueNodePtr prim_anf_node = use_cnode->input(0)->cast<ValueNodePtr>(); in StepRedistribution()
[all …]
/third_party/mindspore/mindspore/ccsrc/frontend/parallel/graph_util/
Dnode_info.cc71 inputs_seq = node_inputs[1]->cast<ValueNodePtr>()->value()->cast<ValueListPtr>()->value(); in ExtractInputParameterByNode()
73 inputs_seq = node_inputs[1]->cast<ValueNodePtr>()->value()->cast<ValueTuplePtr>()->value(); in ExtractInputParameterByNode()
161 inputs_seq = node_inputs[1]->cast<ValueNodePtr>()->value()->cast<ValueListPtr>()->value(); in ExtractInputTypeLengthByNode()
163 inputs_seq = node_inputs[1]->cast<ValueNodePtr>()->value()->cast<ValueTuplePtr>()->value(); in ExtractInputTypeLengthByNode()
272 auto value_node = cnode->input(0)->cast<ValueNodePtr>(); in AnfNodeIsPrimitive()
288 ValueNodePtr prim_anf_node = cnode->input(0)->cast<ValueNodePtr>(); in FindReshape()
328 ValueNodePtr prim_anf_node = cnode->input(0)->cast<ValueNodePtr>(); in FindReshapePreNodeStraCosts()
381 ValueNodePtr prim_anf_node = use_apply->input(0)->cast<ValueNodePtr>(); in FindReshapeNextNodeStraCosts()
Dgraph_info.cc37 ValueNodePtr prim_node_anf = node->cast<ValueNodePtr>(); in FindPrimtive()
/third_party/mindspore/tests/ut/cpp/parallel/
Dstep_auto_parallel_test.cc74 PrimitivePtr prim = node->input(0)->cast<ValueNodePtr>()->value()->cast<PrimitivePtr>(); in Create_Node()
116 PrimitivePtr prim = MatMul_1_node->input(0)->cast<ValueNodePtr>()->value()->cast<PrimitivePtr>(); in Create_two_nodes()
128 PrimitivePtr prim2 = MatMul_2_node->input(0)->cast<ValueNodePtr>()->value()->cast<PrimitivePtr>(); in Create_two_nodes()
143 bool result = node->input(0)->cast<ValueNodePtr>()->value()->isa<Primitive>(); in TEST_F()
146 PrimitivePtr prim = node->input(0)->cast<ValueNodePtr>()->value()->cast<PrimitivePtr>(); in TEST_F()
171 PrimitivePtr v_prim = node->input(0)->cast<ValueNodePtr>()->value()->cast<PrimitivePtr>(); in TEST_F()
173 …PrimitivePtr u_prim = node->input(1)->cast<CNodePtr>()->input(0)->cast<ValueNodePtr>()->value()->c… in TEST_F()
/third_party/mindspore/mindspore/ccsrc/frontend/optimizer/irpass/
Dspecial_op_eliminate.h296 auto prim_anf_node = node_input[0]->cast<ValueNodePtr>(); in operator()
335 auto prim_anf_node = node_input[0]->cast<ValueNodePtr>(); in operator()
432 ValueNodePtr value_node = node->cast<ValueNodePtr>(); in CheckNameSpaceVNode()
440 ValueNodePtr value_node = node->cast<ValueNodePtr>(); in CheckSymbolVNode()
447 ValueNodePtr value_node = node->cast<ValueNodePtr>(); in CheckStrVNode()
507 auto value_node = rep->cast<ValueNodePtr>(); in OperatorHandle1()
521 auto value_node = rep->cast<ValueNodePtr>(); in OperatorHandle2()
535 auto value_node = rep->cast<ValueNodePtr>(); in OperatorHandle3()
556 ValueNodePtr new_node; in OperatorHandle4()
557 auto value_node = rep->cast<ValueNodePtr>(); in OperatorHandle4()
[all …]
Dgradient_eliminate.cc24 AnfNodePtr ExpandJPrimitive(const ValueNodePtr &vnode, const pipeline::ResourceBasePtr &resource) { in ExpandJPrimitive()
86 AnfNodePtr ExpandJ(const ValueNodePtr &vnode, const pipeline::ResourceBasePtr &resource) { in ExpandJ()
125 …auto expanded_j = internal::ExpandJ(j_node->input(1)->cast<ValueNodePtr>(), optimizer->resource()); in operator ()()
Ditem_tuple_or_list_eliminate.h69 void Visit(const ValueNodePtr &vnode) override { in Visit()
118 void Visit(const ValueNodePtr &vnode) override { in Visit()
163 void Visit(const ValueNodePtr &vnode) override { in Visit()
246 void Visit(const ValueNodePtr &vnode) override { in Visit()
328 void Visit(const ValueNodePtr &vnode) override { in Visit()
441 void Visit(const ValueNodePtr &vnode) override { c_ = vnode; } in Visit()
Darithmetic_simplify.cc135 ValuePtr x_value = x_->cast<ValueNodePtr>()->value(); in operator ()()
139 auto x_tensor = GetValueNode<tensor::TensorPtr>(x_->cast<ValueNodePtr>()); in operator ()()
149 ValuePtr z_value = z_->cast<ValueNodePtr>()->value(); in operator ()()
153 auto z_tensor = GetValueNode<tensor::TensorPtr>(z_->cast<ValueNodePtr>()); in operator ()()
/third_party/mindspore/mindspore/ccsrc/backend/session/
Dkernel_graph.h132 ValueNodePtr NewValueNode(const AbstractBasePtr &abstract, const ValuePtr &value);
133 ValueNodePtr NewValueNode(const ValueNodePtr &value_node = nullptr);
134 ValueNodePtr NewValueNode(const tensor::TensorPtr &input_tensor);
160 ValueNodePtr GetValueNodeByTensor(const tensor::TensorPtr &tensor);
162 void TensorValueNodeMapAdd(const tensor::TensorPtr &tensor, const ValueNodePtr &value_node);
164 const std::unordered_set<ValueNodePtr> graph_value_nodes() const { return graph_value_nodes_; } in graph_value_nodes()
166 void AddValueNodeToGraph(const ValueNodePtr &value_node);
382 bool RemoveValueNodeFromGraph(const ValueNodePtr &value_node);
415 std::unordered_map<tensor::TensorPtr, ValueNodePtr> tensor_to_value_node_map_;
417 std::unordered_set<ValueNodePtr> graph_value_nodes_;
Dkernel_graph.cc104 void SyncDeviceInfoToValueNode(const ValueNodePtr &value_node, std::vector<std::string> *device_for… in SyncDeviceInfoToValueNode()
143 auto value_node = node->cast<ValueNodePtr>(); in MakeValueNode()
147 ValueNodePtr new_value_node = std::make_shared<ValueNode>(value_node->value()); in MakeValueNode()
536 auto value_node = node->cast<ValueNodePtr>(); in SetKernelInfoForNode()
588 ValueNodePtr KernelGraph::NewValueNode(const ValueNodePtr &value_node) { in NewValueNode()
590 auto new_value_node = MakeValueNode(value_node)->cast<ValueNodePtr>(); in NewValueNode()
595 ValueNodePtr KernelGraph::NewValueNode(const AbstractBasePtr &abstract, const ValuePtr &value) { in NewValueNode()
598 ValueNodePtr new_value_node = std::make_shared<ValueNode>(value); in NewValueNode()
606 ValueNodePtr KernelGraph::NewValueNode(const tensor::TensorPtr &input_tensor) { in NewValueNode()
704 auto value_node = node->cast<ValueNodePtr>(); in TransTupleToMakeTuple()
[all …]
/third_party/mindspore/mindspore/core/ir/
Dgraph_utils_extends.cc100 void Visit(const ValueNodePtr &vnode) override { in Visit()
136 void Visit(const ValueNodePtr &vnode) override { in Visit()
161 void Visit(const ValueNodePtr &) override {} in Visit() argument
176 void Visit(const ValueNodePtr &) override {} in Visit() argument
/third_party/mindspore/mindspore/lite/tools/optimizer/common/
Dformat_utils.cc162 if (utils::isa<ValueNodePtr>(cnode->input(i))) { in RemoveIfMonad()
163 auto value_node = cnode->input(i)->cast<ValueNodePtr>(); in RemoveIfMonad()
179 if (!utils::isa<ValueNodePtr>(node)) { in IsMonadNode()
182 auto value_node = node->cast<ValueNodePtr>(); in IsMonadNode()
/third_party/mindspore/mindspore/lite/tools/converter/import/
Dprimitive_adjust.cc211 auto value_node = cnode->input(0)->cast<ValueNodePtr>(); in MoveAttrMapCommon()
227 auto value_node = cnode->input(0)->cast<ValueNodePtr>(); in MoveAttrMapActivation()
249 auto value_node = cnode->input(0)->cast<ValueNodePtr>(); in MoveAttrMapActivationGrad()
271 auto value_node = cnode->input(0)->cast<ValueNodePtr>(); in MoveAttrMapReduce()
294 auto value_node = cnode->input(0)->cast<ValueNodePtr>(); in MoveAttrMapConv2D()
342 auto value_node = cnode->input(0)->cast<ValueNodePtr>(); in MoveAttrPool()
378 auto value_node = cnode->input(0)->cast<ValueNodePtr>(); in MoveAttrPoolGrad()
414 auto value_node = cnode->input(0)->cast<ValueNodePtr>(); in MoveAttrMapAdder()
445 auto value_node = cnode->input(0)->cast<ValueNodePtr>(); in MoveAttrMapLayerNorm()
465 auto value_node = cnode->input(0)->cast<ValueNodePtr>(); in MoveAttrMapResize()
[all …]
/third_party/mindspore/mindspore/lite/tools/common/
Dnode_util.cc356 auto vnode_value = cnode->input(0)->cast<ValueNodePtr>()->value(); in IsPartialFusion()
379 auto vnode = cnode_first_input->cast<ValueNodePtr>(); in IsCall()
405 ValueNodePtr GetPartialFusionPrim() { in GetPartialFusionPrim()
408 ValueNodePtr partial_anf_prim = NewValueNode(partial_prim); in GetPartialFusionPrim()
413 ValueNodePtr GetSwitchAnfPrim() { in GetSwitchAnfPrim()
416 ValueNodePtr switch_anf_prim = NewValueNode(switch_prim); in GetSwitchAnfPrim()
421 ValueNodePtr GetCallAnfPrim() { in GetCallAnfPrim()
424 ValueNodePtr call_anf_prim = NewValueNode(call_prim); in GetCallAnfPrim()
/third_party/mindspore/mindspore/lite/tools/converter/parser/
Dparser_utils.cc55 MS_ASSERT(node->cast<ValueNodePtr>() != nullptr); in GetAllFuncGraph()
56 MS_ASSERT(node->cast<ValueNodePtr>()->value() != nullptr); in GetAllFuncGraph()
57 MS_ASSERT((node->cast<ValueNodePtr>()->value())->cast<FuncGraphPtr>() != nullptr); in GetAllFuncGraph()
58 auto new_fg = (node->cast<ValueNodePtr>()->value())->cast<FuncGraphPtr>(); in GetAllFuncGraph()
67 MS_ASSERT(input->cast<ValueNodePtr>() != nullptr); in GetAllFuncGraph()
68 MS_ASSERT(input->cast<ValueNodePtr>()->value() != nullptr); in GetAllFuncGraph()
69 MS_ASSERT((input->cast<ValueNodePtr>()->value())->cast<FuncGraphPtr>() != nullptr); in GetAllFuncGraph()
70 auto new_fg = (input->cast<ValueNodePtr>()->value())->cast<FuncGraphPtr>(); in GetAllFuncGraph()
/third_party/mindspore/tests/ut/cpp/ir/
Dclone_test.cc45 ValueNodePtr one;
46 ValueNodePtr two;
47 ValueNodePtr three;
98 …ASSERT_TRUE(find(results.begin(), results.end(), *x->cast<ValueNodePtr>()->value()->cast<Primitive… in TEST_F()
/third_party/mindspore/mindspore/ccsrc/frontend/optimizer/ad/
Ddfunctor.h104 ValueNodePtr GenNewTensor(const CNodePtr &forward_node);
141 FuncGraphPtr KPrimitive(const CNodePtr &primal_user, const ValueNodePtr &value_node,
159 FuncGraphPtr GetBprop(const CNodePtr &cnode, const ValueNodePtr &value_node,
163 …FuncGraphPtr FakeBprop(const ValueNodePtr &value_node, const pipeline::ResourceBasePtr &resources);
164 FuncGraphPtr BpropCut(const ValueNodePtr &value_node, const pipeline::ResourceBasePtr &resources);
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/common/
Dhelper.cc87 auto value_node = in->cast<ValueNodePtr>(); in UnVisited()
154 auto value_node = in->cast<ValueNodePtr>(); in Visited()
504 ValueNodePtr CreateShapeValueNode(const FuncGraphPtr &func_graph, const std::vector<int64_t> &shape… in CreateShapeValueNode()
567 auto value_node = input_node->cast<ValueNodePtr>(); in ConstInputToAttr()
593 auto a_value_node = a_node->cast<ValueNodePtr>(); in AnfEqual()
600 auto b_value_node = b_node->cast<ValueNodePtr>(); in AnfEqual()
609 auto a_value_node_ptr = a_node->cast<ValueNodePtr>(); in AnfEqual()
618 auto b_value_node_ptr = b_node->cast<ValueNodePtr>(); in AnfEqual()
646 ValueNodePtr CreateValueNodeWithSexp(const BaseRef &sexp) { in CreateValueNodeWithSexp()
865 auto value_node1 = index_input1->cast<ValueNodePtr>(); in CompareTupleGetitem()
[all …]
/third_party/mindspore/tests/ut/cpp/pipeline/parse/
Dparser_abnormal_test.cc99 …if (node != nullptr && node->isa<ValueNode>() && node->cast<ValueNodePtr>()->value()->isa<StringIm… in TEST_F()
100 if (GetValue<std::string>(node->cast<ValueNodePtr>()->value()) == "append") { in TEST_F()
/third_party/mindspore/mindspore/lite/tools/anf_exporter/
Dfetch_content.cc114 int FetchFromTensorValue(const ValueNodePtr &value_node, const PrimitivePtr &primitive, converter::… in FetchFromTensorValue()
151 int FetchFromInt32OrInt64ImmValue(const ValueNodePtr &value_node, const PrimitivePtr &primitive, Da… in FetchFromInt32OrInt64ImmValue()
167 int FetchFromBoolImmValue(const ValueNodePtr &value_node, const PrimitivePtr &primitive, DataInfo *… in FetchFromBoolImmValue()
184 int FetchFromNumberValue(const ValueNodePtr &value_node, const PrimitivePtr &primitive, DataInfo *d… in FetchFromNumberValue()
202 int FetchFromSequenceValue(const ValueNodePtr &value_node, const PrimitivePtr &primitive, DataInfo … in FetchFromSequenceValue()
303 auto value_node = cnode->input(index)->cast<ValueNodePtr>(); in FetchDataFromValueNode()
435 auto value_node = depend_node->input(0)->cast<ValueNodePtr>(); in RemoveIfDepend()
476 auto value_node = make_tuple_node->input(0)->cast<ValueNodePtr>(); in RemoveIfMakeTuple()
/third_party/mindspore/mindspore/lite/tools/optimizer/graph/
Dcontrol_flow_pass.cc211 if (!utils::isa<ValueNodePtr>(cur_node)) { in CreateAfterGraph()
235 ValueNodePtr cond_partial_anf_primitive = lite::GetPartialFusionPrim(); in CreateWhileCondCallNode()
296 ValueNodePtr partial_anf_primitive = lite::GetPartialFusionPrim(); in CreateWhileBodyPartialNode()
368 ValueNodePtr partial_anf_primitive = lite::GetPartialFusionPrim(); in CreateWhileAfterPartialNode()
392 auto value_node = utils::cast<ValueNodePtr>(index_vnode); in CreateWhileAfterPartialNode()
476 ValueNodePtr switch_anf_primitive = lite::GetSwitchAnfPrim(); in ProcessWhileOp()
499 auto after_cnode = after_partial_cnode->input(kCNodeFirstInputIndex)->cast<ValueNodePtr>(); in ProcessWhileOp()
555 ValueNodePtr then_partial_anf_primitive = lite::GetPartialFusionPrim(); in CreateIfPartialNode()
603 ValueNodePtr after_partial_anf_primitive = lite::GetPartialFusionPrim(); in CreateIfPartialNode()
719 ValueNodePtr switch_anf_primitive = lite::GetSwitchAnfPrim(); in ProcessIfOp()
/third_party/mindspore/mindspore/lite/tools/converter/acl/mapper/
Dprimitive_mapper.cc42 STATUS PrimitiveMapper::GetValueNodeAndPrimFromCnode(const CNodePtr &cnode, ValueNodePtr *value_nod… in GetValueNodeAndPrimFromCnode()
48 *value_node = cnode->input(0)->cast<ValueNodePtr>(); in GetValueNodeAndPrimFromCnode()
153 ValueNodePtr value_node = nullptr; in MoveAttrMap()
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/ascend/ir_fusion/
Dbatchnorm_to_bninfer.cc52 ValueNodePtr value_node = index_node->cast<ValueNodePtr>(); in CheckIndex()

12345678