ONE - On-device Neural Engine
|
Convert loco::MatMul to locoex::TFLFullyConnected. More...
#include <MatMulConverter.h>
Public Member Functions | |
const char * | name (void) const final |
bool | convert (loco::MatMul *origin) final |
Converts loco::MatMul to locoex::TFLFullyConnected. | |
Public Member Functions inherited from exo::CanonicalNodeConverter< loco::MatMul > | |
bool | run (loco::Graph *graph) |
Run the pass. | |
Public Member Functions inherited from logo::Pass | |
virtual | ~Pass ()=default |
Additional Inherited Members |
Convert loco::MatMul to locoex::TFLFullyConnected.
Definition at line 30 of file MatMulConverter.h.
|
finalvirtual |
Converts loco::MatMul to locoex::TFLFullyConnected.
How it works:
Before: Foo1 -— MatrixEncode -— MatMul -— MatrixDecode -— Bar Foo2 -— MatrixEncode -—/
After:
Foo1 - MatrixEncode - MatrixDecode - TFLFullyConnected - MatrixEncode - MatrixDecode - Bar Foo2 - MatrixEncode - MatrixDecode -/
Implements exo::CanonicalNodeConverter< loco::MatMul >.
Definition at line 54 of file MatMulConverter.cpp.
References loco::NodeShape::as(), loco::dtype_get(), loco::dtype_known(), locoex::TFLNodeMixin< TFLNodeTrait::FusedActFunc >::fusedActivationFunction(), loco::Node::graph(), loco::MatMul::lhs(), exo::make_matrix_decode< MatrixLayout::HW >(), exo::make_matrix_decode< MatrixLayout::WH >(), exo::make_matrix_encode< MatrixLayout::HW >(), locoex::NONE, loco::replace(), loco::MatMul::rhs(), loco::shape_get(), loco::shape_known(), and loco::Subst< SubstQualifier::Default >::with().
|
inlinefinalvirtual |
Reimplemented from exo::CanonicalNodeConverter< loco::MatMul >.
Definition at line 33 of file MatMulConverter.h.