ONE - On-device Neural Engine
|
Class to fuse TFLAdd or TFLSub into Bias input of the following ops: More...
#include <FuseBiasAddPass.h>
Public Member Functions | |
const char * | name (void) const final |
bool | run (loco::Graph *g) final |
Run the pass. | |
Public Member Functions inherited from logo::Pass | |
virtual | ~Pass ()=default |
Class to fuse TFLAdd or TFLSub into Bias input of the following ops:
Case 1. Conv2D and TFLAdd
BEFORE:
TFLConst A (a scalar or a tensor of shape [1] or [depth of TFLConv2D]) |
Foo – TFLConv2D – TFLAdd (or TFLSub) – Bar | TFLConst B –+ (bias)
AFTER: Foo --— TFLConv2D --— Bar | TFLConst A' –+ (bias)
TFLConst B (dead node)
TFLAdd (or TFLSub) (dead node)
Definition at line 52 of file FuseBiasAddPass.h.
|
inlinefinalvirtual |
Reimplemented from logo::Pass.
Definition at line 54 of file FuseBiasAddPass.h.
|
finalvirtual |
Run the pass.
Implements logo::Pass.
Definition at line 339 of file FuseBiasAddPass.cpp.
References locoex::TFLNode::accept(), loco::active_nodes(), locoex::TFLNode::dialect(), locoex::TFLDialect::get(), and loco::output_nodes().
Referenced by package.infer.session::inference().