24 switch (operation.type)
26 case OperationType::ABS:
27 return ConvertElementwiseUnary(operation, model, data, UnaryOperation::Abs);
28 case OperationType::ADD:
30 case OperationType::ARGMAX:
31 return ConvertArgMinMax(operation, model, data, ArgMinMaxFunction::Max);
32 case OperationType::ARGMIN:
33 return ConvertArgMinMax(operation, model, data, ArgMinMaxFunction::Min);
34 case OperationType::AVERAGE_POOL_2D:
35 return ConvertAveragePool2d(operation, model, data);
36 case OperationType::BATCH_MATMUL:
37 return ConvertBatchMatMul(operation, model, data);
38 case OperationType::BATCH_TO_SPACE_ND:
39 return ConvertBatchToSpaceNd(operation, model, data);
40 case OperationType::CAST:
41 return ConvertCast(operation, model, data);
42 case OperationType::CONCATENATION:
43 return ConvertConcatenation(operation, model, data);
44 case OperationType::CONV_2D:
45 return ConvertConv2d(operation, model, data);
46 case OperationType::DEPTH_TO_SPACE:
47 return ConvertDepthToSpace(operation, model, data);
48 case OperationType::DEPTHWISE_CONV_2D:
49 return ConvertDepthwiseConv2d(operation, model, data);
50 case OperationType::DEQUANTIZE:
51 return ConvertDequantize(operation, model, data);
52 case OperationType::DIV:
54 case OperationType::ELU:
55 return ConvertElu(operation, model, data);
56 case OperationType::EQUAL:
57 return ConvertComparison(operation, model, data, ComparisonOperation::Equal);
58 case OperationType::EXP:
59 return ConvertElementwiseUnary(operation, model, data, UnaryOperation::Exp);
60 case OperationType::EXPAND_DIMS:
61 return ConvertExpandDims(operation, model, data);
62 case OperationType::FILL:
63 return ConvertFill(operation, model, data);
64 case OperationType::FLOOR:
65 return ConvertFloor(operation, model, data);
66 case OperationType::FULLY_CONNECTED:
67 return ConvertFullyConnected(operation, model, data);
68 case OperationType::GATHER:
69 return ConvertGather(operation, model, data);
70 case OperationType::GREATER:
71 return ConvertComparison(operation, model, data, ComparisonOperation::Greater);
72 case OperationType::GREATER_EQUAL:
73 return ConvertComparison(operation, model, data, ComparisonOperation::GreaterOrEqual);
74 case OperationType::GROUPED_CONV_2D:
75 return ConvertGroupedConv2d(operation, model, data);
76 case OperationType::HARD_SWISH:
77 return ConvertHardSwish(operation, model, data);
78 case OperationType::INSTANCE_NORMALIZATION:
79 return ConvertInstanceNormalization(operation, model, data);
80 case OperationType::L2_NORMALIZATION:
81 return ConvertL2Normalization(operation, model, data);
82 case OperationType::L2_POOL_2D:
83 return ConvertL2Pool2d(operation, model, data);
84 case OperationType::LESS:
85 return ConvertComparison(operation, model, data, ComparisonOperation::Less);
86 case OperationType::LESS_EQUAL:
87 return ConvertComparison(operation, model, data, ComparisonOperation::LessOrEqual);
88 case OperationType::LOCAL_RESPONSE_NORMALIZATION:
89 return ConvertLocalResponseNormalization(operation, model, data);
90 case OperationType::LOG:
91 return ConvertElementwiseUnary(operation, model, data, UnaryOperation::Log);
92 case OperationType::LOGICAL_AND:
93 return ConvertLogicalBinary(operation, model, data, LogicalBinaryOperation::LogicalAnd);
94 case OperationType::LOGICAL_NOT:
95 return ConvertElementwiseUnary(operation, model, data, UnaryOperation::LogicalNot);
96 case OperationType::LOGICAL_OR:
97 return ConvertLogicalBinary(operation, model, data, LogicalBinaryOperation::LogicalOr);
98 case OperationType::LOGISTIC:
99 return ConvertLogistic(operation, model, data);
100 case OperationType::LOG_SOFTMAX:
101 return ConvertLogSoftmax(operation, model, data);
102 case OperationType::LSTM:
103 return ConvertLstm(operation, model, data);
104 case OperationType::MAX_POOL_2D:
105 return ConvertMaxPool2d(operation, model, data);
106 case OperationType::MAXIMUM:
108 case OperationType::MEAN:
109 return ConvertMean(operation, model, data);
110 case OperationType::MINIMUM:
112 case OperationType::MUL:
114 case OperationType::NEG:
115 return ConvertElementwiseUnary(operation, model, data, UnaryOperation::Neg);
116 case OperationType::NOT_EQUAL:
117 return ConvertComparison(operation, model, data, ComparisonOperation::NotEqual);
118 case OperationType::PAD:
119 return ConvertPad(operation, model, data);
120 case OperationType::PAD_V2:
121 return ConvertPadV2(operation, model, data);
122 case OperationType::PRELU:
123 return ConvertPrelu(operation, model, data);
124 case OperationType::POW:
125 return ConvertElementwiseBinary(operation, model, data, BinaryOperation::Power);
126 case OperationType::QUANTIZE:
127 return ConvertQuantize(operation, model, data);
128 case OperationType::QUANTIZED_LSTM:
129 return ConvertQuantizedLstm(operation, model, data);
130 case OperationType::QUANTIZED_16BIT_LSTM:
131 return ConvertQuantized16BitLstm(operation, model, data);
132 case OperationType::RANK:
133 return ConvertRank(operation, model, data);
134 case OperationType::REDUCE_MAX:
136 case OperationType::REDUCE_MIN:
138 case OperationType::REDUCE_PROD:
140 case OperationType::REDUCE_SUM:
142 case OperationType::RELU:
143 return ConvertReLu(operation, model, data);
144 case OperationType::RELU1:
145 return ConvertReLu1(operation, model, data);
146 case OperationType::RELU6:
147 return ConvertReLu6(operation, model, data);
148 case OperationType::RESHAPE:
149 return ConvertReshape(operation, model, data);
150 case OperationType::RESIZE_BILINEAR:
151 return ConvertResize(operation, model, data, ResizeMethod::Bilinear);
152 case OperationType::RESIZE_NEAREST_NEIGHBOR:
153 return ConvertResize(operation, model, data, ResizeMethod::NearestNeighbor);
154 case OperationType::REVERSE:
155 return ConvertReverseV2(operation, model, data);
156 case OperationType::RSQRT:
157 return ConvertElementwiseUnary(operation, model, data, UnaryOperation::Rsqrt);
158 case OperationType::SIN:
159 return ConvertElementwiseUnary(operation, model, data, UnaryOperation::Sin);
160 case OperationType::SOFTMAX:
161 return ConvertSoftmax(operation, model, data);
162 case OperationType::SPACE_TO_BATCH_ND :
163 return ConvertSpaceToBatchNd(operation, model, data);
164 case OperationType::SPACE_TO_DEPTH:
165 return ConvertSpaceToDepth(operation, model, data);
166 case OperationType::SQRT:
167 return ConvertSqrt(operation, model, data);
168 case OperationType::SQUEEZE:
169 return ConvertSqueeze(operation, model, data);
170 case OperationType::STRIDED_SLICE:
171 return ConvertStridedSlice(operation, model, data);
172 case OperationType::SUB:
173 return ConvertElementwiseBinary(operation, model, data, BinaryOperation::Sub);
174 case OperationType::TILE:
175 return ConvertTile(operation, model, data);
176 case OperationType::TRANSPOSE:
177 return ConvertTranspose(operation, model, data);
178 case OperationType::TRANSPOSE_CONV_2D:
179 return ConvertTransposeConv2d(operation, model, data);
180 case OperationType::TANH:
181 return ConvertTanH(operation, model, data);
183 VLOG(DRIVER) <<
"Operation type: " << operation.type <<
"is not supported in ArmnnDriver";