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

Pass to infer shape of nodes. More...

#include <ShapeInferencePass.h>

Collaboration diagram for exo::ShapeInferencePass:

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 shape of nodes.

Definition at line 29 of file ShapeInferencePass.h.

Member Function Documentation

◆ name()

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

Reimplemented from logo::Pass.

Definition at line 32 of file ShapeInferencePass.h.

32{ return "exo::ShapeInferencePass"; }

◆ run()

bool exo::ShapeInferencePass::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 42 of file ShapeInferencePass.cpp.

43{
48
50
51 rules.bind(loco::CanonicalDialect::get(), &canonical_rule)
52 .bind(locoex::TFLDialect::get(), &tfl_rule)
53 .bind(locoex::CircleDialect::get(), &circle_rule)
54 .bind(locoex::COpDialect::get(), &cop_rule);
55
56 return loco::apply(&rules).to(g);
57}
static Dialect * get(void)
Shape inference rule for multiple dialects.
MultiDialectShapeInferenceRule & bind(const Dialect *d, const ShapeInferenceRule *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)
Shape inference rule for canonical dialect.
Shape inference rule for COpDialect.

References loco::apply(), loco::MultiDialectShapeInferenceRule::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: