ONE - On-device Neural Engine
|
Shape inference rule for multiple dialects. More...
#include <MultiDialectShapeInferenceRule.h>
Public Member Functions | |
bool | recognize (const Dialect *) const final |
Return true if this rule recognizes a given dialect. | |
bool | infer (const Node *, NodeShape &) const final |
Infer node's shape. | |
MultiDialectShapeInferenceRule & | bind (const Dialect *d, const ShapeInferenceRule *rule) |
Bind a specific rule to a Dialect. | |
Public Member Functions inherited from loco::ShapeInferenceRule | |
virtual | ~ShapeInferenceRule ()=default |
virtual bool | support (const API &api) const |
Check whether a given API is available or not. | |
virtual void | infer (const Context *, const Node *, Sink *) const |
Additional Inherited Members | |
Public Types inherited from loco::ShapeInferenceRule | |
enum class | API { V1 , V2 } |
Shape inference rule for multiple dialects.
Definition at line 30 of file MultiDialectShapeInferenceRule.h.
MultiDialectShapeInferenceRule & loco::MultiDialectShapeInferenceRule::bind | ( | const Dialect * | d, |
const ShapeInferenceRule * | rule | ||
) |
Bind a specific rule to a Dialect.
Definition at line 56 of file MultiDialectShapeInferenceRule.cpp.
References loco::ShapeInferenceRule::recognize().
Referenced by exo::ShapeInferencePass::run(), and moco::tf::ShapeInferencePass::run().
Infer node's shape.
WARNING!!
Implementation SHOULD return true only when it succeeds in inference!
Implements loco::ShapeInferenceRule.
Definition at line 42 of file MultiDialectShapeInferenceRule.cpp.
References loco::Node::dialect().
|
finalvirtual |
Return true if this rule recognizes a given dialect.
Implements loco::ShapeInferenceRule.
Definition at line 29 of file MultiDialectShapeInferenceRule.cpp.