ONE - On-device Neural Engine
Loading...
Searching...
No Matches
loco::TypeInferenceRule Struct Referenceabstract

#include <TypeInference.h>

Public Member Functions

virtual ~TypeInferenceRule ()=default
 
virtual bool recognize (const Dialect *) const =0
 Return true if this rule recognizes a given dialect.
 
virtual bool infer (const Node *, DataType &) const =0
 

Detailed Description

Definition at line 41 of file TypeInference.h.

Constructor & Destructor Documentation

◆ ~TypeInferenceRule()

virtual loco::TypeInferenceRule::~TypeInferenceRule ( )
virtualdefault

Member Function Documentation

◆ infer()

virtual bool loco::TypeInferenceRule::infer ( const Node ,
DataType  
) const
pure virtual

Framework guarantees the followings:

  1. Framework tries to infer the data type of each node only after the data type of all of its valid (= non-nullptr) argument nodes is inferred.
  2. The result of preceding "infer" is accessible through below dtype_get method.
    • This holds only when preceding "infer" returns true.

Implemented in locoex::CircleTypeInferenceRule, locoex::TFLTypeInferenceRule, locoex::COpTypeInferenceRule, luci::CircleTypeInferenceRule, moco::TFTypeInferenceRule, loco::CanonicalTypeInferenceRule, and loco::MultiDialectTypeInferenceRule.

Referenced by loco::TypeInferenceSession::to().

◆ recognize()


The documentation for this struct was generated from the following file: