ONE - On-device Neural Engine
|
Functions | |
void | swapAdjacent (mir::Graph *g, mir::Operation *top, mir::Operation *bottom) |
Swap adjacent nodes in Graph. Creates new nodes and replaces the old ones with new. | |
void | removeNodeIfUnused (mir::Graph *g, mir::Operation *op) |
void nnc::opt_util::removeNodeIfUnused | ( | mir::Graph * | g, |
mir::Operation * | op | ||
) |
Definition at line 48 of file OptimizationUtils.cpp.
References mir::Operation::getOutput(), and mir::Operation::Output::getUses().
Referenced by nnc::ConstantFoldTranspose::run(), nnc::SinkRelu::run(), and nnc::SinkTranspose::run().
void nnc::opt_util::swapAdjacent | ( | mir::Graph * | g, |
mir::Operation * | top, | ||
mir::Operation * | bottom | ||
) |
Swap adjacent nodes in Graph. Creates new nodes and replaces the old ones with new.
g | MIR Graph |
top | Node |
bottom | Node |
Definition at line 23 of file OptimizationUtils.cpp.
References mir::Operation::getInputs(), mir::Operation::getNumInputs(), mir::Operation::getNumOutputs(), and mir::Operation::getOutputs().
Referenced by nnc::SinkRelu::run(), and nnc::SinkTranspose::run().