26 template<
typename Float32Func,
typename Uint8Func,
typename ... Params>
27 bool IsSupportedForDataTypeRef(Optional<std::string&> reasonIfUnsupported,
29 Float32Func floatFuncPtr,
30 Uint8Func uint8FuncPtr,
35 &FalseFunc<Params...>,
38 &FalseFunc<Params...>,
39 &FalseFunc<Params...>,
40 std::forward<Params>(params)...);
48 std::string CreateIncorrectDimensionsErrorMsg(
unsigned int expected,
50 std::string& layerStr,
51 std::string& tensorName)
53 std::string errorMsg =
"Reference " + layerStr +
": Expected " + std::to_string(expected) +
" dimensions but got" +
54 " " + std::to_string(actual) +
" dimensions instead, for the '" + tensorName +
"' tensor.";
62 const std::vector<TensorInfo>& infos,
73 *(PolymorphicDowncast<const ActivationDescriptor*>(&descriptor)),
80 *(PolymorphicDowncast<const ArgMinMaxDescriptor*>(&descriptor)),
86 *(PolymorphicDowncast<const BatchMatMulDescriptor*>(&descriptor)),
95 *(PolymorphicDowncast<const BatchNormalizationDescriptor*>
101 *(PolymorphicDowncast<const BatchToSpaceNdDescriptor*>(&descriptor)),
102 reasonIfUnsupported);
106 *(PolymorphicDowncast<const BroadcastToDescriptor*>(&descriptor)),
107 reasonIfUnsupported);
112 *(PolymorphicDowncast<const ComparisonDescriptor*>(&descriptor)),
113 reasonIfUnsupported);
116 std::vector<const TensorInfo*> inputInfos;
117 for (uint32_t i = 0; i < (infos.size() - 1); i++)
119 inputInfos.push_back(&infos[i]);
122 infos[infos.size() - 1],
123 *(PolymorphicDowncast<const OriginsDescriptor*>(&descriptor)),
124 reasonIfUnsupported);
134 if (infos.size() != 4)
137 "TensorInfos should be of format: {input, output, weights, biases}.");
140 auto desc = *(PolymorphicDowncast<const Convolution2dDescriptor*>(&descriptor));
148 reasonIfUnsupported);
157 reasonIfUnsupported);
163 *(PolymorphicDowncast<const DepthToSpaceDescriptor*>(&descriptor)),
164 reasonIfUnsupported);
167 if (infos.size() != 4)
170 "TensorInfos should be of format: {input, output, weights, biases}.");
173 auto desc = *(PolymorphicDowncast<const DepthwiseConvolution2dDescriptor*>(&descriptor));
181 reasonIfUnsupported);
190 reasonIfUnsupported);
199 std::array<DataType, 7> supportedTypes =
209 bool supported =
true;
211 "Reference elementwise unary: input type not supported");
214 "Reference elementwise unary: input type not supported");
217 "Reference elementwise unary: output type not supported");
220 "Reference elementwise unary: input types not matching");
223 "Reference elementwise unary: input and output types not matching");
230 *(PolymorphicDowncast<const ElementwiseUnaryDescriptor*>(&descriptor)),
231 reasonIfUnsupported);
235 *(PolymorphicDowncast<const FillDescriptor*>(&descriptor)),
236 reasonIfUnsupported);
244 *(PolymorphicDowncast<const FullyConnectedDescriptor*>(&descriptor)),
245 reasonIfUnsupported);
250 *(PolymorphicDowncast<const GatherDescriptor*>(&descriptor)),
251 reasonIfUnsupported);
256 reasonIfUnsupported);
262 *(PolymorphicDowncast<const InstanceNormalizationDescriptor*>
264 reasonIfUnsupported);
268 *(PolymorphicDowncast<const L2NormalizationDescriptor*>(&descriptor)),
269 reasonIfUnsupported);
274 *(PolymorphicDowncast<const LogicalBinaryDescriptor*>(&descriptor)),
275 reasonIfUnsupported);
279 *(PolymorphicDowncast<const LogSoftmaxDescriptor*>(&descriptor)),
280 reasonIfUnsupported);
289 *(PolymorphicDowncast<const LstmDescriptor*>(&descriptor)),
290 lstmParamsInfo.
value(),
291 reasonIfUnsupported);
299 *(PolymorphicDowncast<const QLstmDescriptor*>(&descriptor)),
300 lstmParamsInfo.
value(),
301 reasonIfUnsupported);
307 *(PolymorphicDowncast<const MeanDescriptor*>(&descriptor)),
308 reasonIfUnsupported);
316 *(PolymorphicDowncast<const NormalizationDescriptor*>(&descriptor)),
317 reasonIfUnsupported);
323 *(PolymorphicDowncast<const PadDescriptor*>(&descriptor)),
324 reasonIfUnsupported);
328 *(PolymorphicDowncast<const PermuteDescriptor*>(&descriptor)),
329 reasonIfUnsupported);
333 *(PolymorphicDowncast<const Pooling2dDescriptor*>(&descriptor)),
334 reasonIfUnsupported);
342 *(PolymorphicDowncast<const ReshapeDescriptor*>(&descriptor)),
343 reasonIfUnsupported);
347 *(PolymorphicDowncast<const ResizeDescriptor*>(&descriptor)),
348 reasonIfUnsupported);
353 reasonIfUnsupported);
357 *(PolymorphicDowncast<const ReduceDescriptor*>(&descriptor)),
358 reasonIfUnsupported);
364 *(PolymorphicDowncast<const ScatterNdDescriptor*>(&descriptor)),
365 reasonIfUnsupported);
369 *(PolymorphicDowncast<const SliceDescriptor*>(&descriptor)),
370 reasonIfUnsupported);
374 *(PolymorphicDowncast<const SoftmaxDescriptor*>(&descriptor)),
375 reasonIfUnsupported);
379 *(PolymorphicDowncast<const SpaceToBatchNdDescriptor*>(&descriptor)),
380 reasonIfUnsupported);
384 *(PolymorphicDowncast<const SpaceToDepthDescriptor*>(&descriptor)),
385 reasonIfUnsupported);
388 std::vector<TensorInfo> outputInfos;
389 for (uint32_t i = 1; i < infos.size(); i++)
391 outputInfos.push_back(infos[i]);
394 {outputInfos.begin(), outputInfos.end()},
395 *(PolymorphicDowncast<const ViewsDescriptor*>(&descriptor)),
396 reasonIfUnsupported);
400 std::vector<const TensorInfo*> inputInfos;
401 for (uint32_t i = 0; i < infos.size() - 1; i++)
403 inputInfos.push_back(&infos[i]);
406 infos[infos.size() - 1],
407 *(PolymorphicDowncast<const StackDescriptor*>(&descriptor)),
408 reasonIfUnsupported);
413 *(PolymorphicDowncast<const StridedSliceDescriptor*>(&descriptor)),
414 reasonIfUnsupported);
420 *(PolymorphicDowncast<const TileDescriptor*>(&descriptor)),
421 reasonIfUnsupported);
425 *(PolymorphicDowncast<const TransposeDescriptor*>(&descriptor)),
426 reasonIfUnsupported);
429 if (infos.size() != 4)
432 "TensorInfos should be of format: {input, output, weights, biases}.");
435 auto desc = *(PolymorphicDowncast<const TransposeConvolution2dDescriptor*>(&descriptor));
443 reasonIfUnsupported);
452 reasonIfUnsupported);
460 *(PolymorphicDowncast<const ChannelShuffleDescriptor*>(&descriptor)),
461 reasonIfUnsupported);
464 if (infos.size() != 4)
467 "TensorInfos should be of format: {input, output, weights, biases}.");
470 auto desc = *(PolymorphicDowncast<const Convolution3dDescriptor*>(&descriptor));
478 reasonIfUnsupported);
487 reasonIfUnsupported);
500 *(PolymorphicDowncast<const DetectionPostProcessDescriptor*>
502 reasonIfUnsupported);
505 *(PolymorphicDowncast<const FakeQuantizationDescriptor*>(&descriptor)),
506 reasonIfUnsupported);
515 if (infos.size() != 6)
518 "should be of format: {input, outputStateIn, cellStateIn, "
519 "hiddenStateOutputVal, cellStateOutputVal, output}");
521 auto desc = *(PolymorphicDowncast<const UnidirectionalSequenceLstmDescriptor*>(&descriptor));
529 lstmParamsInfo.
value(),
530 reasonIfUnsupported);
535 *(PolymorphicDowncast<const Pooling3dDescriptor*>(&descriptor)),
536 reasonIfUnsupported);
551 quantizedLstmInputParamsInfo.
value(),
552 reasonIfUnsupported);
565 bool supported =
true;
568 std::array<DataType,6> supportedTypes = {
577 "Reference activation: input type not supported.");
580 "Reference activation: output type not supported.");
583 "Reference activation: input and output types mismatched.");
586 "Reference activation: input and output shapes are of different rank.");
589 struct ActivationFunctionSupported :
public Rule
622 supported &=
CheckSupportRule(ActivationFunctionSupported(descriptor), reasonIfUnsupported,
623 "Reference activation: function not supported.");
633 bool supported =
true;
635 std::array<DataType,7> supportedTypes = {
645 "Reference addition: input 0 is not a supported type.");
648 "Reference addition: input 1 is not a supported type.");
651 "Reference addition: output is not a supported type.");
654 "Reference addition: input 0 and Input 1 types are mismatched");
657 "Reference addition: input and output types are mismatched");
660 "Reference addition: shapes are not suitable for implicit broadcast.");
671 std::array<DataType, 8> supportedInputTypes =
682 std::array<DataType,2> supportedOutputTypes = {
687 bool supported =
true;
690 "Reference ArgMinMax: input is not a supported type.");
692 "Reference ArgMinMax: output type not supported");
705 std::array<DataType, 6> supportedTypes =
714 bool supported =
true;
717 "Reference batch matrix multiplication: input X is not a supported type");
720 "Reference batch matrix multiplication: input Y is not a supported type");
723 "Reference batch matrix multiplication: output is not a supported type");
726 "Reference batch matrix multiplication: input X and input Y types are mismatched");
729 "Reference batch matrix multiplication: inputs and output types are mismatched");
733 "Reference batch matrix multiplication: input X is not of rank 2 or greater");
737 "Reference batch matrix multiplication: input Y is not of rank 2 or greater");
753 std::array<DataType, 6> supportedTypes =
762 bool supported =
true;
765 "Reference batch normalization: input is not a supported type.");
768 "Reference batch normalization: output is not a supported type.");
771 "Reference batch normalization: input and output types are mismatched");
774 "Reference batch normalization: mean is not a supported type.");
777 "Reference batch normalization: variance is not a supported type.");
780 "Reference batch normalization: beta is not a supported type.");
783 "Reference batch normalization: gamma is not a supported type.");
795 bool supported =
true;
797 std::string batchToSpaceNdLayerStr =
"batchToSpaceNd";
798 std::string inputTensorStr =
"input";
799 std::string outputTensorStr =
"output";
802 std::array<DataType,6> supportedTypes =
812 "Reference BatchToSpaceNd: input type not supported.");
815 "Reference BatchToSpaceNd: output type not supported.");
818 "Reference BatchToSpaceNd: input and output types mismatched.");
830 bool supported =
true;
832 std::array<DataType, 8> supportedTypes
845 "BroadcastTo: input type not supported.");
848 "BroadcastTo: output type not supported");
857 std::array<DataType, 10> supportedInputTypes =
869 bool supported =
true;
871 "Reference cast: input is not a supported type");
875 "Reference cast: output is not a supported type");
878 "Reference cast: input and output shapes have different number of total elements");
889 bool supported =
true;
892 std::array<DataType, 7> supportedTypes =
903 "Reference ChannelShuffle: input is not a supported type.");
906 "Reference ChannelShuffle: output is not a supported type.");
909 "Reference ChannelShuffle: input and output types are mismatched.");
922 std::array<DataType, 8> supportedInputTypes =
933 bool supported =
true;
935 "Reference comparison: input 0 is not a supported type");
938 "Reference comparison: input 0 and Input 1 types are mismatched");
941 "Reference comparison: output is not of type Boolean");
944 "Reference comparison: shapes are not suitable for implicit broadcast.");
956 bool supported =
true;
957 std::array<DataType,7> supportedTypes =
968 "Reference concatenation: output type not supported");
972 "Reference concatenation: input type not supported");
975 "Reference concatenation: input and output types mismatched.");
984 std::array<DataType, 8> supportedTypes =
997 "Reference constant: output is not a supported type.");
1007 &FalseInputFuncF32<>,
1013 &FalseOutputFuncF16<>,
1026 &FalseInputFuncF16<>,
1034 &FalseOutputFuncF32<>,
1047 bool supported =
true;
1050 std::array<DataType,7> supportedTypes =
1061 "Reference Convolution2d: input is not a supported type.");
1064 "Reference Convolution2d: output is not a supported type.");
1067 "Reference Convolution2d: input and output types mismatched.");
1073 std::array<DataType, 3> supportedWeightTypes =
1081 "Reference Convolution2d: weights type not supported for quantized input.");
1086 "Reference Convolution2d: weights is not a supported type.");
1089 "Reference Convolution2d: input and weights types mismatched.");
1094 std::array<DataType,4> biasesSupportedTypes =
1102 "Reference Convolution2d: biases is not a supported type.");
1116 bool supported =
true;
1119 std::array<DataType,7> supportedTypes =
1130 "Reference Convolution3d: input is not a supported type.");
1133 "Reference Convolution3d: output is not a supported type.");
1136 "Reference Convolution3d: input and output types mismatched.");
1141 std::array<DataType, 3> supportedWeightTypes =
1149 "Reference Convolution3d: weights type not supported for quantized input.");
1154 "Reference Convolution3d: weights is not a supported type.");
1157 "Reference Convolution3d: input and weights types mismatched.");
1162 std::array<DataType,4> biasesSupportedTypes =
1170 "Reference Convolution3d: biases is not a supported type.");
1181 bool supported =
true;
1183 std::array<DataType, 8> supportedTypes =
1196 "Reference for Debug layer: input type not supported");
1199 "Reference for Debug layer: output type not supported");
1202 "Reference for Debug layer: input and output types are mismatched");
1213 bool supported =
true;
1215 std::array<DataType,6> supportedTypes =
1225 "Reference DepthToSpace: input type not supported");
1228 "Reference DepthToSpace: output type not supported");
1231 "Reference DepthToSpace: input and output types are mismatched");
1244 bool supported =
true;
1247 std::array<DataType,7> supportedTypes =
1258 "Reference DepthwiseConvolution2d: input is not a supported type.");
1261 "Reference DepthwiseConvolution2d: output is not a supported type.");
1264 "Reference DepthwiseConvolution2d: input and output types mismatched.");
1269 std::array<DataType, 3> supportedWeightTypes =
1277 "Reference DepthwiseConvolution2d: weights type not supported for "
1278 "quantized input.");
1283 "Reference DepthwiseConvolution2d: weights is not a supported type.");
1286 "Reference DepthwiseConvolution2d: input and weights types mismatched.");
1291 std::array<DataType,4> biasesSupportedTypes =
1298 "Reference DepthwiseConvolution2d: biases is not a supported type.");
1309 bool supported =
true;
1311 std::array<DataType,5> supportedInputTypes = {
1320 "Reference for Dequantize layer: input type not supported.");
1323 "Reference for Dequantize layer: per-axis quantized input not supported.");
1325 std::array<DataType,3> supportedOutputTypes = {
1331 "Reference for Dequantize layer: output type not supported.");
1334 "Reference for Dequantize layer: input/output shapes have different num total "
1350 IgnoreUnused(anchors, detectionBoxes, detectionClasses, detectionScores, numDetections, descriptor);
1352 bool supported =
true;
1354 std::array<DataType,6> supportedInputTypes =
1364 "Reference DetectionPostProcess: input 0 is not a supported type.");
1367 "Reference DetectionPostProcess: input 1 is not a supported type.");
1387 bool supported =
true;
1389 std::array<DataType,7> supportedTypes = {
1399 "Reference division: input 0 is not a supported type.");
1402 "Reference division: input 1 is not a supported type.");
1405 "Reference division: output is not a supported type.");
1408 "Reference division: input 0 and Input 1 types are mismatched");
1411 "Reference division: input and output types are mismatched");
1414 "Reference division: shapes are not suitable for implicit broadcast.");
1426 std::array<DataType, 7> supportedTypes =
1436 std::array<DataType, 1> logicalSupportedTypes =
1441 bool supported =
true;
1446 "Reference elementwise unary: input type not supported");
1449 "Reference elementwise unary: output type not supported");
1454 "Reference elementwise unary: input type not supported");
1457 "Reference elementwise unary: output type not supported");
1461 "Reference elementwise unary: input and output types not matching");
1464 "Reference elementwise unary: input and output shapes"
1465 "have different number of total elements");
1475 bool supported =
true;
1477 std::array<DataType,1> supportedTypes =
1483 "Reference fake quantization: input type not supported.");
1496 bool supported =
true;
1498 std::array<DataType,3> supportedTypes =
1506 "Reference Fill: input type not supported.");
1509 "Reference Fill: output type not supported.");
1517 bool supported =
true;
1519 std::array<DataType,3> supportedTypes =
1526 "Reference Floor: input type not supported.");
1529 "Reference Floor: output type not supported.");
1541 bool supported =
true;
1544 std::array<DataType,6> supportedTypes =
1555 "Reference Fully Connected: input type not supported.");
1558 "Reference Fully Connected: output type not supported.");
1561 "Reference Fully Connected: weights type not supported.");
1564 "Reference Fully Connected: input and output types mismatched.");
1567 "Reference Fully Connected: weights is not a supported type.");
1570 "Reference Fully Connected: input and weights types mismatched.");
1575 std::array<DataType, 5>
1576 supportedBiasTypes =
1585 "Reference Fully Connected: bias type not supported.");
1588 "Reference Fully Connected: bias and weight types mismatch.");
1591 "Reference Fully Connected: bias type inferred from weights is incompatible.");
1594 "Reference Fully Connected: bias must have 1 dimension.");
1606 bool supported =
true;
1607 std::array<DataType,7> supportedTypes =
1618 "Reference GatherNd: input type not supported");
1621 "Reference GatherNd: output type not supported");
1624 "Reference GatherNd: indices (input1) type not supported");
1627 "Reference GatherNd: input and output types not matching");
1638 bool supported =
true;
1639 std::array<DataType,7> supportedTypes =
1652 "Reference Gather: input type not supported");
1655 "Reference Gather: output type not supported");
1658 "Reference Gather: indices (input1) type not supported");
1661 "Reference Gather: input and output types not matching");
1679 std::array<DataType, 3> supportedTypes =
1685 bool supported =
true;
1688 "Reference Instance Normalization: input type not supported.");
1691 "Reference Instance Normalization: output type not supported.");
1694 "Reference Instance Normalization: input and output types mismatched.");
1697 "Reference Instance Normalization: input and output shapes have different "
1698 "num total elements.");
1710 std::array<DataType, 6> supportedTypes =
1719 bool supported =
true;
1722 "Reference L2normalization: input type not supported.");
1725 "Reference L2normalization: output type not supported.");
1728 "Reference L2normalization: input and output types mismatched.");
1731 "Reference L2normalization: input and output shapes have different "
1732 "num total elements.");
1745 std::array<DataType, 1> supportedTypes =
1750 bool supported =
true;
1752 "Reference LogicalBinary: input 0 type not supported");
1754 "Reference LogicalBinary: input 1 type not supported");
1757 "Reference LogicalBinary: input and output types do not match");
1760 "Reference LogicalBinary: shapes are not suitable for implicit broadcast.");
1772 std::array<DataType, 4> supportedTypes =
1780 bool supported =
true;
1782 "Reference LogSoftmax: input type not supported");
1785 "Reference LogSoftmax: output type not supported");
1788 "Reference LogSoftmax: input and output types do not match");
1807 bool supported =
true;
1809 std::array<DataType,3> supportedTypes = {
1816 "Reference Lstm: input is not a supported type.");
1818 "Reference Lstm: input and outputStateIn types are mismatched");
1820 "Reference Lstm: input and cellStateIn types are mismatched");
1822 "Reference Lstm: input and scratchBuffer types are mismatched");
1824 "Reference Lstm: input and outputStateOut types are mismatched");
1826 "Reference Lstm: input and cellStateOut types are mismatched");
1829 "Reference Lstm: input and output types are mismatched");
1832 "Reference Lstm: input and InputToForgetWeights types are mismatched");
1834 "Reference Lstm: input and InputToCellWeights types are mismatched");
1836 "Reference Lstm: input and InputToOutputWeights types are mismatched");
1838 "Reference Lstm: input and RecurrentToForgetWeights types are mismatched");
1840 "Reference Lstm: input and RecurrentToCellWeights types are mismatched");
1842 "Reference Lstm: input and RecurrentToOutputWeights types are mismatched");
1844 "Reference Lstm: input and ForgetGateBias types are mismatched");
1846 "Reference Lstm: input and CellBias types are mismatched");
1848 "Reference Lstm: input and OutputGateBias types are mismatched");
1852 "Reference Lstm: input and InputToInputWeights types are mismatched");
1854 reasonIfUnsupported,
1855 "Reference Lstm: input and RecurrentToInputWeights types are mismatched");
1857 "Reference Lstm: input and InputGateBias types are mismatched");
1861 reasonIfUnsupported,
1862 "Reference Lstm: input and CellToInputWeights types are mismatched");
1868 "Reference Lstm: input and CellToForgetWeights types are mismatched");
1870 "Reference Lstm: input and CellToOutputWeights types are mismatched");
1875 "Reference Lstm: input and mProjectionWeights types are mismatched");
1879 "Reference Lstm: input and ProjectionBias types are mismatched");
1887 reasonIfUnsupported,
1888 "Reference Lstm: input and InputLayerNormWeights types are mismatched");
1891 reasonIfUnsupported,
1892 "Reference Lstm: input and ForgetLayerNormWeights types are mismatched");
1894 reasonIfUnsupported,
1895 "Reference Lstm: input and CellLayerNormWeights types are mismatched");
1897 reasonIfUnsupported,
1898 "Reference Lstm: input and OutputLayerNormWeights types are mismatched");
1909 bool supported =
true;
1911 std::array<DataType,7> supportedTypes = {
1921 "Reference maximum: input 0 is not a supported type.");
1924 "Reference maximum: input 1 is not a supported type.");
1927 "Reference maximum: output is not a supported type.");
1930 "Reference maximum: input 0 and Input 1 types are mismatched");
1933 "Reference maximum: input and output types are mismatched");
1936 "Reference maximum: shapes are not suitable for implicit broadcast.");
1946 bool supported =
true;
1947 std::string meanLayerStr =
"Mean";
1948 std::string outputTensorStr =
"output";
1950 std::array<DataType,6> supportedTypes =
1961 "Reference Mean: input type not supported.");
1964 "Reference Mean: input and output types are mismatched");
1969 reasonIfUnsupported,
1972 meanLayerStr, outputTensorStr).data());
1974 else if (descriptor.
m_Axis.empty())
1977 reasonIfUnsupported,
1979 meanLayerStr, outputTensorStr).data());
1988 reasonIfUnsupported,
1990 meanLayerStr, outputTensorStr).data());
1995 reasonIfUnsupported,
1997 meanLayerStr, outputTensorStr).data());
2008 bool supported =
true;
2010 std::array<DataType,7> supportedTypes =
2022 "Reference MemCopy: input type not supported");
2025 "Reference MemCopy: output type not supported");
2028 "Reference MemCopy: input and output types are mismatched");
2038 bool supported =
true;
2040 std::array<DataType,7> supportedTypes = {
2050 "Reference minimum: input 0 is not a supported type.");
2053 "Reference minimum: input 1 is not a supported type.");
2056 "Reference minimum: output is not a supported type.");
2059 "Reference minimum: input 0 and Input 1 types are mismatched");
2062 "Reference minimum: input and output types are mismatched");
2065 "Reference minimum: shapes are not suitable for implicit broadcast.");
2075 bool supported =
true;
2077 std::array<DataType,7> supportedTypes = {
2087 "Reference multiplication: input 0 is not a supported type.");
2090 "Reference multiplication: input 1 is not a supported type.");
2093 "Reference multiplication: output is not a supported type.");
2096 "Reference multiplication: input 0 and Input 1 types are mismatched");
2099 "Reference multiplication: input and output types are mismatched");
2102 "Reference multiplication: shapes are not suitable for implicit broadcast.");
2115 std::array<DataType, 6> supportedTypes =
2124 bool supported =
true;
2127 "Reference normalization: input type not supported.");
2130 "Reference normalization: output type not supported.");
2133 "Reference normalization: input and output shapes have different "
2134 "num total elements.");
2151 bool supported =
true;
2154 std::array<DataType,6> supportedTypes =
2164 "Reference pad: input is not a supported type.");
2167 "Reference pad: output is not a supported type.");
2170 "Reference pad: input and output types are mismatched.");
2181 bool supported =
true;
2184 std::array<DataType, 6> supportedTypes =
2195 "Reference permute: input is not a supported type.");
2198 "Reference permute: output is not a supported type.");
2201 "Reference permute: input and output types are mismatched.");
2212 bool supported =
true;
2215 std::array<DataType,6> supportedTypes =
2225 "Reference poolind2d: input is not a supported type.");
2228 "Reference poolind2d: output is not a supported type.");
2231 "Reference poolind2d: input and output types are mismatched.");
2242 bool supported =
true;
2245 std::array<DataType,6> supportedTypes =
2255 "Reference poolind3d: input is not a supported type.");
2258 "Reference poolind3d: output is not a supported type.");
2261 "Reference poolind3d: input and output types are mismatched.");
2295 bool supported =
true;
2298 std::array<DataType,7> supportedInputTypes = {
2308 "Reference quantize: input type not supported.");
2311 std::array<DataType,4> supportedOutputTypes = {
2318 "Reference quantize: output type not supported.");
2321 "Reference quantize: input and output shapes have different num total elements.");
2332 std::array<DataType,1> supportedOutputTypes =
2338 "Reference rank: input type not supported.");
2347 bool supported =
true;
2348 std::array<DataType,7> supportedTypes =
2359 "Reference Reduce: input type not supported");
2362 "Reference Reduce: output type not supported");
2365 "Reference Reduce: input and output types not matching");
2378 std::array<DataType,8> supportedOutputTypes =
2391 "Reference reshape: input type not supported.");
2400 bool supported =
true;
2401 std::array<DataType,7> supportedTypes =
2413 "Reference Resize: input type not supported");
2416 "Reference Resize: output type not supported");
2419 "Reference Resize: input and output types not matching");
2429 bool supported =
true;
2431 std::array<DataType,8> supportedTypes =
2444 "Reference ReverseV2: input0 type not supported");
2447 "Reference ReverseV2: output type not supported");
2450 "Reference ReverseV2: input0 and output types not matching");
2452 std::array<DataType,6> input2SupportedTypes =
2458 "Reference ReverseV2: input1 type not supported");
2472 bool supported =
true;
2474 std::array<DataType, 7> supportedTypes
2485 std::array<DataType, 1> indicesSupportedTypes =
2491 "ScatterNd: indices type not supported.");
2494 "ScatterNd: updates type not supported.");
2497 "ScatterNd: output type not supported");
2500 "ScatterNd: input and updates types are mismatched");
2506 "ScatterNd: input type not supported.");
2509 "ScatterNd: input and output types are mismatched");
2515 "ScatterNd: shape type not supported.");
2526 bool supported =
true;
2528 std::array<DataType, 1> supportedTypes =
2534 "Reference Shape: output type not supported");
2545 bool supported =
true;
2547 std::array<DataType, 5> supportedTypes =
2557 "Reference Slice: input type not supported");
2560 "Reference Slice: output type not supported");
2563 "Reference Slice: input and output types are mismatched");
2574 bool supported =
true;
2575 std::array<DataType,7> supportedTypes =
2586 "Reference Softmax: output type not supported");
2589 "Reference Softmax: input type not supported");
2592 "Reference Softmax: input type not supported");
2603 bool supported =
true;
2604 std::array<DataType,6> supportedTypes =
2614 "Reference SpaceToBatchNd: input type not supported");
2617 "Reference SpaceToBatchNd: output type not supported");
2620 "Reference SpaceToBatchNd: input and output types are mismatched");
2632 bool supported =
true;
2634 std::array<DataType,6> supportedTypes =
2644 "Reference SpaceToDepth: input type not supported");
2647 "Reference SpaceToDepth: output type not supported");
2650 "Reference SpaceToDepth: input and output types are mismatched");
2656 const std::vector<std::reference_wrapper<TensorInfo>>& outputs,
2661 bool supported =
true;
2662 std::array<DataType,6> supportedTypes =
2672 "Reference splitter: output type not supported");
2676 "Reference splitter: input type not supported");
2679 "Reference splitter: input and output types mismatched.");
2692 bool supported =
true;
2693 std::array<DataType,7> supportedTypes =
2704 "Reference stack: output type not supported");
2708 "Reference stack: input type not supported");
2711 "Reference stack: input and output types mismatched.");
2723 bool supported =
true;
2725 std::array<DataType,5> supportedTypes =
2734 "Reference StridedSlice: input type not supported");
2737 "Reference StridedSlice: output type not supported");
2740 "Reference StridedSlice: input and output types are mismatched");
2750 bool supported =
true;
2752 std::array<DataType,7> supportedTypes = {
2762 "Reference subtraction: input 0 is not a supported type.");
2765 "Reference subtraction: input 1 is not a supported type.");
2768 "Reference subtraction: output is not a supported type.");
2771 "Reference subtraction: input 0 and Input 1 types are mismatched");
2774 "Reference subtraction: input and output types are mismatched");
2777 "Reference subtraction: shapes are not suitable for implicit broadcast.");
2787 bool supported =
true;
2789 std::array<DataType, 6> supportedTypes
2799 "PReLU: input is not a supported type.");
2802 "PReLU: alpha is not a supported type.");
2805 "PReLU: output is not a supported type.");
2808 "PReLU: input, alpha and output types are mismatched");
2811 "PReLU: shapes are not suitable for implicit broadcast");
2823 bool supported =
true;
2825 std::array<DataType, 8> supportedTypes
2838 "Tile: input type not supported.");
2841 "Tile: output type not supported");
2854 bool supported =
true;
2856 std::array<DataType,7> supportedTypes =
2867 "Reference TransposeConvolution2d: input is not a supported type.");
2870 "Reference TransposeConvolution2d: output is not a supported type.");
2873 "Reference TransposeConvolution2d: input and output types mismatched.");
2879 std::array<DataType, 3> supportedWeightTypes =
2887 "Reference TransposeConvolution2d: weights type not supported for "
2888 "quantized input.");
2893 "Reference TransposeConvolution2d: weights is not a supported type.");
2896 "Reference TransposeConvolution2d: input and weights types mismatched.");
2901 std::array<DataType,4> biasesSupportedTypes =
2908 "Reference TransposeConvolution2d: biases is not a supported type.");
2920 bool supported =
true;
2923 std::array<DataType, 6> supportedTypes =
2934 "Reference transpose: input is not a supported type.");
2937 "Reference transpose: output is not a supported type.");
2940 "Reference transpose: input and output types are mismatched.");
2962 bool supported =
true;
2964 std::array<DataType, 2> supportedTypes =
2970 std::array<DataType, 2> supportedWeightTypes =
2976 std::array<DataType, 3> supportedBiasTypes =
2985 "Reference UnidirectionalSequenceLstm: input is not a supported type.");
2987 "Reference UnidirectionalSequenceLstm: output is not a supported type.");
2991 reasonIfUnsupported,
2992 "Reference UnidirectionalSequenceLstm: InputToForgetWeights "
2993 "is not a supported type.");
2995 reasonIfUnsupported,
2996 "Reference UnidirectionalSequenceLstm: InputToCellWeights is not a supported type.");
2998 reasonIfUnsupported,
2999 "Reference UnidirectionalSequenceLstm: InputToOutputWeights "
3000 "is not a supported type.");
3002 reasonIfUnsupported,
3003 "Reference UnidirectionalSequenceLstm: RecurrentToForgetWeights "
3004 "is not a supported type.");
3006 reasonIfUnsupported,
3007 "Reference UnidirectionalSequenceLstm: RecurrentToCellWeights "
3008 "is not a supported type.");
3010 reasonIfUnsupported,
3011 "Reference UnidirectionalSequenceLstm: RecurrentToOutputWeights "
3012 "is not a supported type.");
3015 "Reference UnidirectionalSequenceLstm: ForgetGateBias is not a supported type.");
3017 "Reference UnidirectionalSequenceLstm: CellBias is not a supported type.");
3019 "Reference UnidirectionalSequenceLstm: OutputGateBias is not a supported type.");
3023 reasonIfUnsupported,
3024 "Reference UnidirectionalSequenceLstm: InputToInputWeights "
3025 "is not a supported type.");
3027 reasonIfUnsupported,
3028 "Reference UnidirectionalSequenceLstm: RecurrentToInputWeights "
3029 "is not a supported type.");
3031 "Reference UnidirectionalSequenceLstm: InputGateBias is not a supported type.");
3035 reasonIfUnsupported,
3036 "Reference UnidirectionalSequenceLstm: CellToInputWeights "
3037 "is not a supported type.");
3043 reasonIfUnsupported,
3044 "Reference UnidirectionalSequenceLstm: CellToForgetWeights "
3045 "is not a supported type.");
3047 reasonIfUnsupported,
3048 "Reference UnidirectionalSequenceLstm: CellToOutputWeights "
3049 "is not a supported type.");
3054 reasonIfUnsupported,
3055 "Reference UnidirectionalSequenceLstm: ProjectionWeights "
3056 "is not a supported type.");
3060 "Reference UnidirectionalSequenceLstm: input and ProjectionBias types "
3069 reasonIfUnsupported,
3070 "Reference UnidirectionalSequenceLstm: InputLayerNormWeights "
3071 "is not a supported type.");
3074 reasonIfUnsupported,
3075 "Reference UnidirectionalSequenceLstm: ForgetLayerNormWeights "
3076 "is not a supported type.");
3078 reasonIfUnsupported,
3079 "Reference UnidirectionalSequenceLstm: CellLayerNormWeights "
3080 "is not a supported type.");
3082 reasonIfUnsupported,
3083 "Reference UnidirectionalSequenceLstm: OutputLayerNormWeights "
3084 "is not a supported type.");
bool IsMemImportSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsMergeSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsQuantizedLstmSupported(const TensorInfo &input, const TensorInfo &previousCellStateIn, const TensorInfo &previousOutputIn, const TensorInfo &cellStateOut, const TensorInfo &output, const QuantizedLstmInputParamsInfo ¶msInfo, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool has_value() const noexcept
bool IsMeanSupported(const TensorInfo &input, const TensorInfo &output, const MeanDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsMultiplicationSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsQLstmSupported(const TensorInfo &input, const TensorInfo &previousOutputIn, const TensorInfo &previousCellStateIn, const TensorInfo &outputStateOut, const TensorInfo &cellStateOut, const TensorInfo &output, const QLstmDescriptor &descriptor, const LstmInputParamsInfo ¶msInfo, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsConvolution2dSupported(const TensorInfo &input, const TensorInfo &output, const Convolution2dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsGatherSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, const GatherDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsReverseV2Supported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsTransposeConvolution2dSupported(const TensorInfo &input, const TensorInfo &output, const TransposeConvolution2dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsComparisonSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, const ComparisonDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsTransposeSupported(const TensorInfo &input, const TensorInfo &output, const TransposeDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsLayerSupported(const LayerType &type, const std::vector< TensorInfo > &infos, const BaseDescriptor &descriptor, const Optional< LstmInputParamsInfo > &lstmParamsInfo, const Optional< QuantizedLstmInputParamsInfo > &, Optional< std::string & > reasonIfUnsupported) const override
Default implementation of the ILayerSupport interface, Backends should implement this as a switch sta...
bool IsStridedSliceSupported(const TensorInfo &input, const TensorInfo &output, const StridedSliceDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsBatchMatMulSupported(const TensorInfo &inputX, const TensorInfo &inputY, const TensorInfo &output, const BatchMatMulDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsDequantizeSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsTileSupported(const TensorInfo &input, const TensorInfo &output, const TileDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsSliceSupported(const TensorInfo &input, const TensorInfo &output, const SliceDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsGatherNdSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsArgMinMaxSupported(const TensorInfo &input, const TensorInfo &output, const ArgMinMaxDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsConstantSupported(const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsMaximumSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsOutputSupported(const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsCastSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsShapeSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsConvolution3dSupported(const TensorInfo &input, const TensorInfo &output, const Convolution3dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsPermuteSupported(const TensorInfo &input, const TensorInfo &output, const PermuteDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsPooling2dSupported(const TensorInfo &input, const TensorInfo &output, const Pooling2dDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsFakeQuantizationSupported(const TensorInfo &input, const FakeQuantizationDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsDilatedDepthwiseConvolutionSupported(const TensorInfo &input, const TensorInfo &output, const DepthwiseConvolution2dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsConvertFp32ToFp16Supported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsPadSupported(const TensorInfo &input, const TensorInfo &output, const PadDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsPooling3dSupported(const TensorInfo &input, const TensorInfo &output, const Pooling3dDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsRankSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsMinimumSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsFullyConnectedSupported(const TensorInfo &input, const TensorInfo &output, const TensorInfo &weights, const TensorInfo &biases, const FullyConnectedDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsSubtractionSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsElementwiseUnarySupported(const TensorInfo &input, const TensorInfo &output, const ElementwiseUnaryDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsMemCopySupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsQuantizeSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsDepthToSpaceSupported(const TensorInfo &input, const TensorInfo &output, const DepthToSpaceDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsLogicalBinarySupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, const LogicalBinaryDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported) const
bool IsResizeSupported(const TensorInfo &input, const TensorInfo &output, const ResizeDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsDepthwiseConvolutionSupported(const TensorInfo &input, const TensorInfo &output, const DepthwiseConvolution2dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsLogSoftmaxSupported(const TensorInfo &input, const TensorInfo &output, const LogSoftmaxDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported) const
bool IsInputSupported(const TensorInfo &input, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsActivationSupported(const TensorInfo &input, const TensorInfo &output, const ActivationDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsInstanceNormalizationSupported(const TensorInfo &input, const TensorInfo &output, const InstanceNormalizationDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsPreluSupported(const TensorInfo &input, const TensorInfo &alpha, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsSplitterSupported(const TensorInfo &input, const std::vector< std::reference_wrapper< TensorInfo >> &outputs, const ViewsDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsBroadcastToSupported(const TensorInfo &input, const TensorInfo &output, const BroadcastToDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsReduceSupported(const TensorInfo &input, const TensorInfo &output, const ReduceDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsUnidirectionalSequenceLstmSupported(const TensorInfo &input, const TensorInfo &outputStateIn, const TensorInfo &cellStateIn, const TensorInfo &outputStateOut, const TensorInfo &cellStateOut, const TensorInfo &output, const UnidirectionalSequenceLstmDescriptor &descriptor, const LstmInputParamsInfo ¶msInfo, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsDivisionSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsConvertFp16ToFp32Supported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsConcatSupported(const std::vector< const TensorInfo * > inputs, const TensorInfo &output, const OriginsDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsSoftmaxSupported(const TensorInfo &input, const TensorInfo &output, const SoftmaxDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsSpaceToDepthSupported(const TensorInfo &input, const TensorInfo &output, const SpaceToDepthDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsStackSupported(const std::vector< const TensorInfo * > &inputs, const TensorInfo &output, const StackDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsChannelShuffleSupported(const TensorInfo &input, const TensorInfo &output, const ChannelShuffleDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsScatterNdSupported(const TensorInfo &input, const TensorInfo &indices, const TensorInfo &updates, const TensorInfo &output, const ScatterNdDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsFloorSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsL2NormalizationSupported(const TensorInfo &input, const TensorInfo &output, const L2NormalizationDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsDetectionPostProcessSupported(const TensorInfo &boxEncodings, const TensorInfo &scores, const TensorInfo &anchors, const TensorInfo &detectionBoxes, const TensorInfo &detectionClasses, const TensorInfo &detectionScores, const TensorInfo &numDetections, const DetectionPostProcessDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsFillSupported(const TensorInfo &input, const TensorInfo &output, const FillDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsLstmSupported(const TensorInfo &input, const TensorInfo &outputStateIn, const TensorInfo &cellStateIn, const TensorInfo &scratchBuffer, const TensorInfo &outputStateOut, const TensorInfo &cellStateOut, const TensorInfo &output, const LstmDescriptor &descriptor, const LstmInputParamsInfo ¶msInfo, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsDebugSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsBatchToSpaceNdSupported(const TensorInfo &input, const TensorInfo &output, const BatchToSpaceNdDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsReshapeSupported(const TensorInfo &input, const TensorInfo &output, const ReshapeDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsSpaceToBatchNdSupported(const TensorInfo &input, const TensorInfo &output, const SpaceToBatchNdDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsBatchNormalizationSupported(const TensorInfo &input, const TensorInfo &output, const TensorInfo &mean, const TensorInfo &var, const TensorInfo &beta, const TensorInfo &gamma, const BatchNormalizationDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsNormalizationSupported(const TensorInfo &input, const TensorInfo &output, const NormalizationDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsAdditionSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
unsigned int GetNumDimensions() const
DataType GetDataType() const
Copyright (c) 2021 ARM Limited and Contributors.
bool IsSupportedForDataTypeGeneric(Optional< std::string & > reasonIfUnsupported, DataType dataType, Float16Func float16FuncPtr, Float32Func float32FuncPtr, Uint8Func uint8FuncPtr, Int32Func int32FuncPtr, BooleanFunc booleanFuncPtr, Params &&... params)
void IgnoreUnused(Ts &&...)
@ BoundedReLu
min(a, max(b, input)) ReLu1 & ReLu6.
LayerType
When adding a new layer, adapt also the LastLayer enum value in the enum class LayerType below.
@ UnidirectionalSequenceLstm
bool CheckSupportRule(F rule, Optional< std::string & > reasonIfUnsupported, const char *reason)
constexpr bool IsQuantized8BitType(DataType dataType)
An ActivationDescriptor for the ActivationLayer.
ActivationFunction m_Function
The activation function to use (Sigmoid, TanH, Linear, ReLu, BoundedReLu, SoftReLu,...
An ArgMinMaxDescriptor for ArgMinMaxLayer.
Base class for all descriptors.
A BatchMatMulDescriptor for the BatchMatMul operator.
A BatchNormalizationDescriptor for the BatchNormalizationLayer.
A BatchToSpaceNdDescriptor for the BatchToSpaceNdLayer.
A ChannelShuffleDescriptor for the ChannelShuffle operator.
A ComparisonDescriptor for the ComparisonLayer.
A Convolution2dDescriptor for the Convolution2dLayer.
A Convolution3dDescriptor for the Convolution3dLayer.
A DepthwiseConvolution2dDescriptor for the DepthwiseConvolution2dLayer.
A ElementwiseUnaryDescriptor for the ElementwiseUnaryLayer.
UnaryOperation m_Operation
Specifies the elementwiseUnary operation to execute.
EmptyOptional is used to initialize the Optional class in case we want to have default value for an O...
A FakeQuantizationDescriptor for the FakeQuantizationLayer.
A FillDescriptor for the FillLayer.
A FullyConnectedDescriptor for the FullyConnectedLayer.
bool m_BiasEnabled
Enable/disable bias.
A GatherDescriptor for the GatherLayer.
An InstanceNormalizationDescriptor for InstanceNormalizationLayer.
A L2NormalizationDescriptor for the L2NormalizationLayer.
A LogicalBinaryDescriptor for the LogicalBinaryLayer.
An LstmDescriptor for the LstmLayer.
bool m_PeepholeEnabled
Enable/disable peephole.
bool m_LayerNormEnabled
Enable/disable layer normalization.
bool m_ProjectionEnabled
Enable/disable the projection layer.
bool m_CifgEnabled
Enable/disable cifg (coupled input & forget gate).
A MeanDescriptor for the MeanLayer.
std::vector< unsigned int > m_Axis
Values for the dimensions to reduce.
bool m_KeepDims
Enable/disable keep dimensions. If true, then the reduced dimensions that are of length 1 are kept.
A NormalizationDescriptor for the NormalizationLayer.
An OriginsDescriptor for the ConcatLayer.
A PadDescriptor for the PadLayer.
A PermuteDescriptor for the PermuteLayer.
A Pooling2dDescriptor for the Pooling2dLayer.
A Pooling3dDescriptor for the Pooling3dLayer.
A QLstmDescriptor for the QLstmLayer.
A ReduceDescriptor for the REDUCE operators.
A ReshapeDescriptor for the ReshapeLayer.
A ResizeDescriptor for the ResizeLayer.
A ScatterNdDescriptor for the ScatterNdLayer.
bool m_InputEnabled
Flag to show if input tensor is accepted.
A SliceDescriptor for the SliceLayer.
A SoftmaxDescriptor for the SoftmaxLayer.
A SpaceToBatchNdDescriptor for the SpaceToBatchNdLayer.
A SpaceToDepthDescriptor for the SpaceToDepthLayer.
A StackDescriptor for the StackLayer.
A StridedSliceDescriptor for the StridedSliceLayer.
A TransposeConvolution2dDescriptor for the TransposeConvolution2dLayer.
A TransposeDescriptor for the TransposeLayer.
A ViewsDescriptor for the SplitterLayer.