ONE - On-device Neural Engine
Loading...
Searching...
No Matches
exo::TypeInferencePass Class Reference

Pass to infer type of nodes. More...

#include <TypeInferencePass.h>

Collaboration diagram for exo::TypeInferencePass:

Public Member Functions

virtual const char * name (void) const
 
bool run (loco::Graph *graph)
 
- Public Member Functions inherited from logo::Pass
virtual ~Pass ()=default
 

Detailed Description

Pass to infer type of nodes.

Definition at line 31 of file TypeInferencePass.h.

Member Function Documentation

◆ name()

virtual const char * exo::TypeInferencePass::name ( void  ) const
inlinevirtual

Reimplemented from logo::Pass.

Definition at line 34 of file TypeInferencePass.h.

34{ return "exo::TypeInferencePass"; }

◆ run()

bool exo::TypeInferencePass::run ( loco::Graph g)
virtual
Note
Currently, TFL and Circle backend share this inference. However, TFL backend does not require rule for Circle dialect. TODO Make dedicated inference pass for Circle Dialect.

Implements logo::Pass.

Definition at line 40 of file TypeInferencePass.cpp.

41{
46
48
49 rules.bind(loco::CanonicalDialect::get(), &canonical_rule)
50 .bind(locoex::TFLDialect::get(), &tfl_rule)
51 .bind(locoex::CircleDialect::get(), &circle_rule)
52 .bind(locoex::COpDialect::get(), &cop_rule);
53
54 return loco::apply(&rules).to(g);
55}
static Dialect * get(void)
Type Inference Rule for multiple dialects.
MultiDialectTypeInferenceRule & bind(const Dialect *d, const TypeInferenceRule *rule)
Bind a specific rule to a Dialect.
static loco::Dialect * get(void)
static loco::Dialect * get(void)
static loco::Dialect * get(void)
ShapeInferenceSession apply(ShapeInferenceRule *r)
Type Inference Rule for Canonical Dialect.
Type Inference Rule for COpDialect.
Type Inference Rule for CircleDialect.
Type Inference Rule for TFLDialect.

References loco::apply(), loco::MultiDialectTypeInferenceRule::bind(), locoex::CircleDialect::get(), locoex::TFLDialect::get(), loco::CanonicalDialect::get(), locoex::COpDialect::get(), and loco::ShapeInferenceSession::to().

Referenced by package.infer.session::inference().


The documentation for this class was generated from the following files: