Home
last modified time | relevance | path

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

12

/third_party/mindspore/mindspore/ccsrc/frontend/optimizer/irpass/
Dbranch_culling.h47 …MATCH_REPLACE_LAMBDA_IF(node, PPrimitive(prim::kPrimSwitch, cond, true_br, false_br), SwitchSimplL… in operator()
61 … PPrimitive(prim::kPrimTupleGetItem, PPrimitive(prim::kPrimSwitch, cond, true_br, false_br), x), in operator()
62 … PPrimitive(prim::kPrimSwitch, cond, PPrimitive(prim::kPrimTupleGetItem, true_br, x), in operator()
76 … PPrimitive(prim::kPrimEnvGetItem, PPrimitive(prim::kPrimSwitch, cond, true_br, false_br), x, x2), in operator()
77 … PPrimitive(prim::kPrimSwitch, cond, PPrimitive(prim::kPrimEnvGetItem, true_br, x, x2), in operator()
139 …MATCH_REPLACE_IF(node, PPrimitive(prim::kPrimSwitch, PPrimitive(prim::kPrimDepend, v, x), true_br,… in operator()
140 … PPrimitive(prim::kPrimDepend, PPrimitive(prim::kPrimSwitch, v, true_br, false_br), x), in operator()
Dincorporate_call.h177 …AnfVisitor::Match(prim::kPrimSwitch, {IsNode, IsValueNode<FuncGraph>, IsValueNode<FuncGraph>})(inp… in operator()
192 …auto sw_node = fg->NewCNode({NewValueNode(prim::kPrimSwitch), x_, NewValueNode(new_g1), NewValueNo… in operator()
Denv_item_eliminate.h368 return IsPrimitiveCNode(cnode->input(0), prim::kPrimSwitch); in operator()
384 …AnfVisitor::Match(prim::kPrimSwitch, {IsNode, IsValueNode<FuncGraph>, IsValueNode<FuncGraph>})(inp… in operator()
400 …auto new_sw = fg->NewCNode({NewValueNode(prim::kPrimSwitch), x, NewValueNode(new_g1), NewValueNode… in operator()
Dgradient_eliminate.cc68 if (switch_node == nullptr && IsPrimitiveCNode(node, prim::kPrimSwitch)) { in CheckSwitchWithSideEffect()
Dupdatestate_eliminate.cc100 …Node(first_input_node, prim::kPrimCall) || IsPrimitiveCNode(first_input_node, prim::kPrimSwitch) || in CheckHasMonadInput()
840 if (!IsPrimitiveCNode(switch_node, prim::kPrimSwitch)) { in operator ()()
869 auto new_switch_cnode = fg->NewCNode({NewValueNode(prim::kPrimSwitch), cond, fg1_node, fg2_node}); in operator ()()
Dcall_graph_tuple_transform.h81 if (!IsPrimitiveCNode(call_inputs[0], prim::kPrimSwitch)) { in operator()
Dinline.h318 if (IsPrimitiveCNode(item, prim::kPrimSwitch)) { in GraphHasBranch()
Dpartial_eliminate.h301 if (!IsPrimitiveCNode(cnode->input(0), prim::kPrimSwitch)) { in operator()
/third_party/mindspore/mindspore/lite/tools/converter/parser/
Dtf_bidirection_gru_cf_fusion.cc96 auto fw_switch = VectorRef({GetPrim(prim::kPrimSwitch), std::make_shared<SeqVar>()}); in DefineBidirectionRnnPattern()
120 auto counter_switch1 = VectorRef({GetPrim(prim::kPrimSwitch), counter_merge1, loop_cond}); in DefineBidirectionRnnPattern()
140 auto switch3 = VectorRef({GetPrim(prim::kPrimSwitch), merge3, loop_cond}); in DefineBidirectionRnnPattern()
161 auto switch2 = VectorRef({GetPrim(prim::kPrimSwitch), merge2, loop_cond}); in DefineBidirectionRnnPattern()
/third_party/mindspore/mindspore/ccsrc/frontend/optimizer/
Dirpass.cc154 …lify_ = MakeSubstitution(std::make_shared<SwitchSimplify>(), "switch_simplify", prim::kPrimSwitch); in OptimizeIRPassLib()
160 …(std::make_shared<ExchangeSwitchDependValue>(), "exchange_switch_depend_value", prim::kPrimSwitch); in OptimizeIRPassLib()
255 … MakeSubstitution(std::make_shared<SwitchDeferInline>(), "switch_defer_inline", prim::kPrimSwitch); in OptimizeIRPassLib()
Dirpass.h235 return IsPrimitiveCNode(node, prim::kPrimSwitch); in IsCNodeSwitch()
Dauto_monad_eliminate.cc44 … IsPrimitiveCNode(cnode, prim::kPrimPartial) || IsPrimitiveCNode(cnode, prim::kPrimSwitch) || in GenerateLoadGroups()
/third_party/mindspore/mindspore/ccsrc/vm/
Dtransform.cc47 std::vector<PrimitivePtr> nonlinear_ops = {prim::kPrimReturn, prim::kPrimPartial, prim::kPrimSwitch,
50 std::vector<PrimitivePtr> control_ops = {prim::kPrimReturn, prim::kPrimPartial, prim::kPrimSwitch, …
55 … prim::kPrimSwitch, prim::kPrimMakeTuple, in GetMsNonlinearOps()
197 } else if (IsPrimitive(fn, prim::kPrimSwitch)) { in InterpretNode()
330 …MS_LOG(EXCEPTION) << "Length of inputs of primitive " << prim::kPrimSwitch->name() << " is less th… in AddSwitch()
/third_party/mindspore/mindspore/ccsrc/runtime/framework/
Dcontrol_node_parser.cc347 } else if (AnfAlgo::CheckPrimitiveType(graph_output, prim::kPrimSwitch)) { in FetchOutputByCallNode()
386 } else if (AnfAlgo::CheckPrimitiveType(inputs[i], prim::kPrimSwitch)) { in FetchOutputBySwitchNode()
435 } else if (AnfAlgo::CheckPrimitiveType(control_node, prim::kPrimSwitch)) { in FetchParameterByControlNode()
586 if (AnfAlgo::CheckPrimitiveType(cnode, prim::kPrimSwitch)) { in FetchFuncGraphbyCallNode()
877 … if (call_inputs.empty() || (!AnfAlgo::CheckPrimitiveType(call_inputs[0], prim::kPrimSwitch))) { in FetchValueNodeBySwitchNode()
949 if (AnfAlgo::CheckPrimitiveType(front_output_node, prim::kPrimSwitch)) { in FetchFrontValueNode()
1082 if (AnfAlgo::CheckPrimitiveType(node, prim::kPrimSwitch)) { in FetchInputParameterbyControlNode()
1097 … } else if (IsCallNode(inputs[i]) || AnfAlgo::CheckPrimitiveType(inputs[i], prim::kPrimSwitch)) { in FetchInputParameterbyControlNode()
1225 if (AnfAlgo::CheckPrimitiveType(switch_cnode, prim::kPrimSwitch)) { in FetchFuncGraphToParameter()
1298 } else if (AnfAlgo::CheckPrimitiveType(front_output, prim::kPrimSwitch)) { in FetchBackendOutputByFrontOutput()
/third_party/mindspore/mindspore/lite/tools/converter/parser/tf/
Dfunctionalize_control_op_pass.h48 …static bool IsSwitch(const AnfNodePtr &node) { return CheckPrimitiveType(node, prim::kPrimSwitch);… in IsSwitch()
Dfunctionalize_cond.cc159 if (!CheckPrimitiveType(node, prim::kPrimSwitch)) { // graph is not empty in CreateBranchGraph()
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/common/
Dnode_pass.cc36 if (AnfAlgo::CheckPrimitiveType(cnode, prim::kPrimSwitch)) { in AddOutputAndCallerToMap()
/third_party/mindspore/mindspore/ccsrc/runtime/framework/actor/
Dactor_common.cc89 …witchActor(const AnfNodePtr &node) { return AnfAlgo::CheckPrimitiveType(node, prim::kPrimSwitch); } in IsSwitchActor()
Dswitch_actor.cc78 if (IsPrimitive(inputs[0], prim::kPrimSwitch)) { in ParseInput()
141 …MS_LOG(EXCEPTION) << "Length of inputs of primitive " << prim::kPrimSwitch->name() << " is not equ… in ParseSwitchInput()
/third_party/mindspore/tests/ut/cpp/optimizer/ad/
Dad_test.cc185 FuncGraphPtr dg = Kprim(NewValueNode(prim::kPrimSwitch), resourcePtr); in TEST_F()
/third_party/mindspore/mindspore/core/abstract/
Dprimitive_infer_map.cc94 {prim::kPrimSwitch, {InferImplSwitch, nullptr, true}}, in GetPrimitiveToEvalImplMap()
/third_party/mindspore/mindspore/core/ir/
Dfunc_graph_extends.cc326 if (IsPrimitiveCNode(node, prim::kPrimSwitch)) { in FindLeaves()
/third_party/mindspore/mindspore/lite/tools/common/
Dnode_util.cc392 return opt::CheckPrimitiveType(node, prim::kPrimSwitch); in IsSwitch()
/third_party/mindspore/tests/ut/cpp/operator/
Dops_test.cc314 ASSERT_EQ(prim->name(), kPrimSwitch->name()); in TEST_F()
/third_party/mindspore/mindspore/ccsrc/pipeline/jit/static_analysis/
Dauto_monad.cc615 if (cnode->size() == 1 && IsPrimitiveCNode(cnode->input(0), prim::kPrimSwitch)) { in TraceTupleCNodeEffectInfo()
675 if (IsPrimitiveEquals(prim, prim::kPrimSwitch)) { in TraceEffectInfo()

12