@@ -30,114 +30,134 @@ def get_all_aliases(cls) -> List[str]:
30
30
31
31
32
32
@ONNX_OPERATION_METATYPES .register ()
33
- class ConvolutionMetatype (ONNXOpMetatype ):
33
+ class ONNXConvolutionMetatype (ONNXOpMetatype ):
34
34
name = 'ConvOp'
35
35
op_names = ['Conv' ]
36
36
hw_config_names = [HWConfigOpName .CONVOLUTION ]
37
37
38
38
39
39
@ONNX_OPERATION_METATYPES .register ()
40
- class LinearMetatype (ONNXOpMetatype ):
40
+ class ONNXLinearMetatype (ONNXOpMetatype ):
41
41
name = 'LinearOp'
42
42
op_names = ['Gemm' ]
43
43
hw_config_names = [HWConfigOpName .MATMUL ]
44
44
45
45
46
46
@ONNX_OPERATION_METATYPES .register ()
47
- class ReluMetatype (ONNXOpMetatype ):
47
+ class ONNXReluMetatype (ONNXOpMetatype ):
48
48
name = 'ReluOp'
49
49
op_names = ['Relu' , 'Clip' ]
50
50
51
51
52
52
@ONNX_OPERATION_METATYPES .register ()
53
- class SigmoidMetatype (ONNXOpMetatype ):
53
+ class ONNXSigmoidMetatype (ONNXOpMetatype ):
54
54
name = 'SigmoidOp'
55
55
op_names = ['Sigmoid' ]
56
56
57
57
58
58
@ONNX_OPERATION_METATYPES .register ()
59
- class GlobalAveragePoolMetatype (ONNXOpMetatype ):
59
+ class ONNXHardSigmoidMetatype (ONNXOpMetatype ):
60
+ name = 'HardSigmoidOp'
61
+ op_names = ['HardSigmoid' ]
62
+
63
+
64
+ @ONNX_OPERATION_METATYPES .register ()
65
+ class ONNXGlobalAveragePoolMetatype (ONNXOpMetatype ):
60
66
name = 'GlobalAveragePoolOp'
61
67
op_names = ['GlobalAveragePool' ]
62
68
hw_config_names = [HWConfigOpName .AVGPOOL ]
63
69
64
70
65
71
@ONNX_OPERATION_METATYPES .register ()
66
- class MaxPoolMetatype (ONNXOpMetatype ):
72
+ class ONNXAveragePoolMetatype (ONNXOpMetatype ):
73
+ name = 'AveragePoolOp'
74
+ op_names = ['AveragePool' ]
75
+ hw_config_names = [HWConfigOpName .AVGPOOL ]
76
+
77
+
78
+ @ONNX_OPERATION_METATYPES .register ()
79
+ class ONNXMaxPoolMetatype (ONNXOpMetatype ):
67
80
name = 'MaxPoolOp'
68
81
op_names = ['MaxPool' ]
69
82
hw_config_names = [HWConfigOpName .MAXPOOL ]
70
83
71
84
72
85
@ONNX_OPERATION_METATYPES .register ()
73
- class ConstantMetatype (ONNXOpMetatype ):
86
+ class ONNXConstantMetatype (ONNXOpMetatype ):
74
87
name = 'ConstantOp'
75
88
op_names = ['Constant' ]
76
89
77
90
78
91
@ONNX_OPERATION_METATYPES .register ()
79
- class AddLayerMetatype (ONNXOpMetatype ):
92
+ class ONNXAddLayerMetatype (ONNXOpMetatype ):
80
93
name = 'AddOp'
81
94
op_names = ['Add' ]
82
95
hw_config_names = [HWConfigOpName .ADD ]
83
96
84
97
85
98
@ONNX_OPERATION_METATYPES .register ()
86
- class MulLayerMetatype (ONNXOpMetatype ):
99
+ class ONNXMulLayerMetatype (ONNXOpMetatype ):
87
100
name = 'MulOp'
88
101
op_names = ['Mul' ]
89
102
hw_config_names = [HWConfigOpName .MULTIPLY ]
90
103
91
104
92
105
@ONNX_OPERATION_METATYPES .register ()
93
- class SumMetatype (ONNXOpMetatype ):
106
+ class ONNXSumMetatype (ONNXOpMetatype ):
94
107
name = 'SumOp'
95
108
op_names = ['Sum' ]
96
109
hw_config_names = [HWConfigOpName .REDUCESUM ]
97
110
98
111
99
112
@ONNX_OPERATION_METATYPES .register ()
100
- class ConcatLayerMetatype (ONNXOpMetatype ):
113
+ class ONNXConcatLayerMetatype (ONNXOpMetatype ):
101
114
name = 'ConcatOp'
102
115
op_names = ['Concat' ]
103
116
hw_config_names = [HWConfigOpName .CONCAT ]
104
117
105
118
106
119
@ONNX_OPERATION_METATYPES .register ()
107
- class BatchNormMetatype (ONNXOpMetatype ):
120
+ class ONNXBatchNormMetatype (ONNXOpMetatype ):
108
121
name = 'BatchNormalizationOp'
109
122
op_names = ['BatchNormalization' ]
110
123
111
124
112
125
@ONNX_OPERATION_METATYPES .register ()
113
- class ResizeMetatype (ONNXOpMetatype ):
126
+ class ONNXResizeMetatype (ONNXOpMetatype ):
114
127
name = 'ResizeOp'
115
128
op_names = ['Resize' ]
129
+ hw_config_names = [HWConfigOpName .INTERPOLATE ]
116
130
117
131
118
132
@ONNX_OPERATION_METATYPES .register ()
119
- class ReshapeMetatype (ONNXOpMetatype ):
133
+ class ONNXReshapeMetatype (ONNXOpMetatype ):
120
134
name = 'ReshapeOp'
121
135
op_names = ['Reshape' ]
122
136
hw_config_names = [HWConfigOpName .RESHAPE ]
123
137
124
138
125
139
@ONNX_OPERATION_METATYPES .register ()
126
- class TransposeMetatype (ONNXOpMetatype ):
140
+ class ONNXTransposeMetatype (ONNXOpMetatype ):
127
141
name = 'TransposeOp'
128
142
op_names = ['Transpose' ]
129
143
hw_config_names = [HWConfigOpName .TRANSPOSE ]
130
144
131
145
132
146
@ONNX_OPERATION_METATYPES .register ()
133
- class FlattenMetatype (ONNXOpMetatype ):
147
+ class ONNXFlattenMetatype (ONNXOpMetatype ):
134
148
name = 'FlattenOp'
135
149
op_names = ['Flatten' ]
136
150
hw_config_names = [HWConfigOpName .FLATTEN ]
137
151
138
152
139
- GENERAL_WEIGHT_LAYER_METATYPES = [ConvolutionMetatype ,
140
- LinearMetatype ]
153
+ @ONNX_OPERATION_METATYPES .register ()
154
+ class ONNXSoftmaxMetatype (ONNXOpMetatype ):
155
+ name = 'SoftmaxOp'
156
+ op_names = ['Softmax' ]
157
+
158
+
159
+ GENERAL_WEIGHT_LAYER_METATYPES = [ONNXConvolutionMetatype ,
160
+ ONNXLinearMetatype ]
141
161
142
162
143
163
def get_operator_metatypes () -> List [Type [OperatorMetatype ]]:
0 commit comments