Home
last modified time | relevance | path

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

12345

/third_party/mindspore/mindspore/ccsrc/frontend/optimizer/irpass/
Dupdatestate_eliminate.cc100 …if (IsPrimitiveCNode(first_input_node, prim::kPrimCall) || IsPrimitiveCNode(first_input_node, prim… in CheckHasMonadInput()
101 IsPrimitiveCNode(first_input_node, prim::kPrimSwitchLayer)) { in CheckHasMonadInput()
206 if (IsPrimitiveCNode(attach, prim::kPrimLoad)) { in GetLoadsFromUpdateState()
208 } else if (IsPrimitiveCNode(attach, prim::kPrimMakeTuple)) { in GetLoadsFromUpdateState()
218 if (IsPrimitiveCNode(load_attach, prim::kPrimUpdateState)) { in GetLoadsFollowLoad()
233 …return (IsPrimitiveCNode(node, prim::kPrimLoad) && node->cast<CNodePtr>()->input(kAttachIndex) == … in GetLoadsFollowTuple()
247 if (IsPrimitiveCNode(prev_node, prim::kPrimUpdateState)) { in GetLoadsFollowTuple()
299 if (IsPrimitiveCNode(user.first, prim::kPrimDepend) && user.second == kAttachIndex) { in EliminateUselessNodesForUpdateStates()
400 if (IsPrimitiveCNode(a1, prim::kPrimAssign)) { in EliminateUpdateStateBetweenAssigns()
437 if (IsPrimitiveCNode(attach, prim::kPrimAssign)) { in EliminateLoadBeforeAssigns()
[all …]
Dvalue_based_eliminate.cc74 if (IsPrimitiveCNode(node, prim::kPrimReduceSum) || IsPrimitiveCNode(node, prim::kPrimSqueeze)) { in IsCNodePositive()
77 if (IsPrimitiveCNode(node, prim::kPrimSquare) || IsPrimitiveCNode(node, prim::kPrimSqrt)) { in IsCNodePositive()
80 if (IsPrimitiveCNode(node, prim::kPrimMinimum) || IsPrimitiveCNode(node, prim::kPrimRealDiv)) { in IsCNodePositive()
Dcast_eliminate.cc30 while (IsPrimitiveCNode(cur_node, prim::kPrimDepend)) { in TransThroughDepend()
66 if (IsPrimitiveCNode(node->cast<CNodePtr>()->input(2), prim::kPrimDepend)) { in operator ()()
72 if (IsPrimitiveCNode(node->cast<CNodePtr>()->input(1), prim::kPrimResizeBilinear)) { in operator ()()
105 if (IsPrimitiveCNode(node, prim::kPrimCast)) { in Visit()
Dreduce_eliminate.h46 …if (IsPrimitiveCNode(node, prim::kPrimReduceMean) || IsPrimitiveCNode(node, prim::kPrimReduceAll) … in operator()
47IsPrimitiveCNode(node, prim::kPrimReduceSum) || IsPrimitiveCNode(node, prim::kPrimReduceMax) || in operator()
48 IsPrimitiveCNode(node, prim::kPrimReduceMin)) { in operator()
Drecompute_prepare.h63 …if (IsPrimitiveCNode(output_cnode, prim::kPrimDepend) || IsPrimitiveCNode(output_cnode, prim::kPri… in GetRealOutputNodes()
65 } else if (IsPrimitiveCNode(output_cnode, prim::kPrimMakeTuple)) { in GetRealOutputNodes()
Ditem_tuple_or_list_eliminate.h113 …if (IsPrimitiveCNode(cnode, prim::kPrimMakeTuple) || IsPrimitiveCNode(cnode, prim::kPrimMakeList))… in Visit()
240 …if (IsPrimitiveCNode(cnode, prim::kPrimMakeTuple) || IsPrimitiveCNode(cnode, prim::kPrimMakeList))… in Visit()
313 …if (IsPrimitiveCNode(cnode, prim::kPrimTupleSetItem) || IsPrimitiveCNode(cnode, prim::kPrimListSet… in Visit()
415 if (!IsPrimitiveCNode(y_, prim::kPrimUpdateState)) { in ExistUpdateStateUser()
428 return IsPrimitiveCNode(user.first, prim::kPrimUpdateState); in ExistUpdateStateUser()
435 if (IsPrimitiveCNode(cnode, prim::kPrimDepend) && cnode->size() == 3) { in Visit()
Dspecial_op_eliminate.h66 if (IsPrimitiveCNode(node, prim::kPrimHookBackward)) { in operator()
87 if (!IsPrimitiveCNode(node, prim::kPrimVirtualDataset) || node->func_graph() == nullptr) { in operator()
110 if (!IsPrimitiveCNode(node, prim::kPrimVirtualOutput) || node->func_graph() == nullptr) { in operator()
127 if (!IsPrimitiveCNode(node, prim::kPrimReceive) || node->func_graph() == nullptr) { in operator()
144 if (!IsPrimitiveCNode(node, prim::kPrimVirtualAssignAdd) || node->func_graph() == nullptr) { in operator()
163 if (!IsPrimitiveCNode(node, prim::kPrimVirtualAccuGrad) || node->func_graph() == nullptr) { in operator()
183 if (!IsPrimitiveCNode(node, prim::kPrimMirrorMicroStep) || node->func_graph() == nullptr) { in operator()
240 if (!IsPrimitiveCNode(node, prim::kPrimMirrorMiniStep) || node->func_graph() == nullptr) { in operator()
259 if (!IsPrimitiveCNode(node, prim::kPrimVirtualAdd) || node->func_graph() == nullptr) { in operator()
278 if (!IsPrimitiveCNode(node, prim::kPrimMiniStepAllGather) || node->func_graph() == nullptr) { in operator()
[all …]
Dconvert.h35 if (!IsPrimitiveCNode(node, prim::kPrimPrint)) { in operator()
41 if (cnode->size() == 2 && IsPrimitiveCNode(cnode->input(1), prim::kPrimMakeTuple)) { in operator()
/third_party/mindspore/mindspore/ccsrc/pipeline/jit/static_analysis/
Dorder_enforce.cc40 if (IsPrimitiveCNode(node, prim::kPrimUpdateState)) { in Run()
42 } else if (IsPrimitiveCNode(node, prim::kPrimMakeTuple)) { in Run()
72 … if (IsPrimitiveCNode(attach, prim::kPrimLoad) && IsPrimitiveCNode(attach, prim::kPrimMakeTuple)) { in HandleUpdateState()
78 if (!IsPrimitiveCNode(prev_u, prim::kPrimUpdateState)) { in HandleUpdateState()
84 return (user_node != update_state) && !IsPrimitiveCNode(user_node, prim::kPrimLoad); in HandleUpdateState()
95 … [](const AnfNodePtr &input) { return IsPrimitiveCNode(input, prim::kPrimLoad); }); in HasLoadInput()
108 if (IsPrimitiveCNode(user_node, prim::kPrimUpdateState)) { in FindUpdateStateUsers()
112 if (IsPrimitiveCNode(user_node, prim::kPrimMakeTuple)) { in FindUpdateStateUsers()
126 if (IsPrimitiveCNode(input, prim::kPrimLoad)) { in FindLastUpdateState()
174 return !IsPrimitiveCNode(user_node, prim::kPrimPush); in HandleMakeTupleUsers()
[all …]
/third_party/mindspore/mindspore/core/ir/
Danf.cc161 bool IsPrimitiveCNode(const AnfNodePtr &node, const PrimitivePtr &value) { in IsPrimitiveCNode() function
328 if (IsPrimitiveCNode(input, prim::kPrimLoad)) { in GetLoadInputs()
330 } else if (IsPrimitiveCNode(input, prim::kPrimMakeTuple)) { in GetLoadInputs()
396 …if (IsPrimitiveCNode(node, prim::kPrimImageSummary) || IsPrimitiveCNode(node, prim::kPrimScalarSum… in GetVirtualNodeTargetFromInputs()
397IsPrimitiveCNode(node, prim::kPrimTensorSummary) || IsPrimitiveCNode(node, prim::kPrimHistogramSum… in GetVirtualNodeTargetFromInputs()
404 if (IsPrimitiveCNode(node, prim::kPrimDepend) || IsPrimitiveCNode(node, prim::kPrimLoad)) { in GetVirtualNodeTargetFromInputs()
413 …} else if (IsPrimitiveCNode(node, prim::kPrimMakeTuple) || IsPrimitiveCNode(node, prim::kPrimUpdat… in GetVirtualNodeTargetFromInputs()
417 …if (IsPrimitiveCNode(node, prim::kPrimUpdateState) && inputs.size() > update_state_valid_input_ind… in GetVirtualNodeTargetFromInputs()
420 …} else if (IsPrimitiveCNode(node, prim::kPrimMakeTuple) && inputs.size() > make_tuple_valid_input_… in GetVirtualNodeTargetFromInputs()
439 } else if (IsPrimitiveCNode(node, prim::kPrimTupleGetItem)) { in GetVirtualNodeTargetFromInputs()
[all …]
/third_party/mindspore/tests/ut/cpp/pre_activate/ascend/mindir/
Dall_to_all_unify_mindir_test.cc49 ASSERT_FALSE(IsPrimitiveCNode(n, prim::kPrimNeighborExchange)); in TEST_F()
50 if (IsPrimitiveCNode(n, prim::kPrimAllToAllv)) { in TEST_F()
69 ASSERT_FALSE(IsPrimitiveCNode(n, prim::kPrimAllToAll)); in TEST_F()
70 if (IsPrimitiveCNode(n, prim::kPrimAllToAllv)) { in TEST_F()
73 if (IsPrimitiveCNode(n, prim::kPrimConcat)) { in TEST_F()
76 if (IsPrimitiveCNode(n, prim::kPrimSplitV)) { in TEST_F()
/third_party/mindspore/mindspore/ccsrc/frontend/optimizer/
Dauto_monad_eliminate.cc43 …bool is_special_op = IsPrimitiveCNode(cnode, prim::kPrimCall) || IsValueNode<FuncGraph>(cnode->inp… in GenerateLoadGroups()
44IsPrimitiveCNode(cnode, prim::kPrimPartial) || IsPrimitiveCNode(cnode, prim::kPrimSwitch) || in GenerateLoadGroups()
45 IsPrimitiveCNode(cnode, prim::kPrimSwitchLayer); in GenerateLoadGroups()
51 if (!IsPrimitiveCNode(cnode, prim::kPrimLoad)) { in GenerateLoadGroups()
56 …} else if (IsPrimitiveCNode(input, prim::kPrimDepend) && input->cast<CNodePtr>()->input(1)->isa<Pa… in GenerateLoadGroups()
190 if (IsPrimitiveCNode(load_user.first, prim::kPrimUpdateState)) { in ReplaceLoadUser()
196 if (IsPrimitiveCNode(load_user.first, prim::kPrimMakeTuple)) { in ReplaceLoadUser()
200 …maketuple_users.size() == 1 && IsPrimitiveCNode(maketuple_users.back().first, prim::kPrimUpdateSta… in ReplaceLoadUser()
261 if (!IsPrimitiveCNode(load_node, prim::kPrimLoad)) { in ReplaceUpdateStateForLoad()
270 if (!IsPrimitiveCNode(update_state, prim::kPrimUpdateState) || node_users.size() == kUserSize) { in ReplaceUpdateStateForLoad()
[all …]
Dclean.cc401 } else if (IsPrimitiveCNode(node, prim::kPrimGetAttr)) { in SimplifyDataStructures()
403 } else if (IsPrimitiveCNode(node, prim::kPrimMakeRecord)) { in SimplifyDataStructures()
405 } else if (IsPrimitiveCNode(node, prim::kPrimPartial)) { in SimplifyDataStructures()
407 } else if (IsPrimitiveCNode(node, prim::kPrimDictGetItem)) { in SimplifyDataStructures()
409 } else if (IsPrimitiveCNode(node, prim::kPrimDictSetItem)) { in SimplifyDataStructures()
411 } else if (IsPrimitiveCNode(node, prim::kPrimDictGetValues)) { in SimplifyDataStructures()
413 } else if (IsPrimitiveCNode(node, prim::kPrimMakeDict)) { in SimplifyDataStructures()
415 } else if (IsPrimitiveCNode(node, prim::kPrimMakeKeywordArg)) { in SimplifyDataStructures()
417 } else if (IsPrimitiveCNode(node, prim::kPrimExtractKeywordArg)) { in SimplifyDataStructures()
484 if (IsPrimitiveCNode(node, prim::kPrimMakeList)) { in CleanAfterOptA()
[all …]
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/graph_kernel/
Drewrite_output_shape.cc25 if (!IsPrimitiveCNode(func_graph->output(), prim::kPrimMakeTuple)) { in Run()
31 if (IsPrimitiveCNode(output, prim::kPrimMakeTuple)) { in Run()
51 if (IsPrimitiveCNode(node, prim::kPrimMakeTuple)) return; in Process()
70 if (IsPrimitiveCNode(cnode, prim::kPrimTupleGetItem)) { in Process()
79 if (!IsPrimitiveCNode(func_graph->output(), prim::kPrimMakeTuple)) { in Run()
85 if (!IsPrimitiveCNode(output, prim::kPrimMakeTuple)) { in Run()
Dreorder_ops.cc40 [&node](const PrimitivePtr &prim) { return IsPrimitiveCNode(node, prim); }); in IsTypeInsensitive()
46 if (!IsPrimitiveCNode(node, prim::kPrimCast)) { in GetCastType()
67 if (IsPrimitiveCNode(node, prim::kPrimMaximum) || IsPrimitiveCNode(node, prim::kPrimMinimum)) { in GetOpDataInputIndexes()
69 } else if (IsPrimitiveCNode(node, prim::kPrimSelect)) { in GetOpDataInputIndexes()
208 if (!IsPrimitiveCNode(node, prim::kPrimCast) || GetCastType(node) != CAST_DOWN || in ReorderTypeInsensitiveCastDown()
276 …if (cast_node != nullptr && IsPrimitiveCNode(cast_node, prim::kPrimCast) && GetCastType(cast_node)… in ReorderCastUpTypeInsensitive()
341 } else if (IsPrimitiveCNode(node, prim::kPrimCast)) { in ReorderCastTypeInsensitive()
Deliminate_redundant_output.cc38 if (!IsPrimitiveCNode(getitem_node, prim::kPrimTupleGetItem)) { in GetIndex()
63 if (!IsPrimitiveCNode(output, prim::kPrimMakeTuple)) { in GetGraphKernelGetitemList()
72 if (!IsPrimitiveCNode(user.first, prim::kPrimTupleGetItem)) { in GetGraphKernelGetitemList()
95 IsPrimitiveCNode(AnfAlgo::GetCNodeFuncGraphPtr(node)->output(), prim::kPrimMakeTuple); in FindGraphKernelsWithMultiOutput()
103 [&node](const PrimitivePtr &p) { return IsPrimitiveCNode(node, p); }); in IsSideEffectNode()
278 … if (!IsPrimitiveCNode(AnfAlgo::GetCNodeFuncGraphPtr(new_node)->output(), prim::kPrimMakeTuple)) { in Run()
Dadd_atomic_clean.cc41 if (!IsPrimitiveCNode(node, prim::kPrimReduceSum)) { in GetUniqReduceAxes()
78 if (IsPrimitiveCNode(n, prim::kPrimReduceSum)) { in HaveReduceInPredecessors()
116 if (IsPrimitiveCNode(real_return_node, prim::kPrimMakeTuple)) { in FindCandidate()
120 if (IsPrimitiveCNode(inputs[i], target_type_)) { in FindCandidate()
131 } else if (IsPrimitiveCNode(real_return_node, target_type_)) { in FindCandidate()
278 if (IsPrimitiveCNode(retrun_node, prim::kPrimMakeTuple)) { in CreateInplaceAssignNodeAndCorrectReturn()
460 if (!IsPrimitiveCNode(user_node, prim::kPrimTupleGetItem)) { in FindOriginCNodeUsers()
559 … if ((IsPrimitiveCNode(user, prim::kPrimMakeTuple) || IsPrimitiveCNode(user, prim::kPrimDepend)) && in IsExistStructuralObstacle()
560 !(IsPrimitiveCNode(user, prim::kPrimReturn) || user == main_graph->output())) { in IsExistStructuralObstacle()
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/gpu/
Dapply_momentum_weight_scale_fusion.cc64 if (IsPrimitiveCNode(in, prim::kPrimCast) || in IsCast()
65 (IsPrimitiveCNode(in, prim::kPrimDepend) && in IsCast()
66 IsPrimitiveCNode(in->cast<CNodePtr>()->input(kInputIndex), prim::kPrimCast))) { in IsCast()
74 if (IsPrimitiveCNode(node, prim::kPrimCast)) { in GetCastInput()
77 if (IsPrimitiveCNode(node, prim::kPrimDepend)) { in GetCastInput()
79 if (IsPrimitiveCNode(cast_node, prim::kPrimCast)) { in GetCastInput()
Dcombine_cast_fusion.cc36 if (!IsPrimitiveCNode(cast_node, prim::kPrimCast)) { in GetDealList()
40 if (input0->isa<Parameter>() || (IsPrimitiveCNode(input0, prim::kPrimLoad) && in GetDealList()
46 if (IsPrimitiveCNode(input0, prim::kPrimLoad)) { in GetDealList()
56 if (IsPrimitiveCNode(input0, prim::kPrimLoad)) { in GetDealList()
/third_party/mindspore/mindspore/ccsrc/runtime/hccl_adapter/
Dconverter.cc128 if (!IsPrimitiveCNode(cnode, prim::kPrimAllToAllv)) { in SetAllToAllvAttr()
146 if (IsPrimitiveCNode(cnode, prim::kPrimAllReduce)) { in GetGeNodeName()
148 } else if (IsPrimitiveCNode(cnode, prim::kPrimAllGather)) { in GetGeNodeName()
150 } else if (IsPrimitiveCNode(cnode, prim::kPrimBroadcast)) { in GetGeNodeName()
152 } else if (IsPrimitiveCNode(cnode, prim::kPrimReduceScatter)) { in GetGeNodeName()
154 } else if (IsPrimitiveCNode(cnode, prim::kPrimSend)) { in GetGeNodeName()
156 } else if (IsPrimitiveCNode(cnode, prim::kPrimReceive)) { in GetGeNodeName()
158 } else if (IsPrimitiveCNode(cnode, prim::kPrimAllToAllv)) { in GetGeNodeName()
/third_party/mindspore/mindspore/ccsrc/frontend/parallel/pipeline_transformer/
Dpipeline_transformer.cc51 if (IsPrimitiveCNode(cnode, prim)) { in IsInWhiteList()
65 if (IsPrimitiveCNode(node, prim::kPrimVirtualDataset)) { in MainGraph()
77 if (!IsPrimitiveCNode(node, prim::kPrimStridedSlice)) { in SetMicroBatch()
94 while (IsPrimitiveCNode(temp, prim::kPrimLoad) || IsPrimitiveCNode(temp, prim::kPrimCast)) { in NeedGrad()
158 if (IsPrimitiveCNode(node_user.first, prim::kPrimTupleGetItem)) { in LabelMicroBatch()
161 if (!IsPrimitiveCNode(node_first, prim::kPrimStridedSlice)) { in LabelMicroBatch()
280 if (IsPrimitiveCNode(node, prim::kPrimDepend)) { in GraphOutNode()
283 if (IsPrimitiveCNode(node, prim::kPrimMakeTuple)) { in GraphOutNode()
300 if (IsPrimitiveCNode(temp_node, prim::kPrimVirtualDataset)) { in CreateOpInfo()
346 if (IsPrimitiveCNode(node, prim::kPrimReceive)) { in GetOpInfo()
[all …]
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/ascend/buffer_fusion/
Ddepthwiseconv_eltwise_fusion_pass.cc35 if (cnode->isa<CNode>() && IsPrimitiveCNode(depthwise_conv, prim::kPrimDepthwiseConv2dNative)) { in MatchDepthwiseConvRelu()
44 …if (cnode->isa<CNode>() && (IsPrimitiveCNode(relu, prim::kPrimRelu) || IsPrimitiveCNode(relu, prim… in MatchDepthwiseConvRelu()
/third_party/mindspore/mindspore/ccsrc/frontend/parallel/graph_util/
Dpipeline_split_utils.cc49 if (IsPrimitiveCNode(cnode, prim_node)) { in IsInEndNodeBlackList()
87 if (!IsPrimitiveCNode(node, prim::kPrimStridedSlice)) { in SetStridedSliceStrategy()
114 if (IsPrimitiveCNode(cnode, prim::kPrimReceive) || !cnode->in_forward_flag()) { in InsertVirtualAssignAdd()
119 if (IsPrimitiveCNode(cnode, prim::kPrimDepend) && enable_parallel_optimizer) { in InsertVirtualAssignAdd()
168 if (!IsPrimitiveCNode(node, prim::kPrimReceive)) { in HandleReceiveParam()
185 if (IsPrimitiveCNode(temp_node, prim::kPrimCast)) { in HandleReceiveParam()
188 if (IsPrimitiveCNode(temp_node, prim::kPrimMirrorMicroStep) || in HandleReceiveParam()
189 IsPrimitiveCNode(temp_node, prim::kPrimMicroStepAllGather)) { in HandleReceiveParam()
215 if (IsPrimitiveCNode(temp_node, prim::kPrimCast)) { in AddVirtualAssignAdd()
218 if (IsPrimitiveCNode(temp_node, prim::kPrimMirrorMicroStep) || in AddVirtualAssignAdd()
[all …]
/third_party/mindspore/mindspore/ccsrc/vm/
Dgraph_partition.cc111 if (IsPrimitiveCNode(node, reorder_prim)) { in ReorderVirtualNode()
147 if (!IsPrimitiveCNode(node, prim::kPrimSwitch)) { in GetNextNodes()
154 if (IsPrimitiveCNode(input, prim::kPrimPartial)) { in GetNextNodes()
295 if (IsPrimitiveCNode(seed_node, prim::kPrimCast)) { in GetVisitNodesInfo()
464 …if (IsPrimitiveCNode(node, prim::kPrimImageSummary) || IsPrimitiveCNode(node, prim::kPrimScalarSum… in RemoveUselessDependency()
465IsPrimitiveCNode(node, prim::kPrimTensorSummary) || IsPrimitiveCNode(node, prim::kPrimHistogramSum… in RemoveUselessDependency()
466 IsPrimitiveCNode(node, prim::kPrimDepend) || IsPrimitiveCNode(node, prim::kPrimLoad) || in RemoveUselessDependency()
467IsPrimitiveCNode(node, prim::kPrimUpdateState) || IsPrimitiveCNode(node, prim::kPrimMakeTuple) || in RemoveUselessDependency()
468 IsPrimitiveCNode(node, prim::kPrimTupleGetItem)) { in RemoveUselessDependency()
/third_party/mindspore/mindspore/ccsrc/frontend/optimizer/ad/
Dpynative_dfunctor.cc41 if (IsPrimitiveCNode(cnode_morph, prim::kPrimUpdateState)) { in GenNewTensor()
132 if (IsPrimitiveCNode(cnode_morph, prim::kPrimStopGradient)) { in RunOutputReplace()
172 …if (cnode_morph->size() - 1 != paras.size() && !IsPrimitiveCNode(cnode_morph, prim::kPrimUpdateSta… in RunInputReplace()
183 IsPrimitiveCNode(input_node, prim::kPrimStopGradient)) { in RunInputReplace()
196 if (para_ref_size > 0 && !IsPrimitiveCNode(input_node, prim::kPrimUpdateState)) { in RunInputReplace()

12345