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);
107 *(PolymorphicDowncast<const ComparisonDescriptor*>(&descriptor)),
108 reasonIfUnsupported);
111 std::vector<const TensorInfo*> inputInfos;
112 for (uint32_t i = 0; i < (infos.size() - 1); i++)
114 inputInfos.push_back(&infos[i]);
117 infos[infos.size() - 1],
118 *(PolymorphicDowncast<const OriginsDescriptor*>(&
descriptor)),
133 if (infos.size() != 4)
136 "TensorInfos should be of format: {input, output, weights, biases}.");
139 auto desc = *(PolymorphicDowncast<const Convolution2dDescriptor*>(&
descriptor));
147 reasonIfUnsupported);
156 reasonIfUnsupported);
162 *(PolymorphicDowncast<const DepthToSpaceDescriptor*>(&descriptor)),
163 reasonIfUnsupported);
166 if (infos.size() != 4)
169 "TensorInfos should be of format: {input, output, weights, biases}.");
172 auto desc = *(PolymorphicDowncast<const DepthwiseConvolution2dDescriptor*>(&
descriptor));
180 reasonIfUnsupported);
189 reasonIfUnsupported);
199 *(PolymorphicDowncast<const ElementwiseUnaryDescriptor*>(&descriptor)),
200 reasonIfUnsupported);
204 *(PolymorphicDowncast<const FillDescriptor*>(&descriptor)),
205 reasonIfUnsupported);
213 *(PolymorphicDowncast<const FullyConnectedDescriptor*>(&descriptor)),
214 reasonIfUnsupported);
219 *(PolymorphicDowncast<const GatherDescriptor*>(&descriptor)),
220 reasonIfUnsupported);
225 reasonIfUnsupported);
231 *(PolymorphicDowncast<const InstanceNormalizationDescriptor*>
233 reasonIfUnsupported);
237 *(PolymorphicDowncast<const L2NormalizationDescriptor*>(&descriptor)),
238 reasonIfUnsupported);
243 *(PolymorphicDowncast<const LogicalBinaryDescriptor*>(&descriptor)),
244 reasonIfUnsupported);
248 *(PolymorphicDowncast<const LogSoftmaxDescriptor*>(&descriptor)),
249 reasonIfUnsupported);
258 *(PolymorphicDowncast<const LstmDescriptor*>(&descriptor)),
259 lstmParamsInfo.
value(),
268 *(PolymorphicDowncast<const QLstmDescriptor*>(&descriptor)),
269 lstmParamsInfo.
value(),
276 *(PolymorphicDowncast<const MeanDescriptor*>(&descriptor)),
277 reasonIfUnsupported);
285 *(PolymorphicDowncast<const NormalizationDescriptor*>(&descriptor)),
286 reasonIfUnsupported);
292 *(PolymorphicDowncast<const PadDescriptor*>(&descriptor)),
293 reasonIfUnsupported);
297 *(PolymorphicDowncast<const PermuteDescriptor*>(&descriptor)),
298 reasonIfUnsupported);
302 *(PolymorphicDowncast<const Pooling2dDescriptor*>(&descriptor)),
303 reasonIfUnsupported);
311 *(PolymorphicDowncast<const ReshapeDescriptor*>(&descriptor)),
312 reasonIfUnsupported);
316 *(PolymorphicDowncast<const ResizeDescriptor*>(&descriptor)),
317 reasonIfUnsupported);
321 *(PolymorphicDowncast<const ReduceDescriptor*>(&descriptor)),
322 reasonIfUnsupported);
326 *(PolymorphicDowncast<const SliceDescriptor*>(&descriptor)),
327 reasonIfUnsupported);
331 *(PolymorphicDowncast<const SoftmaxDescriptor*>(&descriptor)),
332 reasonIfUnsupported);
336 *(PolymorphicDowncast<const SpaceToBatchNdDescriptor*>(&descriptor)),
337 reasonIfUnsupported);
341 *(PolymorphicDowncast<const SpaceToDepthDescriptor*>(&descriptor)),
342 reasonIfUnsupported);
345 std::vector<TensorInfo> outputInfos;
346 for (uint32_t i = 1; i < infos.size(); i++)
348 outputInfos.push_back(infos[i]);
351 {outputInfos.begin(), outputInfos.end()},
352 *(PolymorphicDowncast<const ViewsDescriptor*>(&
descriptor)),
357 std::vector<const TensorInfo*> inputInfos;
358 for (uint32_t i = 0; i < infos.size() - 1; i++)
360 inputInfos.push_back(&infos[i]);
363 infos[infos.size() - 1],
364 *(PolymorphicDowncast<const StackDescriptor*>(&
descriptor)),
370 *(PolymorphicDowncast<const StridedSliceDescriptor*>(&descriptor)),
371 reasonIfUnsupported);
377 *(PolymorphicDowncast<const TransposeDescriptor*>(&descriptor)),
378 reasonIfUnsupported);
381 if (infos.size() != 4)
384 "TensorInfos should be of format: {input, output, weights, biases}.");
387 auto desc = *(PolymorphicDowncast<const TransposeConvolution2dDescriptor*>(&
descriptor));
395 reasonIfUnsupported);
404 reasonIfUnsupported);
412 *(PolymorphicDowncast<const ChannelShuffleDescriptor*>(&descriptor)),
413 reasonIfUnsupported);
416 if (infos.size() != 4)
419 "TensorInfos should be of format: {input, output, weights, biases}.");
422 auto desc = *(PolymorphicDowncast<const Convolution3dDescriptor*>(&
descriptor));
430 reasonIfUnsupported);
439 reasonIfUnsupported);
452 *(PolymorphicDowncast<const DetectionPostProcessDescriptor*>
454 reasonIfUnsupported);
457 *(PolymorphicDowncast<const FakeQuantizationDescriptor*>(&descriptor)),
458 reasonIfUnsupported);
467 if (infos.size() != 6)
470 "should be of format: {input, outputStateIn, cellStateIn, " 471 "hiddenStateOutputVal, cellStateOutputVal, output}");
473 auto desc = *(PolymorphicDowncast<const UnidirectionalSequenceLstmDescriptor*>(&
descriptor));
481 lstmParamsInfo.
value(),
487 *(PolymorphicDowncast<const Pooling3dDescriptor*>(&descriptor)),
488 reasonIfUnsupported);
503 quantizedLstmInputParamsInfo.
value(),
517 bool supported =
true;
520 std::array<DataType,6> supportedTypes = {
530 "Reference activation: input type not supported.");
533 "Reference activation: output type not supported.");
536 "Reference activation: input and output types mismatched.");
539 "Reference activation: input and output shapes are of different rank.");
542 struct ActivationFunctionSupported :
public Rule 574 supported &=
CheckSupportRule(ActivationFunctionSupported(descriptor), reasonIfUnsupported,
575 "Reference activation: function not supported.");
585 bool supported =
true;
587 std::array<DataType,7> supportedTypes = {
598 "Reference addition: input 0 is not a supported type.");
601 "Reference addition: input 1 is not a supported type.");
604 "Reference addition: output is not a supported type.");
607 "Reference addition: input 0 and Input 1 types are mismatched");
610 "Reference addition: input and output types are mismatched");
613 "Reference addition: shapes are not suitable for implicit broadcast.");
624 std::array<DataType, 8> supportedInputTypes =
636 std::array<DataType,2> supportedOutputTypes = {
641 bool supported =
true;
644 "Reference ArgMinMax: input is not a supported type.");
646 "Reference ArgMinMax: output type not supported");
659 std::array<DataType, 6> supportedTypes =
669 bool supported =
true;
672 "Reference batch matrix multiplication: input X is not a supported type");
675 "Reference batch matrix multiplication: input Y is not a supported type");
678 "Reference batch matrix multiplication: output is not a supported type");
681 "Reference batch matrix multiplication: input X and input Y types are mismatched");
684 "Reference batch matrix multiplication: inputs and output types are mismatched");
688 "Reference batch matrix multiplication: input X is not of rank 2 or greater");
692 "Reference batch matrix multiplication: input Y is not of rank 2 or greater");
708 std::array<DataType, 6> supportedTypes =
718 bool supported =
true;
721 "Reference batch normalization: input is not a supported type.");
724 "Reference batch normalization: output is not a supported type.");
727 "Reference batch normalization: input and output types are mismatched");
730 "Reference batch normalization: mean is not a supported type.");
733 "Reference batch normalization: variance is not a supported type.");
736 "Reference batch normalization: beta is not a supported type.");
739 "Reference batch normalization: gamma is not a supported type.");
751 bool supported =
true;
753 std::string batchToSpaceNdLayerStr =
"batchToSpaceNd";
754 std::string inputTensorStr =
"input";
755 std::string outputTensorStr =
"output";
758 std::array<DataType,6> supportedTypes =
769 "Reference BatchToSpaceNd: input type not supported.");
772 "Reference BatchToSpaceNd: output type not supported.");
775 "Reference BatchToSpaceNd: input and output types mismatched.");
779 CreateIncorrectDimensionsErrorMsg(4,
781 batchToSpaceNdLayerStr,
782 outputTensorStr).data());
786 CreateIncorrectDimensionsErrorMsg(4,
788 batchToSpaceNdLayerStr,
789 inputTensorStr).data());
798 std::array<DataType, 9> supportedInputTypes =
810 bool supported =
true;
812 "Reference cast: input is not a supported type");
816 "Reference cast: output is not a supported type");
819 "Reference cast: input and output shapes have different number of total elements");
830 bool supported =
true;
833 std::array<DataType, 7> supportedTypes =
845 "Reference ChannelShuffle: input is not a supported type.");
848 "Reference ChannelShuffle: output is not a supported type.");
851 "Reference ChannelShuffle: input and output types are mismatched.");
864 std::array<DataType, 8> supportedInputTypes =
876 bool supported =
true;
878 "Reference comparison: input 0 is not a supported type");
881 "Reference comparison: input 0 and Input 1 types are mismatched");
884 "Reference comparison: output is not of type Boolean");
896 bool supported =
true;
897 std::array<DataType,7> supportedTypes =
909 "Reference concatenation: output type not supported");
914 "Reference concatenation: input type not supported");
917 "Reference concatenation: input and output types mismatched.");
926 std::array<DataType,8> supportedTypes =
939 "Reference constant: output is not a supported type.");
946 bool supported =
true;
949 "Reference for ConvertBf16ToFp32 layer: input type not supported");
952 "Reference for ConvertBf16ToFp32 layer: output type not supported");
964 &FalseInputFuncF32<>,
970 &FalseOutputFuncF16<>,
981 bool supported =
true;
984 "Reference for ConvertFp32ToBf16 layer: input type not supported");
987 "Reference for ConvertFp32ToBf16 layer: output type not supported");
998 &FalseInputFuncF16<>,
1006 &FalseOutputFuncF32<>,
1019 bool supported =
true;
1022 std::array<DataType,7> supportedTypes =
1034 "Reference Convolution2d: input is not a supported type.");
1037 "Reference Convolution2d: output is not a supported type.");
1044 reasonIfUnsupported.
value() +=
"Output tensor type must be BFloat16 or Float32 for BFloat16 input.\n";
1051 "Reference Convolution2d: input and output types mismatched.");
1057 std::array<DataType, 3> supportedWeightTypes =
1065 "Reference Convolution2d: weights type not supported for quantized input.");
1070 "Reference Convolution2d: weights is not a supported type.");
1073 "Reference Convolution2d: input and weights types mismatched.");
1078 std::array<DataType,4> biasesSupportedTypes =
1087 "Reference Convolution2d: biases is not a supported type.");
1101 bool supported =
true;
1104 std::array<DataType,7> supportedTypes =
1116 "Reference Convolution3d: input is not a supported type.");
1119 "Reference Convolution3d: output is not a supported type.");
1122 "Reference Convolution3d: input and output types mismatched.");
1127 std::array<DataType, 3> supportedWeightTypes =
1135 "Reference Convolution3d: weights type not supported for quantized input.");
1140 "Reference Convolution3d: weights is not a supported type.");
1143 "Reference Convolution3d: input and weights types mismatched.");
1148 std::array<DataType,4> biasesSupportedTypes =
1157 "Reference Convolution3d: biases is not a supported type.");
1168 bool supported =
true;
1170 std::array<DataType, 8> supportedTypes =
1183 "Reference for Debug layer: input type not supported");
1186 "Reference for Debug layer: output type not supported");
1189 "Reference for Debug layer: input and output types are mismatched");
1200 bool supported =
true;
1202 std::array<DataType,6> supportedTypes =
1213 "Reference DepthToSpace: input type not supported");
1216 "Reference DepthToSpace: output type not supported");
1219 "Reference DepthToSpace: input and output types are mismatched");
1232 bool supported =
true;
1235 std::array<DataType,7> supportedTypes =
1247 "Reference DepthwiseConvolution2d: input is not a supported type.");
1250 "Reference DepthwiseConvolution2d: output is not a supported type.");
1253 "Reference DepthwiseConvolution2d: input and output types mismatched.");
1258 std::array<DataType, 3> supportedWeightTypes =
1266 "Reference DepthwiseConvolution2d: weights type not supported for " 1267 "quantized input.");
1272 "Reference DepthwiseConvolution2d: weights is not a supported type.");
1275 "Reference DepthwiseConvolution2d: input and weights types mismatched.");
1280 std::array<DataType,4> biasesSupportedTypes =
1288 "Reference DepthwiseConvolution2d: biases is not a supported type.");
1299 bool supported =
true;
1301 std::array<DataType,5> supportedInputTypes = {
1310 "Reference for Dequantize layer: input type not supported.");
1313 "Reference for Dequantize layer: per-axis quantized input not supported.");
1315 std::array<DataType,3> supportedOutputTypes = {
1322 "Reference for Dequantize layer: output type not supported.");
1325 "Reference for Dequantize layer: input/output shapes have different num total " 1341 IgnoreUnused(anchors, detectionBoxes, detectionClasses, detectionScores, numDetections, descriptor);
1343 bool supported =
true;
1345 std::array<DataType,6> supportedInputTypes =
1356 "Reference DetectionPostProcess: input 0 is not a supported type.");
1359 "Reference DetectionPostProcess: input 1 is not a supported type.");
1379 bool supported =
true;
1381 std::array<DataType,7> supportedTypes = {
1392 "Reference division: input 0 is not a supported type.");
1395 "Reference division: input 1 is not a supported type.");
1398 "Reference division: output is not a supported type.");
1401 "Reference division: input 0 and Input 1 types are mismatched");
1404 "Reference division: input and output types are mismatched");
1407 "Reference division: shapes are not suitable for implicit broadcast.");
1419 std::array<DataType, 7> supportedTypes =
1430 std::array<DataType, 1> logicalSupportedTypes =
1435 bool supported =
true;
1440 "Reference elementwise unary: input type not supported");
1443 "Reference elementwise unary: output type not supported");
1448 "Reference elementwise unary: input type not supported");
1451 "Reference elementwise unary: output type not supported");
1455 "Reference elementwise unary: input and output types not matching");
1458 "Reference elementwise unary: input and output shapes" 1459 "have different number of total elements");
1469 bool supported =
true;
1471 std::array<DataType,1> supportedTypes =
1477 "Reference fake quantization: input type not supported.");
1490 bool supported =
true;
1492 std::array<DataType,3> supportedTypes =
1500 "Reference Fill: input type not supported.");
1503 "Reference Fill: output type not supported.");
1512 bool supported =
true;
1514 std::array<DataType,3> supportedTypes =
1522 "Reference Floor: input type not supported.");
1525 "Reference Floor: output type not supported.");
1537 bool supported =
true;
1540 std::array<DataType,6> supportedTypes =
1551 "Reference Fully Connected: input type not supported.");
1554 "Reference Fully Connected: output type not supported.");
1557 "Reference Fully Connected: weights type not supported.");
1564 reasonIfUnsupported.
value() +=
"Output tensor type must be BFloat16 or Float32 for BFloat16 input.\n";
1571 "Reference Fully Connected: input and output types mismatched.");
1575 "Reference Fully Connected: weights is not a supported type.");
1578 "Reference Fully Connected: input and weights types mismatched.");
1583 std::array<DataType, 5>
1584 supportedBiasTypes =
1594 "Reference Fully Connected: bias type not supported.");
1597 "Reference Fully Connected: bias and weight types mismatch.");
1600 "Reference Fully Connected: bias type inferred from weights is incompatible.");
1603 "Reference Fully Connected: bias must have 1 dimension.");
1615 bool supported =
true;
1616 std::array<DataType,7> supportedTypes =
1628 "Reference GatherNd: input type not supported");
1631 "Reference GatherNd: output type not supported");
1634 "Reference GatherNd: indices (input1) type not supported");
1637 "Reference GatherNd: input and output types not matching");
1648 bool supported =
true;
1649 std::array<DataType,7> supportedTypes =
1660 if (descriptor.
m_Axis != 0)
1662 reasonIfUnsupported.
value() += std::string(
"Reference Gather: axis not supported\n");
1666 "Reference Gather: input type not supported");
1669 "Reference Gather: output type not supported");
1672 "Reference Gather: indices (input1) type not supported");
1675 "Reference Gather: input and output types not matching");
1693 std::array<DataType, 3> supportedTypes =
1700 bool supported =
true;
1703 "Reference Instance Normalization: input type not supported.");
1706 "Reference Instance Normalization: output type not supported.");
1709 "Reference Instance Normalization: input and output types mismatched.");
1712 "Reference Instance Normalization: input and output shapes have different " 1713 "num total elements.");
1725 std::array<DataType, 6> supportedTypes =
1735 bool supported =
true;
1738 "Reference L2normalization: input type not supported.");
1741 "Reference L2normalization: output type not supported.");
1744 "Reference L2normalization: input and output types mismatched.");
1747 "Reference L2normalization: input and output shapes have different " 1748 "num total elements.");
1761 std::array<DataType, 1> supportedTypes =
1766 bool supported =
true;
1768 "Reference LogicalBinary: input 0 type not supported");
1770 "Reference LogicalBinary: input 1 type not supported");
1773 "Reference LogicalBinary: input and output types do not match");
1785 std::array<DataType, 3> supportedTypes =
1792 bool supported =
true;
1794 "Reference LogSoftmax: input type not supported");
1797 "Reference LogSoftmax: output type not supported");
1800 "Reference LogSoftmax: input and output types do not match");
1819 bool supported =
true;
1821 std::array<DataType,3> supportedTypes = {
1829 "Reference Lstm: input is not a supported type.");
1831 "Reference Lstm: input and outputStateIn types are mismatched");
1833 "Reference Lstm: input and cellStateIn types are mismatched");
1835 "Reference Lstm: input and scratchBuffer types are mismatched");
1837 "Reference Lstm: input and outputStateOut types are mismatched");
1839 "Reference Lstm: input and cellStateOut types are mismatched");
1842 "Reference Lstm: input and output types are mismatched");
1845 "Reference Lstm: input and InputToForgetWeights types are mismatched");
1847 "Reference Lstm: input and InputToCellWeights types are mismatched");
1849 "Reference Lstm: input and InputToOutputWeights types are mismatched");
1851 "Reference Lstm: input and RecurrentToForgetWeights types are mismatched");
1853 "Reference Lstm: input and RecurrentToCellWeights types are mismatched");
1855 "Reference Lstm: input and RecurrentToOutputWeights types are mismatched");
1857 "Reference Lstm: input and ForgetGateBias types are mismatched");
1859 "Reference Lstm: input and CellBias types are mismatched");
1861 "Reference Lstm: input and OutputGateBias types are mismatched");
1865 "Reference Lstm: input and InputToInputWeights types are mismatched");
1867 reasonIfUnsupported,
1868 "Reference Lstm: input and RecurrentToInputWeights types are mismatched");
1870 "Reference Lstm: input and InputGateBias types are mismatched");
1874 reasonIfUnsupported,
1875 "Reference Lstm: input and CellToInputWeights types are mismatched");
1881 "Reference Lstm: input and CellToForgetWeights types are mismatched");
1883 "Reference Lstm: input and CellToOutputWeights types are mismatched");
1888 "Reference Lstm: input and mProjectionWeights types are mismatched");
1892 "Reference Lstm: input and ProjectionBias types are mismatched");
1900 reasonIfUnsupported,
1901 "Reference Lstm: input and InputLayerNormWeights types are mismatched");
1904 reasonIfUnsupported,
1905 "Reference Lstm: input and ForgetLayerNormWeights types are mismatched");
1907 reasonIfUnsupported,
1908 "Reference Lstm: input and CellLayerNormWeights types are mismatched");
1910 reasonIfUnsupported,
1911 "Reference Lstm: input and OutputLayerNormWeights types are mismatched");
1922 bool supported =
true;
1924 std::array<DataType,7> supportedTypes = {
1935 "Reference maximum: input 0 is not a supported type.");
1938 "Reference maximum: input 1 is not a supported type.");
1941 "Reference maximum: output is not a supported type.");
1944 "Reference maximum: input 0 and Input 1 types are mismatched");
1947 "Reference maximum: input and output types are mismatched");
1950 "Reference maximum: shapes are not suitable for implicit broadcast.");
1960 bool supported =
true;
1961 std::string meanLayerStr =
"Mean";
1962 std::string outputTensorStr =
"output";
1964 std::array<DataType,6> supportedTypes =
1975 "Reference Mean: input type not supported.");
1978 "Reference Mean: input and output types are mismatched");
1983 reasonIfUnsupported,
1986 meanLayerStr, outputTensorStr).data());
1988 else if (descriptor.
m_Axis.empty())
1991 reasonIfUnsupported,
1993 meanLayerStr, outputTensorStr).data());
2002 reasonIfUnsupported,
2004 meanLayerStr, outputTensorStr).data());
2009 reasonIfUnsupported,
2011 meanLayerStr, outputTensorStr).data());
2022 bool supported =
true;
2024 std::array<DataType,7> supportedTypes =
2036 "Reference MemCopy: input type not supported");
2039 "Reference MemCopy: output type not supported");
2042 "Reference MemCopy: input and output types are mismatched");
2052 bool supported =
true;
2054 std::array<DataType,7> supportedTypes = {
2065 "Reference minimum: input 0 is not a supported type.");
2068 "Reference minimum: input 1 is not a supported type.");
2071 "Reference minimum: output is not a supported type.");
2074 "Reference minimum: input 0 and Input 1 types are mismatched");
2077 "Reference minimum: input and output types are mismatched");
2080 "Reference minimum: shapes are not suitable for implicit broadcast.");
2090 bool supported =
true;
2092 std::array<DataType,7> supportedTypes = {
2103 "Reference multiplication: input 0 is not a supported type.");
2106 "Reference multiplication: input 1 is not a supported type.");
2109 "Reference multiplication: output is not a supported type.");
2112 "Reference multiplication: input 0 and Input 1 types are mismatched");
2115 "Reference multiplication: input and output types are mismatched");
2118 "Reference multiplication: shapes are not suitable for implicit broadcast.");
2131 std::array<DataType, 6> supportedTypes =
2141 bool supported =
true;
2144 "Reference normalization: input type not supported.");
2147 "Reference normalization: output type not supported.");
2150 "Reference normalization: input and output shapes have different " 2151 "num total elements.");
2168 bool supported =
true;
2171 std::array<DataType,6> supportedTypes =
2182 "Reference pad: input is not a supported type.");
2185 "Reference pad: output is not a supported type.");
2188 "Reference pad: input and output types are mismatched.");
2199 bool supported =
true;
2202 std::array<DataType, 6> supportedTypes =
2213 "Reference permute: input is not a supported type.");
2216 "Reference permute: output is not a supported type.");
2219 "Reference permute: input and output types are mismatched.");
2230 bool supported =
true;
2233 std::array<DataType,6> supportedTypes =
2244 "Reference poolind2d: input is not a supported type.");
2247 "Reference poolind2d: output is not a supported type.");
2250 "Reference poolind2d: input and output types are mismatched.");
2261 bool supported =
true;
2264 std::array<DataType,6> supportedTypes =
2275 "Reference poolind3d: input is not a supported type.");
2278 "Reference poolind3d: output is not a supported type.");
2281 "Reference poolind3d: input and output types are mismatched.");
2315 bool supported =
true;
2318 std::array<DataType,7> supportedInputTypes = {
2329 "Reference quantize: input type not supported.");
2332 std::array<DataType,4> supportedOutputTypes = {
2339 "Reference quantize: output type not supported.");
2342 "Reference quantize: input and output shapes have different num total elements.");
2353 std::array<DataType,1> supportedOutputTypes =
2359 "Reference rank: input type not supported.");
2368 bool supported =
true;
2369 std::array<DataType,7> supportedTypes =
2381 "Reference Reduce: input type not supported");
2384 "Reference Reduce: output type not supported");
2387 "Reference Reduce: input and output types not matching");
2400 std::array<DataType,8> supportedOutputTypes =
2413 "Reference reshape: input type not supported.");
2422 bool supported =
true;
2423 std::array<DataType,6> supportedTypes =
2434 "Reference Resize: input type not supported");
2437 "Reference Resize: output type not supported");
2440 "Reference Resize: input and output types not matching");
2450 bool supported =
true;
2452 std::array<DataType, 1> supportedTypes =
2458 "Reference Shape: output type not supported");
2469 bool supported =
true;
2471 std::array<DataType, 5> supportedTypes =
2481 "Reference Slice: input type not supported");
2484 "Reference Slice: output type not supported");
2487 "Reference Slice: input and output types are mismatched");
2498 bool supported =
true;
2499 std::array<DataType,7> supportedTypes =
2511 "Reference Softmax: output type not supported");
2514 "Reference Softmax: input type not supported");
2517 "Reference Softmax: input type not supported");
2528 bool supported =
true;
2529 std::array<DataType,6> supportedTypes =
2540 "Reference SpaceToBatchNd: input type not supported");
2543 "Reference SpaceToBatchNd: output type not supported");
2546 "Reference SpaceToBatchNd: input and output types are mismatched");
2558 bool supported =
true;
2560 std::array<DataType,6> supportedTypes =
2571 "Reference SpaceToDepth: input type not supported");
2574 "Reference SpaceToDepth: output type not supported");
2577 "Reference SpaceToDepth: input and output types are mismatched");
2583 const std::vector<std::reference_wrapper<TensorInfo>>&
outputs,
2588 bool supported =
true;
2589 std::array<DataType,6> supportedTypes =
2600 "Reference splitter: output type not supported");
2604 "Reference splitter: input type not supported");
2607 "Reference splitter: input and output types mismatched.");
2620 bool supported =
true;
2621 std::array<DataType,7> supportedTypes =
2633 "Reference stack: output type not supported");
2638 "Reference stack: input type not supported");
2641 "Reference stack: input and output types mismatched.");
2653 bool supported =
true;
2655 std::array<DataType,5> supportedTypes =
2665 "Reference StridedSlice: input type not supported");
2668 "Reference StridedSlice: output type not supported");
2671 "Reference StridedSlice: input and output types are mismatched");
2681 bool supported =
true;
2683 std::array<DataType,7> supportedTypes = {
2694 "Reference subtraction: input 0 is not a supported type.");
2697 "Reference subtraction: input 1 is not a supported type.");
2700 "Reference subtraction: output is not a supported type.");
2703 "Reference subtraction: input 0 and Input 1 types are mismatched");
2706 "Reference subtraction: input and output types are mismatched");
2709 "Reference subtraction: shapes are not suitable for implicit broadcast.");
2719 bool supported =
true;
2721 std::array<DataType, 6> supportedTypes
2732 "PReLU: input is not a supported type.");
2735 "PReLU: alpha is not a supported type.");
2738 "PReLU: output is not a supported type.");
2741 "PReLU: input, alpha and output types are mismatched");
2744 "PReLU: shapes are not suitable for implicit broadcast");
2757 bool supported =
true;
2759 std::array<DataType,7> supportedTypes =
2771 "Reference TransposeConvolution2d: input is not a supported type.");
2774 "Reference TransposeConvolution2d: output is not a supported type.");
2777 "Reference TransposeConvolution2d: input and output types mismatched.");
2783 std::array<DataType, 3> supportedWeightTypes =
2791 "Reference TransposeConvolution2d: weights type not supported for " 2792 "quantized input.");
2797 "Reference TransposeConvolution2d: weights is not a supported type.");
2800 "Reference TransposeConvolution2d: input and weights types mismatched.");
2805 std::array<DataType,4> biasesSupportedTypes =
2813 "Reference TransposeConvolution2d: biases is not a supported type.");
2825 bool supported =
true;
2828 std::array<DataType, 6> supportedTypes =
2839 "Reference transpose: input is not a supported type.");
2842 "Reference transpose: output is not a supported type.");
2845 "Reference transpose: input and output types are mismatched.");
2867 bool supported =
true;
2869 std::array<DataType, 2> supportedTypes =
2875 std::array<DataType, 2> supportedWeightTypes =
2881 std::array<DataType, 3> supportedBiasTypes =
2890 "Reference UnidirectionalSequenceLstm: input is not a supported type.");
2892 "Reference UnidirectionalSequenceLstm: output is not a supported type.");
2896 reasonIfUnsupported,
2897 "Reference UnidirectionalSequenceLstm: InputToForgetWeights " 2898 "is not a supported type.");
2900 reasonIfUnsupported,
2901 "Reference UnidirectionalSequenceLstm: InputToCellWeights is not a supported type.");
2903 reasonIfUnsupported,
2904 "Reference UnidirectionalSequenceLstm: InputToOutputWeights " 2905 "is not a supported type.");
2907 reasonIfUnsupported,
2908 "Reference UnidirectionalSequenceLstm: RecurrentToForgetWeights " 2909 "is not a supported type.");
2911 reasonIfUnsupported,
2912 "Reference UnidirectionalSequenceLstm: RecurrentToCellWeights " 2913 "is not a supported type.");
2915 reasonIfUnsupported,
2916 "Reference UnidirectionalSequenceLstm: RecurrentToOutputWeights " 2917 "is not a supported type.");
2920 "Reference UnidirectionalSequenceLstm: ForgetGateBias is not a supported type.");
2922 "Reference UnidirectionalSequenceLstm: CellBias is not a supported type.");
2924 "Reference UnidirectionalSequenceLstm: OutputGateBias is not a supported type.");
2928 reasonIfUnsupported,
2929 "Reference UnidirectionalSequenceLstm: InputToInputWeights " 2930 "is not a supported type.");
2932 reasonIfUnsupported,
2933 "Reference UnidirectionalSequenceLstm: RecurrentToInputWeights " 2934 "is not a supported type.");
2936 "Reference UnidirectionalSequenceLstm: InputGateBias is not a supported type.");
2940 reasonIfUnsupported,
2941 "Reference UnidirectionalSequenceLstm: CellToInputWeights " 2942 "is not a supported type.");
2948 reasonIfUnsupported,
2949 "Reference UnidirectionalSequenceLstm: CellToForgetWeights " 2950 "is not a supported type.");
2952 reasonIfUnsupported,
2953 "Reference UnidirectionalSequenceLstm: CellToOutputWeights " 2954 "is not a supported type.");
2959 reasonIfUnsupported,
2960 "Reference UnidirectionalSequenceLstm: ProjectionWeights " 2961 "is not a supported type.");
2965 "Reference UnidirectionalSequenceLstm: input and ProjectionBias types " 2974 reasonIfUnsupported,
2975 "Reference UnidirectionalSequenceLstm: InputLayerNormWeights " 2976 "is not a supported type.");
2979 reasonIfUnsupported,
2980 "Reference UnidirectionalSequenceLstm: ForgetLayerNormWeights " 2981 "is not a supported type.");
2983 reasonIfUnsupported,
2984 "Reference UnidirectionalSequenceLstm: CellLayerNormWeights " 2985 "is not a supported type.");
2987 reasonIfUnsupported,
2988 "Reference UnidirectionalSequenceLstm: OutputLayerNormWeights " 2989 "is not a supported type.");
bool m_ProjectionEnabled
Enable/disable the projection layer.
bool IsComparisonSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, const ComparisonDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
UnaryOperation m_Operation
Specifies the elementwiseUnary operation to execute.
bool IsReshapeSupported(const TensorInfo &input, const TensorInfo &output, const ReshapeDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A ViewsDescriptor for the SplitterLayer.
const TensorInfo const TensorInfo & anchors
bool IsSoftmaxSupported(const TensorInfo &input, const TensorInfo &output, const SoftmaxDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A TransposeConvolution2dDescriptor for the TransposeConvolution2dLayer.
const TensorInfo const TensorInfo const TensorInfo const TensorInfo const TensorInfo const TensorInfo const LstmDescriptor const LstmInputParamsInfo & paramsInfo
bool IsPermuteSupported(const TensorInfo &input, const TensorInfo &output, const PermuteDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsPadSupported(const TensorInfo &input, const TensorInfo &output, const PadDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
const TensorInfo & output
bool IsLogSoftmaxSupported(const TensorInfo &input, const TensorInfo &output, const LogSoftmaxDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported) const override
A ReshapeDescriptor for the ReshapeLayer.
bool IsMemImportSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsGatherSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, const GatherDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
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 override
bool IsConvertFp32ToFp16Supported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A ComparisonDescriptor for the ComparisonLayer.
bool IsDilatedDepthwiseConvolutionSupported(const TensorInfo &input, const TensorInfo &output, const DepthwiseConvolution2dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
const TensorInfo const TensorInfo const TensorInfo const TensorInfo const TensorInfo & gamma
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 override
const std::vector< std::reference_wrapper< TensorInfo > > & outputs
bool IsSliceSupported(const TensorInfo &input, const TensorInfo &output, const SliceDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsStackSupported(const std::vector< const TensorInfo *> &inputs, const TensorInfo &output, const StackDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A Convolution2dDescriptor for the Convolution2dLayer.
bool IsPreluSupported(const TensorInfo &input, const TensorInfo &alpha, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsConvertBf16ToFp32Supported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsSplitterSupported(const TensorInfo &input, const std::vector< std::reference_wrapper< TensorInfo >> &outputs, const ViewsDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
const TensorInfo const ActivationDescriptor Optional< std::string & > reasonIfUnsupported
bool IsLogicalBinarySupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, const LogicalBinaryDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported) const override
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 override
bool IsL2NormalizationSupported(const TensorInfo &input, const TensorInfo &output, const L2NormalizationDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsConvolution3dSupported(const TensorInfo &input, const TensorInfo &output, const Convolution3dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A LogicalBinaryDescriptor for the LogicalBinaryLayer.
const TensorInfo & scores
bool IsBatchMatMulSupported(const TensorInfo &inputX, const TensorInfo &inputY, const TensorInfo &output, const BatchMatMulDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const
bool IsDepthToSpaceSupported(const TensorInfo &input, const TensorInfo &output, const DepthToSpaceDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
const TensorInfo const TensorInfo const TensorInfo const TensorInfo & detectionClasses
bool IsGatherNdSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, 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 override
Copyright (c) 2021 ARM Limited and Contributors.
void IgnoreUnused(Ts &&...)
const TensorInfo const ActivationDescriptor & descriptor
A SpaceToDepthDescriptor for the SpaceToDepthLayer.
bool IsDepthwiseConvolutionSupported(const TensorInfo &input, const TensorInfo &output, const DepthwiseConvolution2dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsFakeQuantizationSupported(const TensorInfo &input, const FakeQuantizationDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsBatchToSpaceNdSupported(const TensorInfo &input, const TensorInfo &output, const BatchToSpaceNdDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsConcatSupported(const std::vector< const TensorInfo *> inputs, const TensorInfo &output, const OriginsDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A BatchToSpaceNdDescriptor for the BatchToSpaceNdLayer.
const TensorInfo & outputStateIn
const TensorInfo const TensorInfo & previousCellStateIn
const TensorInfo const TensorInfo const TensorInfo const TensorInfo const TensorInfo const TensorInfo & numDetections
bool IsTransposeConvolution2dSupported(const TensorInfo &input, const TensorInfo &output, const TransposeConvolution2dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A ResizeBilinearDescriptor for the ResizeBilinearLayer.
Base class for all descriptors.
std::vector< unsigned int > m_Axis
Values for the dimensions to reduce.
A StackDescriptor for the StackLayer.
constexpr bool IsQuantized8BitType(DataType dataType)
bool IsOutputSupported(const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsFullyConnectedSupported(const TensorInfo &input, const TensorInfo &output, const TensorInfo &weights, const TensorInfo &biases, const FullyConnectedDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsQuantizeSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsResizeSupported(const TensorInfo &input, const TensorInfo &output, const ResizeDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A PadDescriptor for the PadLayer.
bool IsConstantSupported(const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsArgMinMaxSupported(const TensorInfo &input, const TensorInfo &output, const ArgMinMaxDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
const TensorInfo const TensorInfo & cellStateIn
bool IsSpaceToBatchNdSupported(const TensorInfo &input, const TensorInfo &output, const SpaceToBatchNdDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
An LstmDescriptor for the LstmLayer.
bool IsPooling3dSupported(const TensorInfo &input, const TensorInfo &output, const Pooling3dDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool m_KeepDims
Enable/disable keep dimensions. If true, then the reduced dimensions that are of length 1 are kept...
bool IsMinimumSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A L2NormalizationDescriptor for the L2NormalizationLayer.
An ArgMinMaxDescriptor for ArgMinMaxLayer.
DataType GetDataType() const
An OriginsDescriptor for the ConcatLayer.
A ReduceDescriptor for the REDUCE operators.
bool has_value() const noexcept
A FullyConnectedDescriptor for the FullyConnectedLayer.
bool IsRankSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool m_BiasEnabled
Enable/disable bias.
const TensorInfo const TensorInfo const TensorInfo const TensorInfo & outputStateOut
A FakeQuantizationDescriptor for the FakeQuantizationLayer.
const TensorInfo const TensorInfo const TensorInfo const TensorInfo const TensorInfo & cellStateOut
bool IsConvertFp16ToFp32Supported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A GatherDescriptor for the GatherLayer.
bool m_PeepholeEnabled
Enable/disable peephole.
const TensorInfo const TensorInfo const TensorInfo const TensorInfo & beta
#define ARMNN_ASSERT(COND)
bool IsMeanSupported(const TensorInfo &input, const TensorInfo &output, const MeanDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A QLstmDescriptor for the QLstmLayer.
bool IsSpaceToDepthSupported(const TensorInfo &input, const TensorInfo &output, const SpaceToDepthDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsMergeSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsAdditionSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsStridedSliceSupported(const TensorInfo &input, const TensorInfo &output, const StridedSliceDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsSubtractionSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
An ActivationDescriptor for the ActivationLayer.
bool IsConvertFp32ToBf16Supported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsFloorSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsActivationSupported(const TensorInfo &input, const TensorInfo &output, const ActivationDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
min(a, max(b, input)) ReLu1 & ReLu6.
bool IsDebugSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A SliceDescriptor for the SliceLayer.
A Convolution3dDescriptor for the Convolution3dLayer.
const TensorInfo & previousOutputIn
A BatchMatMulDescriptor for the BatchMatMul operator.
A Pooling3dDescriptor for the Pooling3dLayer.
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 override
A SpaceToBatchNdDescriptor for the SpaceToBatchNdLayer.
bool m_CifgEnabled
Enable/disable cifg (coupled input & forget gate).
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
const TensorInfo const TensorInfo const TensorInfo const TensorInfo const TensorInfo & detectionScores
EmptyOptional is used to initialize the Optional class in case we want to have default value for an O...
int32_t m_Axis
The axis in params to gather indices from.
A ElementwiseUnaryDescriptor for the ElementwiseUnaryLayer.
bool IsElementwiseUnarySupported(const TensorInfo &input, const TensorInfo &output, const ElementwiseUnaryDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsMultiplicationSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsNormalizationSupported(const TensorInfo &input, const TensorInfo &output, const NormalizationDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsDequantizeSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
const TensorInfo const Convolution2dDescriptor const TensorInfo const Optional< TensorInfo > & biases
A MeanDescriptor for the MeanLayer.
const TensorInfo const TensorInfo const TensorInfo & detectionBoxes
bool IsMemCopySupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool m_LayerNormEnabled
Enable/disable layer normalization.
std::enable_if_t< std::is_unsigned< Source >::value &&std::is_unsigned< Dest >::value, Dest > numeric_cast(Source source)
A TransposeDescriptor for the TransposeLayer.
A StridedSliceDescriptor for the StridedSliceLayer.
bool IsInputSupported(const TensorInfo &input, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsChannelShuffleSupported(const TensorInfo &input, const TensorInfo &output, const ChannelShuffleDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsDivisionSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
const TensorInfo & input1
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 override
bool IsFillSupported(const TensorInfo &input, const TensorInfo &output, const FillDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsShapeSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A Pooling2dDescriptor for the Pooling2dLayer.
A NormalizationDescriptor for the NormalizationLayer.
bool IsTransposeSupported(const TensorInfo &input, const TensorInfo &output, const TransposeDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsCastSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
const TensorInfo const TensorInfo const TensorInfo & scratchBuffer
An InstanceNormalizationDescriptor for InstanceNormalizationLayer.
A ChannelShuffleDescriptor for the ChannelShuffle operator.
bool IsConvolution2dSupported(const TensorInfo &input, const TensorInfo &output, const Convolution2dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsInstanceNormalizationSupported(const TensorInfo &input, const TensorInfo &output, const InstanceNormalizationDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
unsigned int GetNumDimensions() const
bool IsSupportedForDataTypeGeneric(Optional< std::string &> reasonIfUnsupported, DataType dataType, Float16Func float16FuncPtr, Float32Func float32FuncPtr, Uint8Func uint8FuncPtr, Int32Func int32FuncPtr, BooleanFunc booleanFuncPtr, Params &&... params)
A SoftmaxDescriptor for the SoftmaxLayer.
bool CheckSupportRule(F rule, Optional< std::string &> reasonIfUnsupported, const char *reason)
const TensorInfo const Convolution2dDescriptor const TensorInfo & weights
ActivationFunction m_Function
The activation function to use (Sigmoid, TanH, Linear, ReLu, BoundedReLu, SoftReLu, LeakyReLu, Abs, Sqrt, Square, Elu).
bool IsMaximumSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A DepthwiseConvolution2dDescriptor for the DepthwiseConvolution2dLayer.
A FillDescriptor for the FillLayer.
bool IsPooling2dSupported(const TensorInfo &input, const TensorInfo &output, const Pooling2dDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A BatchNormalizationDescriptor for the BatchNormalizationLayer.
bool IsReduceSupported(const TensorInfo &input, const TensorInfo &output, const ReduceDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
const TensorInfo const TensorInfo & mean
A PermuteDescriptor for the PermuteLayer.
LayerType
When adding a new layer, adapt also the LastLayer enum value in the enum class LayerType below...