Home
last modified time | relevance | path

Searched refs:primitive_vars (Results 1 – 11 of 11) sorted by relevance

/third_party/mindspore/mindspore/ccsrc/backend/optimizer/common/
Dpattern_engine.cc181 …ap(const VectorRef &values_pattern, const BaseRef &expr_ref, const PrimitiveVarMap &primitive_vars, in UpdateEquivMap() argument
201 auto iter = primitive_vars.find(prim); in UpdateEquivMap()
202 if (iter == primitive_vars.end()) { in UpdateEquivMap()
209 const PrimitiveVarMap &primitive_vars, EquivPtr equiv) const { in AlignSVar() argument
235 equiv = Match(values_pattern[svar_index], seq, primitive_vars, equiv); in AlignSVar()
240 equiv = Match(values_pattern[i], values_expr[expr_i], primitive_vars, equiv); in AlignSVar()
249 …rnEngine::Match(const BaseRef &pattern, const BaseRef &expr, const PrimitiveVarMap &primitive_vars, in Match() argument
299 equiv = AlignSVar(values_pattern, values_expr, primitive_vars, equiv); in Match()
300 UpdateEquivMap(values_pattern, expr_ref, primitive_vars, equiv); in Match()
Dpattern_engine.h171 EquivPtr Match(const BaseRef &pattern, const BaseRef &expr, const PrimitiveVarMap &primitive_vars,
177 const PrimitiveVarMap &primitive_vars, EquivPtr equiv) const;
Dhelper.cc688 …odePtr HandleSexpVector(const BaseRef &sexp, const BaseRef &graph, PrimitiveVarMap *primitive_vars, in HandleSexpVector() argument
695 AnfNodePtr node = SexpToNode(x, std::make_shared<Var>("G"), primitive_vars, true); in HandleSexpVector()
703 AnfNodePtr node = SexpToNode(x, graph, primitive_vars, multigraph); in HandleSexpVector()
805 AnfNodePtr SexpToNode(const BaseRef &sexp, const BaseRef &graph, PrimitiveVarMap *primitive_vars, b… in SexpToNode() argument
807 MS_EXCEPTION_IF_NULL(primitive_vars); in SexpToNode()
809 return HandleSexpVector(sexp, graph, primitive_vars, multigraph); in SexpToNode()
815 (*primitive_vars)[var_ptr->primitive()] = var_ptr; in SexpToNode()
Dhelper.h198 AnfNodePtr SexpToNode(const BaseRef &sexp, const BaseRef &graph, PrimitiveVarMap *primitive_vars,
/third_party/mindspore/mindspore/lite/tools/optimizer/fusion/
Dtflite_lstm_cell_fusion.h36 …tatic EquivPtr MatchGraph(const FuncGraphPtr &func_graph, const PrimitiveVarMapPtr &primitive_vars,
39 static EquivPtr CheckSubGraph(const AnfNodePtr &pattern, const PrimitiveVarMapPtr &primitive_vars,
61 static AnfNodePtr GetCondGraphPattern(const PrimitiveVarMapPtr &primitive_vars);
63 virtual AnfNodePtr GetBodyGraphPattern(const PrimitiveVarMapPtr &primitive_vars) const;
Dtf_bidirection_gru_fusion.h47 virtual AnfNodePtr GetBodyGraphPattern(const PrimitiveVarMapPtr &primitive_vars) const;
60 AnfNodePtr GetCondGraphPattern(const PrimitiveVarMapPtr &primitive_vars) const;
Dtflite_lstm_cell_fusion.cc184 AnfNodePtr TfliteLstmCellFusion::GetCondGraphPattern(const PrimitiveVarMapPtr &primitive_vars) { in GetCondGraphPattern() argument
185 MS_ASSERT(primitive_vars != nullptr); in GetCondGraphPattern()
208 auto pattern = SexpToNode(return_ref, fg, primitive_vars.get(), true); in GetCondGraphPattern()
212 AnfNodePtr TfliteLstmCellFusion::GetBodyGraphPattern(const PrimitiveVarMapPtr &primitive_vars) cons… in GetBodyGraphPattern()
279 auto pattern = SexpToNode(return_node, fg, primitive_vars.get(), true); in GetBodyGraphPattern()
311 …stmCellFusion::MatchGraph(const FuncGraphPtr &func_graph, const PrimitiveVarMapPtr &primitive_vars, in MatchGraph() argument
321 EquivPtr equiv = pattern_engine.Match(pattern, return_node, *primitive_vars, empty_equiv); in MatchGraph()
355 …eLstmCellFusion::CheckSubGraph(const AnfNodePtr &pattern, const PrimitiveVarMapPtr &primitive_vars, in CheckSubGraph() argument
360 MS_ASSERT(primitive_vars != nullptr); in CheckSubGraph()
370 return MatchGraph(sub_graph, primitive_vars, pattern); in CheckSubGraph()
Dtf_lstm_cell_fusion.h35 AnfNodePtr GetBodyGraphPattern(const PrimitiveVarMapPtr &primitive_vars) const override;
Dtf_bidirection_gru_fusion.cc278 AnfNodePtr TfBidirectionGruFusion::GetCondGraphPattern(const PrimitiveVarMapPtr &primitive_vars) co… in GetCondGraphPattern()
279 MS_ASSERT(primitive_vars != nullptr); in GetCondGraphPattern()
301 auto pattern = SexpToNode(return_ref, is_fg, primitive_vars.get(), true); in GetCondGraphPattern()
305 AnfNodePtr TfBidirectionGruFusion::GetBodyGraphPattern(const PrimitiveVarMapPtr &primitive_vars) co… in GetBodyGraphPattern()
306 MS_ASSERT(primitive_vars != nullptr); in GetBodyGraphPattern()
374 auto pattern = SexpToNode(return_node, is_fg, primitive_vars.get(), true); in GetBodyGraphPattern()
Dtf_lstm_cell_fusion.cc119 AnfNodePtr TfLstmCellFusion::GetBodyGraphPattern(const PrimitiveVarMapPtr &primitive_vars) const { in GetBodyGraphPattern()
181 auto pattern = SexpToNode(return_node, is_fg, primitive_vars.get(), true); in GetBodyGraphPattern()
/third_party/mindspore/mindspore/lite/tools/optimizer/common/
Dgllo_utils.cc215 …odePtr HandleSexpVector(const BaseRef &sexp, const BaseRef &graph, PrimitiveVarMap *primitive_vars, in HandleSexpVector() argument
217 if (primitive_vars == nullptr) { in HandleSexpVector()
228 AnfNodePtr node = SexpToNode(x, is_var, primitive_vars, true); in HandleSexpVector()
236 AnfNodePtr node = SexpToNode(x, graph, primitive_vars, multigraph); in HandleSexpVector()
441 AnfNodePtr SexpToNode(const BaseRef &sexp, const BaseRef &graph, PrimitiveVarMap *primitive_vars, b… in SexpToNode() argument
443 if (primitive_vars == nullptr) { in SexpToNode()
448 return HandleSexpVector(sexp, graph, primitive_vars, multigraph); in SexpToNode()
457 (*primitive_vars)[var_ptr->primitive()] = var_ptr; in SexpToNode()