ONE - On-device Neural Engine
Loading...
Searching...
No Matches
circledump::OpPrinterRegistry Class Reference

#include <OpPrinter.h>

Public Member Functions

 OpPrinterRegistry ()
 
const OpPrinterlookup (circle::BuiltinOperator op) const
 

Static Public Member Functions

static OpPrinterRegistryget ()
 

Detailed Description

Definition at line 34 of file OpPrinter.h.

Constructor & Destructor Documentation

◆ OpPrinterRegistry()

circledump::OpPrinterRegistry::OpPrinterRegistry ( )

Definition at line 856 of file OpPrinter.cpp.

857{
858 _op_map[circle::BuiltinOperator_ADD] = make_unique<AddPrinter>();
859 // There is no Option for ADD_N
860 _op_map[circle::BuiltinOperator_ARG_MAX] = make_unique<ArgMaxPrinter>();
861 _op_map[circle::BuiltinOperator_ARG_MIN] = make_unique<ArgMinPrinter>();
862 _op_map[circle::BuiltinOperator_AVERAGE_POOL_2D] = make_unique<Pool2DPrinter>();
863 _op_map[circle::BuiltinOperator_BATCH_MATMUL] = make_unique<BatchMatMulPrinter>();
864 _op_map[circle::BuiltinOperator_BIDIRECTIONAL_SEQUENCE_LSTM] =
865 make_unique<BidirectionalSequenceLSTMPrinter>();
866 _op_map[circle::BuiltinOperator_CAST] = make_unique<CastPrinter>();
867 // There is no Option for CEIL
868 _op_map[circle::BuiltinOperator_CONCATENATION] = make_unique<ConcatenationPrinter>();
869 _op_map[circle::BuiltinOperator_CONV_2D] = make_unique<Conv2DPrinter>();
870 // There is no Option for DENSIFY
871 _op_map[circle::BuiltinOperator_DEPTH_TO_SPACE] = make_unique<DepthToSpacePrinter>();
872 _op_map[circle::BuiltinOperator_DEPTHWISE_CONV_2D] = make_unique<DepthwiseConv2DPrinter>();
873 // There is no Option for DEQUANTIZE
874 _op_map[circle::BuiltinOperator_DIV] = make_unique<DivPrinter>();
875 _op_map[circle::BuiltinOperator_FAKE_QUANT] = make_unique<FakeQuantPrinter>();
876 // There is no Option for FLOOR
877 // There is no Option for FLOOR_MOD
878 _op_map[circle::BuiltinOperator_FULLY_CONNECTED] = make_unique<FullyConnectedPrinter>();
879 _op_map[circle::BuiltinOperator_GATHER] = make_unique<GatherPrinter>();
880 _op_map[circle::BuiltinOperator_GELU] = make_unique<GeluPrinter>();
881 _op_map[circle::BuiltinOperator_IF] = make_unique<IfPrinter>();
882 _op_map[circle::BuiltinOperator_L2_NORMALIZATION] = make_unique<L2NormPrinter>();
883 _op_map[circle::BuiltinOperator_L2_POOL_2D] = make_unique<Pool2DPrinter>();
884 _op_map[circle::BuiltinOperator_LEAKY_RELU] = make_unique<LeakyReluPrinter>();
885 _op_map[circle::BuiltinOperator_LOCAL_RESPONSE_NORMALIZATION] =
886 make_unique<LocalResponseNormalizationPrinter>();
887 // There is no Option for LOG
888 // There is no Option for LOGISTIC
889 // There is no Option for LOG_SOFTMAX
890 _op_map[circle::BuiltinOperator_MAX_POOL_2D] = make_unique<Pool2DPrinter>();
891 _op_map[circle::BuiltinOperator_MIRROR_PAD] = make_unique<MirrorPadPrinter>();
892 _op_map[circle::BuiltinOperator_MUL] = make_unique<MulPrinter>();
893 // There is no Option for NON_MAX_SUPPRESSION_V4
894 // There is no Option for NON_MAX_SUPPRESSION_V5
895 _op_map[circle::BuiltinOperator_ONE_HOT] = make_unique<OneHotPrinter>();
896 _op_map[circle::BuiltinOperator_PACK] = make_unique<PackPrinter>();
897 // There is no Option for PAD
898 // There is no Option for PADV2
899 // There is no Option for PRELU
900 // There is no Option for RELU
901 // There is no Option for RELU6
902 // There is no Option for RELU_0_TO_1
903 // There is no Option for RELU_N1_TO_1
904 _op_map[circle::BuiltinOperator_REDUCE_ANY] = make_unique<ReducerPrinter>();
905 _op_map[circle::BuiltinOperator_REDUCE_MAX] = make_unique<ReducerPrinter>();
906 _op_map[circle::BuiltinOperator_REDUCE_MIN] = make_unique<ReducerPrinter>();
907 _op_map[circle::BuiltinOperator_REDUCE_PROD] = make_unique<ReducerPrinter>();
908 _op_map[circle::BuiltinOperator_RESHAPE] = make_unique<ReshapePrinter>();
909 _op_map[circle::BuiltinOperator_RESIZE_BILINEAR] = make_unique<ResizeBilinearPrinter>();
910 _op_map[circle::BuiltinOperator_RESIZE_NEAREST_NEIGHBOR] =
911 make_unique<ResizeNearestNeighborPrinter>();
912 _op_map[circle::BuiltinOperator_REVERSE_SEQUENCE] = make_unique<ReverseSequencePrinter>();
913 // There is no Option for ROUND
914 // There is no Option for SELECT
915 // There is no Option for SELECT_V2
916 _op_map[circle::BuiltinOperator_SHAPE] = make_unique<ShapePrinter>();
917 // There is no Option for SIN
918 // There is no Option for SLICE
919 _op_map[circle::BuiltinOperator_SOFTMAX] = make_unique<SoftmaxPrinter>();
920 _op_map[circle::BuiltinOperator_SPACE_TO_DEPTH] = make_unique<SpaceToDepthPrinter>();
921 // There is no Option for SPACE_TO_BATCH_ND
922 _op_map[circle::BuiltinOperator_SPARSE_TO_DENSE] = make_unique<SparseToDensePrinter>();
923 _op_map[circle::BuiltinOperator_SPLIT] = make_unique<SplitPrinter>();
924 _op_map[circle::BuiltinOperator_SPLIT_V] = make_unique<SplitVPrinter>();
925 _op_map[circle::BuiltinOperator_SQUEEZE] = make_unique<SqueezePrinter>();
926 _op_map[circle::BuiltinOperator_STRIDED_SLICE] = make_unique<StridedSlicePrinter>();
927 _op_map[circle::BuiltinOperator_SUB] = make_unique<SubPrinter>();
928 _op_map[circle::BuiltinOperator_SUM] = make_unique<ReducerPrinter>();
929 _op_map[circle::BuiltinOperator_SVDF] = make_unique<SVDFPrinter>();
930 _op_map[circle::BuiltinOperator_TRANSPOSE_CONV] = make_unique<TransposeConvPrinter>();
931 // There is no Option for TOPK_V2
932 _op_map[circle::BuiltinOperator_UNIDIRECTIONAL_SEQUENCE_LSTM] =
933 make_unique<UnidirectionalSequenceLSTMPrinter>();
934 _op_map[circle::BuiltinOperator_UNIQUE] = make_unique<UniquePrinter>();
935 _op_map[circle::BuiltinOperator_WHILE] = make_unique<WhilePrinter>();
936 _op_map[circle::BuiltinOperator_CUSTOM] = make_unique<CustomOpPrinter>();
937
938 // Circle only
939 _op_map[circle::BuiltinOperator_BCQ_FULLY_CONNECTED] = make_unique<BCQFullyConnectedPrinter>();
940 _op_map[circle::BuiltinOperator_BCQ_GATHER] = make_unique<BCQGatherPrinter>();
941 _op_map[circle::BuiltinOperator_GRU] = make_unique<GRUPrinter>();
942 _op_map[circle::BuiltinOperator_INSTANCE_NORM] = make_unique<InstanceNormPrinter>();
943 _op_map[circle::BuiltinOperator_RMS_NORM] = make_unique<RmsNormPrinter>();
944 _op_map[circle::BuiltinOperator_ROPE] = make_unique<RoPEPrinter>();
945}

Member Function Documentation

◆ get()

static OpPrinterRegistry & circledump::OpPrinterRegistry::get ( )
inlinestatic

Definition at line 49 of file OpPrinter.h.

50 {
51 static OpPrinterRegistry me;
52 return me;
53 }

Referenced by circledump::dump_sub_graph().

◆ lookup()

const OpPrinter * circledump::OpPrinterRegistry::lookup ( circle::BuiltinOperator  op) const
inline

Definition at line 40 of file OpPrinter.h.

41 {
42 if (_op_map.find(op) == _op_map.end())
43 return nullptr;
44
45 return _op_map.at(op).get();
46 }

The documentation for this class was generated from the following files: