ONE - On-device Neural Engine
|
#include <CircleOptimizer.h>
Data Structures | |
struct | Options |
Public Member Functions | |
Options * | options (void) |
void | optimize (luci::Module *) const |
void | optimize (loco::Graph *) const |
void | sparsify (loco::Graph *) const |
Definition at line 30 of file CircleOptimizer.h.
void luci::CircleOptimizer::optimize | ( | loco::Graph * | g | ) | const |
Definition at line 264 of file CircleOptimizer.cpp.
References luci::CircleOptimizer::Options::CommonSubExpressionElimination, luci::CircleOptimizer::Options::ConvertNCHWToNHWC, luci::CircleOptimizer::Options::DecomposeHardSwishPass, luci::CircleOptimizer::Options::DecomposeSoftmaxPass, luci::CircleOptimizer::Options::ExpandBroadcastConst, luci::CircleOptimizer::Options::FoldAddV2, luci::CircleOptimizer::Options::FoldCast, luci::CircleOptimizer::Options::FoldDensify, luci::CircleOptimizer::Options::FoldDepthwiseConv2D, luci::CircleOptimizer::Options::FoldDequantize, luci::CircleOptimizer::Options::FoldFullyConnected, luci::CircleOptimizer::Options::FoldGather, luci::CircleOptimizer::Options::FoldMul, luci::CircleOptimizer::Options::FoldReshape, luci::CircleOptimizer::Options::FoldShape, luci::CircleOptimizer::Options::FoldSparseToDense, luci::CircleOptimizer::Options::FoldSqueeze, luci::CircleOptimizer::Options::ForwardReshapeToUnaryOp, luci::CircleOptimizer::Options::ForwardTransposeOp, luci::CircleOptimizer::Options::FuseActivationFunction, luci::CircleOptimizer::Options::FuseAddToFullyConnectedBias, luci::CircleOptimizer::Options::FuseAddWithConv, luci::CircleOptimizer::Options::FuseAddWithFullyConnected, luci::CircleOptimizer::Options::FuseAddWithTConv, luci::CircleOptimizer::Options::FuseBatchNormWithConv, luci::CircleOptimizer::Options::FuseBatchNormWithDwConv, luci::CircleOptimizer::Options::FuseBatchNormWithTConv, luci::CircleOptimizer::Options::FuseGelu, luci::CircleOptimizer::Options::FuseHorizontalFullyConnected, luci::CircleOptimizer::Options::FuseInstanceNorm, luci::CircleOptimizer::Options::FuseMeanWithMean, luci::CircleOptimizer::Options::FuseMulToFullyConnectedWeights, luci::CircleOptimizer::Options::FuseMulWithConv, luci::CircleOptimizer::Options::FuseMulWithDiv, luci::CircleOptimizer::Options::FuseMulWithFullyConnected, luci::CircleOptimizer::Options::FusePreActivationBatchNorm, luci::CircleOptimizer::Options::FusePRelu, luci::CircleOptimizer::Options::FuseRmsNorm, luci::CircleOptimizer::Options::FuseRoPE, luci::CircleOptimizer::Options::FuseRsqrt, luci::CircleOptimizer::Options::FuseSliceWithTConv, luci::CircleOptimizer::Options::FuseTransposeWithMean, m, luci::CircleOptimizer::Options::MakeBatchNormGammaPositive, luci::CircleOptimizer::Options::RemoveDuplicateConst, luci::CircleOptimizer::Options::RemoveFakeQuant, luci::CircleOptimizer::Options::RemoveGatherGuard, luci::CircleOptimizer::Options::RemoveQDQForMixedPrecisionOp, luci::CircleOptimizer::Options::RemoveQuantDequantSeq, luci::CircleOptimizer::Options::RemoveRedundantQuantize, luci::CircleOptimizer::Options::RemoveRedundantReshape, luci::CircleOptimizer::Options::RemoveRedundantTranspose, luci::CircleOptimizer::Options::RemoveUnnecessaryAdd, luci::CircleOptimizer::Options::RemoveUnnecessaryCast, luci::CircleOptimizer::Options::RemoveUnnecessaryReshape, luci::CircleOptimizer::Options::RemoveUnnecessarySlice, luci::CircleOptimizer::Options::RemoveUnnecessarySplit, luci::CircleOptimizer::Options::RemoveUnnecessaryStridedSlice, luci::CircleOptimizer::Options::RemoveUnnecessaryTranspose, luci::CircleOptimizer::Options::ReplaceMulAddWithDepthwiseConv, luci::CircleOptimizer::Options::ReplaceNonConstFCWithBatchMatMul, luci::CircleOptimizer::Options::ReplaceSubWithAdd, luci::CircleOptimizer::Options::ReplaceWithFCGeluFC, luci::CircleOptimizer::Options::ResolveCustomOpAdd, luci::CircleOptimizer::Options::ResolveCustomOpBatchMatMul, luci::CircleOptimizer::Options::ResolveCustomOpMatMul, luci::CircleOptimizer::Options::ResolveCustomOpMaxPoolWithArgmax, luci::CircleOptimizer::Options::ResolveCustomOpSplitV, luci::CircleOptimizer::Options::ResolveFormerCustomOp, logo::Restart, luci::CircleOptimizer::Options::ShuffleWeightTo16x1Float32, luci::CircleOptimizer::Options::SubstituteExpandDimsToReshape, luci::CircleOptimizer::Options::SubstitutePackToReshape, luci::CircleOptimizer::Options::SubstitutePadV2ToPad, luci::CircleOptimizer::Options::SubstituteSplitVToSplit, luci::CircleOptimizer::Options::SubstituteSqueezeToReshape, luci::CircleOptimizer::Options::SubstituteStridedSliceToReshape, luci::CircleOptimizer::Options::SubstituteTransposeToReshape, luci::CircleOptimizer::Options::TransformMinMaxToRelu6Pass, luci::CircleOptimizer::Options::TransformMinReluToRelu6Pass, luci::CircleOptimizer::Options::TransformSqrtDivToRsqrtMul, luci::CircleOptimizer::Options::UnrollUnidirSeqLSTM, and luci::CircleOptimizer::Options::XpSepActFromTransposeConv.
void luci::CircleOptimizer::optimize | ( | luci::Module * | m | ) | const |
Definition at line 240 of file CircleOptimizer.cpp.
References luci::CircleOptimizer::Options::FuseBCQ, m, and logo::Restart.
Referenced by entry().
CircleOptimizer::Options * luci::CircleOptimizer::options | ( | void | ) |
Definition at line 215 of file CircleOptimizer.cpp.
Referenced by entry().
void luci::CircleOptimizer::sparsify | ( | loco::Graph * | g | ) | const |
Definition at line 426 of file CircleOptimizer.cpp.
References luci::DENSE, luci::SparsifyTensorPass::run(), luci::SPARSE_CSR, luci::CircleOptimizer::Options::SparsifyTensorPass, and luci::tensor_name().
Referenced by entry().