ONE - On-device Neural Engine
Loading...
Searching...
No Matches
luci::CircleOptimizer::Options Struct Referenceabstract

#include <CircleOptimizer.h>

Public Types

enum  Algorithm {
  FuseAddToFullyConnectedBias , FuseAddWithConv , FuseAddWithFullyConnected , FuseAddWithTConv ,
  FuseBatchNormWithConv , FuseBatchNormWithDwConv , FuseBatchNormWithTConv , FuseMulToFullyConnectedWeights ,
  FuseSliceWithTConv , FuseBCQ , FuseHorizontalFullyConnected , FuseInstanceNorm ,
  FuseMeanWithMean , FuseMulWithConv , FuseMulWithDiv , FuseMulWithFullyConnected ,
  FuseTransposeWithMean , ResolveCustomOpAdd , ResolveCustomOpBatchMatMul , ResolveCustomOpMatMul ,
  ResolveCustomOpMaxPoolWithArgmax , ResolveCustomOpSplitV , ResolveFormerCustomOp , FoldAddV2 ,
  FoldCast , FoldDensify , FoldDepthwiseConv2D , FoldFullyConnected ,
  FoldDequantize , FoldGather , FoldMul , FoldReshape ,
  FoldShape , FoldSparseToDense , FoldSqueeze , ForwardReshapeToUnaryOp ,
  ForwardTransposeOp , SparsifyTensorPass , FusePreActivationBatchNorm , MakeBatchNormGammaPositive ,
  FuseActivationFunction , FusePRelu , FuseGelu , FuseRsqrt ,
  FuseRmsNorm , FuseRoPE , ShuffleWeightTo16x1Float32 , RemoveRedundantTranspose ,
  ReplaceMulAddWithDepthwiseConv , ReplaceNonConstFCWithBatchMatMul , ReplaceSubWithAdd , ReplaceWithFCGeluFC ,
  SubstituteExpandDimsToReshape , SubstitutePackToReshape , SubstitutePadV2ToPad , SubstituteSplitVToSplit ,
  SubstituteSqueezeToReshape , ExpandBroadcastConst , ConvertNCHWToNHWC , CommonSubExpressionElimination ,
  RemoveUnnecessaryAdd , RemoveUnnecessaryCast , RemoveUnnecessarySlice , RemoveUnnecessaryStridedSlice ,
  RemoveUnnecessarySplit , RemoveUnnecessaryReshape , RemoveUnnecessaryTranspose , TransformMinMaxToRelu6Pass ,
  TransformMinReluToRelu6Pass , TransformSqrtDivToRsqrtMul , DecomposeHardSwishPass , DecomposeSoftmaxPass ,
  SubstituteStridedSliceToReshape , SubstituteTransposeToReshape , RemoveRedundantQuantize , RemoveRedundantReshape ,
  RemoveFakeQuant , RemoveQDQForMixedPrecisionOp , RemoveQuantDequantSeq , RemoveDuplicateConst ,
  UnrollUnidirSeqLSTM , XpSepActFromTransposeConv , RemoveGatherGuard
}
 
enum  AlgorithmParameters {
  Sparsify_tensor_name , Sparsify_traversal_order , Sparsify_format , Sparsify_block_size ,
  Sparsify_block_map , NCHW_to_NHWC_input_shape , NCHW_to_NHWC_output_shape
}
 

Public Member Functions

virtual ~Options ()=default
 
virtual void enable (Algorithm)=0
 
virtual bool query (Algorithm)=0
 
virtual void param (AlgorithmParameters, const std::string &)=0
 
virtual const std::string param (AlgorithmParameters) const =0
 

Detailed Description

Definition at line 33 of file CircleOptimizer.h.

Member Enumeration Documentation

◆ Algorithm

Enumerator
FuseAddToFullyConnectedBias 
FuseAddWithConv 
FuseAddWithFullyConnected 
FuseAddWithTConv 
FuseBatchNormWithConv 
FuseBatchNormWithDwConv 
FuseBatchNormWithTConv 
FuseMulToFullyConnectedWeights 
FuseSliceWithTConv 
FuseBCQ 
FuseHorizontalFullyConnected 
FuseInstanceNorm 
FuseMeanWithMean 
FuseMulWithConv 
FuseMulWithDiv 
FuseMulWithFullyConnected 
FuseTransposeWithMean 
ResolveCustomOpAdd 
ResolveCustomOpBatchMatMul 
ResolveCustomOpMatMul 
ResolveCustomOpMaxPoolWithArgmax 
ResolveCustomOpSplitV 
ResolveFormerCustomOp 
FoldAddV2 
FoldCast 
FoldDensify 
FoldDepthwiseConv2D 
FoldFullyConnected 
FoldDequantize 
FoldGather 
FoldMul 
FoldReshape 
FoldShape 
FoldSparseToDense 
FoldSqueeze 
ForwardReshapeToUnaryOp 
ForwardTransposeOp 
SparsifyTensorPass 
FusePreActivationBatchNorm 
MakeBatchNormGammaPositive 
FuseActivationFunction 
FusePRelu 
FuseGelu 
FuseRsqrt 
FuseRmsNorm 
FuseRoPE 
ShuffleWeightTo16x1Float32 
RemoveRedundantTranspose 
ReplaceMulAddWithDepthwiseConv 
ReplaceNonConstFCWithBatchMatMul 
ReplaceSubWithAdd 
ReplaceWithFCGeluFC 
SubstituteExpandDimsToReshape 
SubstitutePackToReshape 
SubstitutePadV2ToPad 
SubstituteSplitVToSplit 
SubstituteSqueezeToReshape 
ExpandBroadcastConst 
ConvertNCHWToNHWC 
CommonSubExpressionElimination 
RemoveUnnecessaryAdd 
RemoveUnnecessaryCast 
RemoveUnnecessarySlice 
RemoveUnnecessaryStridedSlice 
RemoveUnnecessarySplit 
RemoveUnnecessaryReshape 
RemoveUnnecessaryTranspose 
TransformMinMaxToRelu6Pass 
TransformMinReluToRelu6Pass 
TransformSqrtDivToRsqrtMul 
DecomposeHardSwishPass 
DecomposeSoftmaxPass 
SubstituteStridedSliceToReshape 
SubstituteTransposeToReshape 
RemoveRedundantQuantize 
RemoveRedundantReshape 
RemoveFakeQuant 
RemoveQDQForMixedPrecisionOp 
RemoveQuantDequantSeq 
RemoveDuplicateConst 
UnrollUnidirSeqLSTM 
XpSepActFromTransposeConv 
RemoveGatherGuard 

Definition at line 35 of file CircleOptimizer.h.

36 {
46 FuseBCQ,
67 FoldMul,
120 };

◆ AlgorithmParameters

Enumerator
Sparsify_tensor_name 
Sparsify_traversal_order 
Sparsify_format 
Sparsify_block_size 
Sparsify_block_map 
NCHW_to_NHWC_input_shape 
NCHW_to_NHWC_output_shape 

Definition at line 122 of file CircleOptimizer.h.

Constructor & Destructor Documentation

◆ ~Options()

virtual luci::CircleOptimizer::Options::~Options ( )
virtualdefault

Member Function Documentation

◆ enable()

virtual void luci::CircleOptimizer::Options::enable ( Algorithm  )
pure virtual

◆ param() [1/2]

virtual const std::string luci::CircleOptimizer::Options::param ( AlgorithmParameters  ) const
pure virtual

◆ param() [2/2]

virtual void luci::CircleOptimizer::Options::param ( AlgorithmParameters  ,
const std::string &   
)
pure virtual

◆ query()

virtual bool luci::CircleOptimizer::Options::query ( Algorithm  )
pure virtual

The documentation for this struct was generated from the following file: