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)),
89 *(PolymorphicDowncast<const BatchNormalizationDescriptor*>
95 *(PolymorphicDowncast<const BatchToSpaceNdDescriptor*>(&descriptor)),
101 *(PolymorphicDowncast<const ComparisonDescriptor*>(&descriptor)),
102 reasonIfUnsupported);
105 std::vector<const TensorInfo*> inputInfos;
106 for (uint32_t i = 0; i < (infos.size() - 1); i++)
108 inputInfos.push_back(&infos[i]);
111 infos[infos.size() - 1],
112 *(PolymorphicDowncast<const OriginsDescriptor*>(&
descriptor)),
127 if (infos.size() != 4)
130 "TensorInfos should be of format: {input, output, weights, biases}.");
133 auto desc = *(PolymorphicDowncast<const Convolution2dDescriptor*>(&
descriptor));
141 reasonIfUnsupported);
150 reasonIfUnsupported);
156 *(PolymorphicDowncast<const DepthToSpaceDescriptor*>(&descriptor)),
157 reasonIfUnsupported);
160 if (infos.size() != 4)
163 "TensorInfos should be of format: {input, output, weights, biases}.");
166 auto desc = *(PolymorphicDowncast<const DepthwiseConvolution2dDescriptor*>(&
descriptor));
174 reasonIfUnsupported);
183 reasonIfUnsupported);
193 *(PolymorphicDowncast<const ElementwiseUnaryDescriptor*>(&descriptor)),
194 reasonIfUnsupported);
198 *(PolymorphicDowncast<const FillDescriptor*>(&descriptor)),
199 reasonIfUnsupported);
207 *(PolymorphicDowncast<const FullyConnectedDescriptor*>(&descriptor)),
208 reasonIfUnsupported);
213 *(PolymorphicDowncast<const GatherDescriptor*>(&descriptor)),
214 reasonIfUnsupported);
220 *(PolymorphicDowncast<const InstanceNormalizationDescriptor*>
222 reasonIfUnsupported);
226 *(PolymorphicDowncast<const L2NormalizationDescriptor*>(&descriptor)),
227 reasonIfUnsupported);
232 *(PolymorphicDowncast<const LogicalBinaryDescriptor*>(&descriptor)),
233 reasonIfUnsupported);
237 *(PolymorphicDowncast<const LogSoftmaxDescriptor*>(&descriptor)),
238 reasonIfUnsupported);
247 *(PolymorphicDowncast<const LstmDescriptor*>(&descriptor)),
248 lstmParamsInfo.
value(),
257 *(PolymorphicDowncast<const QLstmDescriptor*>(&descriptor)),
258 lstmParamsInfo.
value(),
265 *(PolymorphicDowncast<const MeanDescriptor*>(&descriptor)),
266 reasonIfUnsupported);
274 *(PolymorphicDowncast<const NormalizationDescriptor*>(&descriptor)),
275 reasonIfUnsupported);
281 *(PolymorphicDowncast<const PadDescriptor*>(&descriptor)),
282 reasonIfUnsupported);
286 *(PolymorphicDowncast<const PermuteDescriptor*>(&descriptor)),
287 reasonIfUnsupported);
291 *(PolymorphicDowncast<const Pooling2dDescriptor*>(&descriptor)),
292 reasonIfUnsupported);
300 *(PolymorphicDowncast<const ReshapeDescriptor*>(&descriptor)),
301 reasonIfUnsupported);
305 *(PolymorphicDowncast<const ResizeDescriptor*>(&descriptor)),
306 reasonIfUnsupported);
310 *(PolymorphicDowncast<const ReduceDescriptor*>(&descriptor)),
311 reasonIfUnsupported);
315 *(PolymorphicDowncast<const SliceDescriptor*>(&descriptor)),
316 reasonIfUnsupported);
320 *(PolymorphicDowncast<const SoftmaxDescriptor*>(&descriptor)),
321 reasonIfUnsupported);
325 *(PolymorphicDowncast<const SpaceToBatchNdDescriptor*>(&descriptor)),
326 reasonIfUnsupported);
330 *(PolymorphicDowncast<const SpaceToDepthDescriptor*>(&descriptor)),
331 reasonIfUnsupported);
334 std::vector<TensorInfo> outputInfos;
335 for (uint32_t i = 1; i < infos.size(); i++)
337 outputInfos.push_back(infos[i]);
340 {outputInfos.begin(), outputInfos.end()},
341 *(PolymorphicDowncast<const ViewsDescriptor*>(&
descriptor)),
346 std::vector<const TensorInfo*> inputInfos;
347 for (uint32_t i = 0; i < infos.size() - 1; i++)
349 inputInfos.push_back(&infos[i]);
352 infos[infos.size() - 1],
353 *(PolymorphicDowncast<const StackDescriptor*>(&
descriptor)),
359 *(PolymorphicDowncast<const StridedSliceDescriptor*>(&descriptor)),
360 reasonIfUnsupported);
366 *(PolymorphicDowncast<const TransposeDescriptor*>(&descriptor)),
367 reasonIfUnsupported);
370 if (infos.size() != 4)
373 "TensorInfos should be of format: {input, output, weights, biases}.");
376 auto desc = *(PolymorphicDowncast<const TransposeConvolution2dDescriptor*>(&
descriptor));
384 reasonIfUnsupported);
393 reasonIfUnsupported);
401 *(PolymorphicDowncast<const ChannelShuffleDescriptor*>(&descriptor)),
402 reasonIfUnsupported);
405 if (infos.size() != 4)
408 "TensorInfos should be of format: {input, output, weights, biases}.");
411 auto desc = *(PolymorphicDowncast<const Convolution3dDescriptor*>(&
descriptor));
419 reasonIfUnsupported);
428 reasonIfUnsupported);
441 *(PolymorphicDowncast<const DetectionPostProcessDescriptor*>
443 reasonIfUnsupported);
446 *(PolymorphicDowncast<const FakeQuantizationDescriptor*>(&descriptor)),
447 reasonIfUnsupported);
456 if (infos.size() != 6)
459 "should be of format: {input, outputStateIn, cellStateIn, " 460 "hiddenStateOutputVal, cellStateOutputVal, output}");
462 auto desc = *(PolymorphicDowncast<const UnidirectionalSequenceLstmDescriptor*>(&
descriptor));
464 bool isHiddenStateOutputOptional = (infos[4] ==
TensorInfo());
465 bool isCellStateOutput = (infos[5] ==
TensorInfo());
466 if (isHiddenStateOutputOptional && isCellStateOutput)
475 lstmParamsInfo.
value(),
478 else if (isHiddenStateOutputOptional)
487 lstmParamsInfo.
value(),
490 else if (isCellStateOutput)
499 lstmParamsInfo.
value(),
511 lstmParamsInfo.
value(),
518 *(PolymorphicDowncast<const Pooling3dDescriptor*>(&descriptor)),
519 reasonIfUnsupported);
534 quantizedLstmInputParamsInfo.
value(),
548 bool supported =
true;
551 std::array<DataType,6> supportedTypes = {
561 "Reference activation: input type not supported.");
564 "Reference activation: output type not supported.");
567 "Reference activation: input and output types mismatched.");
570 "Reference activation: input and output shapes are of different rank.");
573 struct ActivationFunctionSupported :
public Rule 605 supported &=
CheckSupportRule(ActivationFunctionSupported(descriptor), reasonIfUnsupported,
606 "Reference activation: function not supported.");
616 bool supported =
true;
618 std::array<DataType,7> supportedTypes = {
629 "Reference addition: input 0 is not a supported type.");
632 "Reference addition: input 1 is not a supported type.");
635 "Reference addition: output is not a supported type.");
638 "Reference addition: input 0 and Input 1 types are mismatched");
641 "Reference addition: input and output types are mismatched");
644 "Reference addition: shapes are not suitable for implicit broadcast.");
655 std::array<DataType, 8> supportedInputTypes =
667 std::array<DataType,2> supportedOutputTypes = {
672 bool supported =
true;
675 "Reference ArgMinMax: input is not a supported type.");
677 "Reference ArgMinMax: output type not supported");
693 std::array<DataType, 6> supportedTypes =
703 bool supported =
true;
706 "Reference batch normalization: input is not a supported type.");
709 "Reference batch normalization: output is not a supported type.");
712 "Reference batch normalization: input and output types are mismatched");
715 "Reference batch normalization: mean is not a supported type.");
718 "Reference batch normalization: variance is not a supported type.");
721 "Reference batch normalization: beta is not a supported type.");
724 "Reference batch normalization: gamma is not a supported type.");
736 bool supported =
true;
738 std::string batchToSpaceNdLayerStr =
"batchToSpaceNd";
739 std::string inputTensorStr =
"input";
740 std::string outputTensorStr =
"output";
743 std::array<DataType,6> supportedTypes =
754 "Reference BatchToSpaceNd: input type not supported.");
757 "Reference BatchToSpaceNd: output type not supported.");
760 "Reference BatchToSpaceNd: input and output types mismatched.");
764 CreateIncorrectDimensionsErrorMsg(4,
766 batchToSpaceNdLayerStr,
767 outputTensorStr).data());
771 CreateIncorrectDimensionsErrorMsg(4,
773 batchToSpaceNdLayerStr,
774 inputTensorStr).data());
783 std::array<DataType, 9> supportedInputTypes =
795 bool supported =
true;
797 "Reference cast: input is not a supported type");
801 "Reference cast: output is not a supported type");
804 "Reference cast: input and output shapes have different number of total elements");
815 bool supported =
true;
818 std::array<DataType, 7> supportedTypes =
830 "Reference ChannelShuffle: input is not a supported type.");
833 "Reference ChannelShuffle: output is not a supported type.");
836 "Reference ChannelShuffle: input and output types are mismatched.");
849 std::array<DataType, 8> supportedInputTypes =
861 bool supported =
true;
863 "Reference comparison: input 0 is not a supported type");
866 "Reference comparison: input 0 and Input 1 types are mismatched");
869 "Reference comparison: output is not of type Boolean");
881 bool supported =
true;
882 std::array<DataType,6> supportedTypes =
893 "Reference concatenation: output type not supported");
898 "Reference concatenation: input type not supported");
901 "Reference concatenation: input and output types mismatched.");
910 std::array<DataType,8> supportedTypes =
923 "Reference constant: output is not a supported type.");
930 bool supported =
true;
933 "Reference for ConvertBf16ToFp32 layer: input type not supported");
936 "Reference for ConvertBf16ToFp32 layer: output type not supported");
948 &FalseInputFuncF32<>,
954 &FalseOutputFuncF16<>,
965 bool supported =
true;
968 "Reference for ConvertFp32ToBf16 layer: input type not supported");
971 "Reference for ConvertFp32ToBf16 layer: output type not supported");
982 &FalseInputFuncF16<>,
990 &FalseOutputFuncF32<>,
1003 bool supported =
true;
1006 std::array<DataType,7> supportedTypes =
1018 "Reference Convolution2d: input is not a supported type.");
1021 "Reference Convolution2d: output is not a supported type.");
1028 reasonIfUnsupported.
value() +=
"Output tensor type must be BFloat16 or Float32 for BFloat16 input.\n";
1035 "Reference Convolution2d: input and output types mismatched.");
1041 std::array<DataType, 3> supportedWeightTypes =
1049 "Reference Convolution2d: weights type not supported for quantized input.");
1054 "Reference Convolution2d: weights is not a supported type.");
1057 "Reference Convolution2d: input and weights types mismatched.");
1062 std::array<DataType,4> biasesSupportedTypes =
1071 "Reference Convolution2d: biases is not a supported type.");
1085 bool supported =
true;
1088 std::array<DataType,7> supportedTypes =
1100 "Reference Convolution3d: input is not a supported type.");
1103 "Reference Convolution3d: output is not a supported type.");
1106 "Reference Convolution3d: input and output types mismatched.");
1111 std::array<DataType, 3> supportedWeightTypes =
1119 "Reference Convolution3d: weights type not supported for quantized input.");
1124 "Reference Convolution3d: weights is not a supported type.");
1127 "Reference Convolution3d: input and weights types mismatched.");
1132 std::array<DataType,4> biasesSupportedTypes =
1141 "Reference Convolution3d: biases is not a supported type.");
1152 bool supported =
true;
1154 std::array<DataType, 8> supportedTypes =
1167 "Reference for Debug layer: input type not supported");
1170 "Reference for Debug layer: output type not supported");
1173 "Reference for Debug layer: input and output types are mismatched");
1184 bool supported =
true;
1186 std::array<DataType,6> supportedTypes =
1197 "Reference DepthToSpace: input type not supported");
1200 "Reference DepthToSpace: output type not supported");
1203 "Reference DepthToSpace: input and output types are mismatched");
1216 bool supported =
true;
1219 std::array<DataType,7> supportedTypes =
1231 "Reference DepthwiseConvolution2d: input is not a supported type.");
1234 "Reference DepthwiseConvolution2d: output is not a supported type.");
1237 "Reference DepthwiseConvolution2d: input and output types mismatched.");
1242 std::array<DataType, 3> supportedWeightTypes =
1250 "Reference DepthwiseConvolution2d: weights type not supported for " 1251 "quantized input.");
1256 "Reference DepthwiseConvolution2d: weights is not a supported type.");
1259 "Reference DepthwiseConvolution2d: input and weights types mismatched.");
1264 std::array<DataType,4> biasesSupportedTypes =
1272 "Reference DepthwiseConvolution2d: biases is not a supported type.");
1283 bool supported =
true;
1285 std::array<DataType,4> supportedInputTypes = {
1293 "Reference for Dequantize layer: input type not supported.");
1296 "Reference for Dequantize layer: per-axis quantized input not supported.");
1298 std::array<DataType,3> supportedOutputTypes = {
1305 "Reference for Dequantize layer: output type not supported.");
1308 "Reference for Dequantize layer: input/output shapes have different num total " 1324 IgnoreUnused(anchors, detectionBoxes, detectionClasses, detectionScores, numDetections, descriptor);
1326 bool supported =
true;
1328 std::array<DataType,6> supportedInputTypes =
1339 "Reference DetectionPostProcess: input 0 is not a supported type.");
1342 "Reference DetectionPostProcess: input 1 is not a supported type.");
1362 bool supported =
true;
1364 std::array<DataType,7> supportedTypes = {
1375 "Reference division: input 0 is not a supported type.");
1378 "Reference division: input 1 is not a supported type.");
1381 "Reference division: output is not a supported type.");
1384 "Reference division: input 0 and Input 1 types are mismatched");
1387 "Reference division: input and output types are mismatched");
1390 "Reference division: shapes are not suitable for implicit broadcast.");
1402 std::array<DataType, 7> supportedTypes =
1413 std::array<DataType, 1> logicalSupportedTypes =
1418 bool supported =
true;
1423 "Reference elementwise unary: input type not supported");
1426 "Reference elementwise unary: output type not supported");
1431 "Reference elementwise unary: input type not supported");
1434 "Reference elementwise unary: output type not supported");
1438 "Reference elementwise unary: input and output types not matching");
1441 "Reference elementwise unary: input and output shapes" 1442 "have different number of total elements");
1452 bool supported =
true;
1454 std::array<DataType,1> supportedTypes =
1460 "Reference fake quantization: input type not supported.");
1473 bool supported =
true;
1475 std::array<DataType,3> supportedTypes =
1483 "Reference Fill: input type not supported.");
1486 "Reference Fill: output type not supported.");
1495 bool supported =
true;
1497 std::array<DataType,3> supportedTypes =
1505 "Reference Floor: input type not supported.");
1508 "Reference Floor: output type not supported.");
1520 bool supported =
true;
1523 std::array<DataType,6> supportedTypes =
1534 "Reference Fully Connected: input type not supported.");
1537 "Reference Fully Connected: output type not supported.");
1540 "Reference Fully Connected: weights type not supported.");
1547 reasonIfUnsupported.
value() +=
"Output tensor type must be BFloat16 or Float32 for BFloat16 input.\n";
1554 "Reference Fully Connected: input and output types mismatched.");
1558 "Reference Fully Connected: weights is not a supported type.");
1561 "Reference Fully Connected: input and weights types mismatched.");
1566 std::array<DataType, 5>
1567 supportedBiasTypes =
1577 "Reference Fully Connected: bias type not supported.");
1580 "Reference Fully Connected: bias and weight types mismatch.");
1583 "Reference Fully Connected: bias type inferred from weights is incompatible.");
1586 "Reference Fully Connected: bias must have 1 dimension.");
1599 bool supported =
true;
1600 std::array<DataType,7> supportedTypes =
1611 if (descriptor.
m_Axis != 0)
1613 reasonIfUnsupported.
value() += std::string(
"Reference Gather: axis not supported\n");
1617 "Reference Gather: input type not supported");
1620 "Reference Gather: output type not supported");
1623 "Reference Gather: indices (input1) type not supported");
1626 "Reference Gather: input and output types not matching");
1644 std::array<DataType, 3> supportedTypes =
1651 bool supported =
true;
1654 "Reference Instance Normalization: input type not supported.");
1657 "Reference Instance Normalization: output type not supported.");
1660 "Reference Instance Normalization: input and output types mismatched.");
1663 "Reference Instance Normalization: input and output shapes have different " 1664 "num total elements.");
1676 std::array<DataType, 6> supportedTypes =
1686 bool supported =
true;
1689 "Reference L2normalization: input type not supported.");
1692 "Reference L2normalization: output type not supported.");
1695 "Reference L2normalization: input and output types mismatched.");
1698 "Reference L2normalization: input and output shapes have different " 1699 "num total elements.");
1712 std::array<DataType, 1> supportedTypes =
1717 bool supported =
true;
1719 "Reference LogicalBinary: input 0 type not supported");
1721 "Reference LogicalBinary: input 1 type not supported");
1724 "Reference LogicalBinary: input and output types do not match");
1736 std::array<DataType, 3> supportedTypes =
1743 bool supported =
true;
1745 "Reference LogSoftmax: input type not supported");
1748 "Reference LogSoftmax: output type not supported");
1751 "Reference LogSoftmax: input and output types do not match");
1770 bool supported =
true;
1772 std::array<DataType,3> supportedTypes = {
1780 "Reference Lstm: input is not a supported type.");
1782 "Reference Lstm: input and outputStateIn types are mismatched");
1784 "Reference Lstm: input and cellStateIn types are mismatched");
1786 "Reference Lstm: input and scratchBuffer types are mismatched");
1788 "Reference Lstm: input and outputStateOut types are mismatched");
1790 "Reference Lstm: input and cellStateOut types are mismatched");
1793 "Reference Lstm: input and output types are mismatched");
1796 "Reference Lstm: input and InputToForgetWeights types are mismatched");
1798 "Reference Lstm: input and InputToCellWeights types are mismatched");
1800 "Reference Lstm: input and InputToOutputWeights types are mismatched");
1802 "Reference Lstm: input and RecurrentToForgetWeights types are mismatched");
1804 "Reference Lstm: input and RecurrentToCellWeights types are mismatched");
1806 "Reference Lstm: input and RecurrentToOutputWeights types are mismatched");
1808 "Reference Lstm: input and ForgetGateBias types are mismatched");
1810 "Reference Lstm: input and CellBias types are mismatched");
1812 "Reference Lstm: input and OutputGateBias types are mismatched");
1816 "Reference Lstm: input and InputToInputWeights types are mismatched");
1818 reasonIfUnsupported,
1819 "Reference Lstm: input and RecurrentToInputWeights types are mismatched");
1821 "Reference Lstm: input and InputGateBias types are mismatched");
1825 reasonIfUnsupported,
1826 "Reference Lstm: input and CellToInputWeights types are mismatched");
1832 "Reference Lstm: input and CellToForgetWeights types are mismatched");
1834 "Reference Lstm: input and CellToOutputWeights types are mismatched");
1839 "Reference Lstm: input and mProjectionWeights types are mismatched");
1843 "Reference Lstm: input and ProjectionBias types are mismatched");
1851 reasonIfUnsupported,
1852 "Reference Lstm: input and InputLayerNormWeights types are mismatched");
1855 reasonIfUnsupported,
1856 "Reference Lstm: input and ForgetLayerNormWeights types are mismatched");
1858 reasonIfUnsupported,
1859 "Reference Lstm: input and CellLayerNormWeights types are mismatched");
1861 reasonIfUnsupported,
1862 "Reference Lstm: input and OutputLayerNormWeights types are mismatched");
1873 bool supported =
true;
1875 std::array<DataType,7> supportedTypes = {
1886 "Reference maximum: input 0 is not a supported type.");
1889 "Reference maximum: input 1 is not a supported type.");
1892 "Reference maximum: output is not a supported type.");
1895 "Reference maximum: input 0 and Input 1 types are mismatched");
1898 "Reference maximum: input and output types are mismatched");
1901 "Reference maximum: shapes are not suitable for implicit broadcast.");
1911 bool supported =
true;
1912 std::string meanLayerStr =
"Mean";
1913 std::string outputTensorStr =
"output";
1915 std::array<DataType,6> supportedTypes =
1926 "Reference Mean: input type not supported.");
1929 "Reference Mean: input and output types are mismatched");
1934 reasonIfUnsupported,
1937 meanLayerStr, outputTensorStr).data());
1939 else if (descriptor.
m_Axis.empty())
1942 reasonIfUnsupported,
1944 meanLayerStr, outputTensorStr).data());
1953 reasonIfUnsupported,
1955 meanLayerStr, outputTensorStr).data());
1960 reasonIfUnsupported,
1962 meanLayerStr, outputTensorStr).data());
1973 bool supported =
true;
1975 std::array<DataType,7> supportedTypes =
1987 "Reference MemCopy: input type not supported");
1990 "Reference MemCopy: output type not supported");
1993 "Reference MemCopy: input and output types are mismatched");
2003 bool supported =
true;
2005 std::array<DataType,7> supportedTypes = {
2016 "Reference minimum: input 0 is not a supported type.");
2019 "Reference minimum: input 1 is not a supported type.");
2022 "Reference minimum: output is not a supported type.");
2025 "Reference minimum: input 0 and Input 1 types are mismatched");
2028 "Reference minimum: input and output types are mismatched");
2031 "Reference minimum: shapes are not suitable for implicit broadcast.");
2041 bool supported =
true;
2043 std::array<DataType,7> supportedTypes = {
2054 "Reference multiplication: input 0 is not a supported type.");
2057 "Reference multiplication: input 1 is not a supported type.");
2060 "Reference multiplication: output is not a supported type.");
2063 "Reference multiplication: input 0 and Input 1 types are mismatched");
2066 "Reference multiplication: input and output types are mismatched");
2069 "Reference multiplication: shapes are not suitable for implicit broadcast.");
2082 std::array<DataType, 6> supportedTypes =
2092 bool supported =
true;
2095 "Reference normalization: input type not supported.");
2098 "Reference normalization: output type not supported.");
2101 "Reference normalization: input and output shapes have different " 2102 "num total elements.");
2119 bool supported =
true;
2122 std::array<DataType,6> supportedTypes =
2133 "Reference pad: input is not a supported type.");
2136 "Reference pad: output is not a supported type.");
2139 "Reference pad: input and output types are mismatched.");
2150 bool supported =
true;
2153 std::array<DataType, 6> supportedTypes =
2164 "Reference permute: input is not a supported type.");
2167 "Reference permute: output is not a supported type.");
2170 "Reference permute: input and output types are mismatched.");
2181 bool supported =
true;
2184 std::array<DataType,6> supportedTypes =
2195 "Reference poolind2d: input is not a supported type.");
2198 "Reference poolind2d: output is not a supported type.");
2201 "Reference poolind2d: input and output types are mismatched.");
2212 bool supported =
true;
2215 std::array<DataType,6> supportedTypes =
2226 "Reference poolind3d: input is not a supported type.");
2229 "Reference poolind3d: output is not a supported type.");
2232 "Reference poolind3d: input and output types are mismatched.");
2266 bool supported =
true;
2269 std::array<DataType,7> supportedInputTypes = {
2280 "Reference quantize: input type not supported.");
2283 std::array<DataType,4> supportedOutputTypes = {
2290 "Reference quantize: output type not supported.");
2293 "Reference quantize: input and output shapes have different num total elements.");
2304 std::array<DataType,1> supportedOutputTypes =
2310 "Reference rank: input type not supported.");
2319 bool supported =
true;
2320 std::array<DataType,7> supportedTypes =
2332 "Reference Reduce: input type not supported");
2335 "Reference Reduce: output type not supported");
2338 "Reference Reduce: input and output types not matching");
2351 std::array<DataType,8> supportedOutputTypes =
2364 "Reference reshape: input type not supported.");
2373 bool supported =
true;
2374 std::array<DataType,6> supportedTypes =
2385 "Reference Resize: input type not supported");
2388 "Reference Resize: output type not supported");
2391 "Reference Resize: input and output types not matching");
2401 bool supported =
true;
2403 std::array<DataType, 1> supportedTypes =
2409 "Reference Shape: output type not supported");
2420 bool supported =
true;
2422 std::array<DataType, 5> supportedTypes =
2432 "Reference Slice: input type not supported");
2435 "Reference Slice: output type not supported");
2438 "Reference Slice: input and output types are mismatched");
2449 bool supported =
true;
2450 std::array<DataType,7> supportedTypes =
2462 "Reference Softmax: output type not supported");
2465 "Reference Softmax: input type not supported");
2468 "Reference Softmax: input type not supported");
2479 bool supported =
true;
2480 std::array<DataType,6> supportedTypes =
2491 "Reference SpaceToBatchNd: input type not supported");
2494 "Reference SpaceToBatchNd: output type not supported");
2497 "Reference SpaceToBatchNd: input and output types are mismatched");
2509 bool supported =
true;
2511 std::array<DataType,6> supportedTypes =
2522 "Reference SpaceToDepth: input type not supported");
2525 "Reference SpaceToDepth: output type not supported");
2528 "Reference SpaceToDepth: input and output types are mismatched");
2534 const std::vector<std::reference_wrapper<TensorInfo>>&
outputs,
2539 bool supported =
true;
2540 std::array<DataType,6> supportedTypes =
2551 "Reference splitter: output type not supported");
2555 "Reference splitter: input type not supported");
2558 "Reference splitter: input and output types mismatched.");
2571 bool supported =
true;
2572 std::array<DataType,7> supportedTypes =
2584 "Reference stack: output type not supported");
2589 "Reference stack: input type not supported");
2592 "Reference stack: input and output types mismatched.");
2604 bool supported =
true;
2606 std::array<DataType,5> supportedTypes =
2616 "Reference StridedSlice: input type not supported");
2619 "Reference StridedSlice: output type not supported");
2622 "Reference StridedSlice: input and output types are mismatched");
2632 bool supported =
true;
2634 std::array<DataType,7> supportedTypes = {
2645 "Reference subtraction: input 0 is not a supported type.");
2648 "Reference subtraction: input 1 is not a supported type.");
2651 "Reference subtraction: output is not a supported type.");
2654 "Reference subtraction: input 0 and Input 1 types are mismatched");
2657 "Reference subtraction: input and output types are mismatched");
2660 "Reference subtraction: shapes are not suitable for implicit broadcast.");
2670 bool supported =
true;
2672 std::array<DataType, 6> supportedTypes
2683 "PReLU: input is not a supported type.");
2686 "PReLU: alpha is not a supported type.");
2689 "PReLU: output is not a supported type.");
2692 "PReLU: input, alpha and output types are mismatched");
2695 "PReLU: shapes are not suitable for implicit broadcast");
2708 bool supported =
true;
2710 std::array<DataType,7> supportedTypes =
2722 "Reference TransposeConvolution2d: input is not a supported type.");
2725 "Reference TransposeConvolution2d: output is not a supported type.");
2728 "Reference TransposeConvolution2d: input and output types mismatched.");
2734 std::array<DataType, 3> supportedWeightTypes =
2742 "Reference TransposeConvolution2d: weights type not supported for " 2743 "quantized input.");
2748 "Reference TransposeConvolution2d: weights is not a supported type.");
2751 "Reference TransposeConvolution2d: input and weights types mismatched.");
2756 std::array<DataType,4> biasesSupportedTypes =
2764 "Reference TransposeConvolution2d: biases is not a supported type.");
2776 bool supported =
true;
2779 std::array<DataType, 6> supportedTypes =
2790 "Reference transpose: input is not a supported type.");
2793 "Reference transpose: output is not a supported type.");
2796 "Reference transpose: input and output types are mismatched.");
2816 bool supported =
true;
2820 reasonIfUnsupported.
value() +=
"Reference UnidirectionalSequenceLstm: hidden state output " 2821 "and cell state output are not supported at the moment.";
2824 std::array<DataType, 1> supportedTypes =
2829 std::array<DataType, 2> supportedWeightTypes =
2837 "Reference UnidirectionalSequenceLstm: input is not a supported type.");
2839 "Reference UnidirectionalSequenceLstm: input and outputStateIn types are mismatched");
2841 "Reference UnidirectionalSequenceLstm: input and cellStateIn types are mismatched");
2844 "Reference UnidirectionalSequenceLstm: input and output types are mismatched");
2847 reasonIfUnsupported,
2848 "Reference UnidirectionalSequenceLstm: InputToForgetWeights " 2849 "is not a supported type.");
2851 reasonIfUnsupported,
2852 "Reference UnidirectionalSequenceLstm: InputToCellWeights is not a supported type.");
2854 reasonIfUnsupported,
2855 "Reference UnidirectionalSequenceLstm: InputToOutputWeights " 2856 "is not a supported type.");
2858 reasonIfUnsupported,
2859 "Reference UnidirectionalSequenceLstm: RecurrentToForgetWeights " 2860 "is not a supported type.");
2862 reasonIfUnsupported,
2863 "Reference UnidirectionalSequenceLstm: RecurrentToCellWeights " 2864 "is not a supported type.");
2866 reasonIfUnsupported,
2867 "Reference UnidirectionalSequenceLstm: RecurrentToOutputWeights " 2868 "is not a supported type.");
2870 "Reference UnidirectionalSequenceLstm: input and ForgetGateBias types " 2873 "Reference UnidirectionalSequenceLstm: input and CellBias types are mismatched");
2875 "Reference UnidirectionalSequenceLstm: input and OutputGateBias types " 2880 reasonIfUnsupported,
2881 "Reference UnidirectionalSequenceLstm: InputToInputWeights " 2882 "is not a supported type.");
2884 reasonIfUnsupported,
2885 "Reference UnidirectionalSequenceLstm: RecurrentToInputWeights " 2886 "is not a supported type.");
2888 "Reference UnidirectionalSequenceLstm: input and InputGateBias types " 2893 reasonIfUnsupported,
2894 "Reference UnidirectionalSequenceLstm: CellToInputWeights " 2895 "is not a supported type.");
2901 reasonIfUnsupported,
2902 "Reference UnidirectionalSequenceLstm: CellToForgetWeights " 2903 "is not a supported type.");
2905 reasonIfUnsupported,
2906 "Reference UnidirectionalSequenceLstm: CellToOutputWeights " 2907 "is not a supported type.");
2912 reasonIfUnsupported,
2913 "Reference UnidirectionalSequenceLstm: ProjectionWeights " 2914 "is not a supported type.");
2918 "Reference UnidirectionalSequenceLstm: input and ProjectionBias types " 2927 reasonIfUnsupported,
2928 "Reference UnidirectionalSequenceLstm: InputLayerNormWeights " 2929 "is not a supported type.");
2932 reasonIfUnsupported,
2933 "Reference UnidirectionalSequenceLstm: ForgetLayerNormWeights " 2934 "is not a supported type.");
2936 reasonIfUnsupported,
2937 "Reference UnidirectionalSequenceLstm: CellLayerNormWeights " 2938 "is not a supported type.");
2940 reasonIfUnsupported,
2941 "Reference UnidirectionalSequenceLstm: OutputLayerNormWeights " 2942 "is not a supported type.");
bool m_ProjectionEnabled
Enable/disable the projection layer.
const TensorInfo const TensorInfo const TensorInfo const Optional< TensorInfo > & hiddenStateOutput
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
const TensorInfo const TensorInfo const TensorInfo const Optional< TensorInfo > const Optional< TensorInfo > & cellStateOutput
bool IsPadSupported(const TensorInfo &input, const TensorInfo &output, const PadDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
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 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
const TensorInfo const TensorInfo const TensorInfo const TensorInfo & outputStateOut
A LogicalBinaryDescriptor for the LogicalBinaryLayer.
const TensorInfo & scores
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 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.
A FakeQuantizationDescriptor for the FakeQuantizationLayer.
bool IsUnidirectionalSequenceLstmSupported(const TensorInfo &input, const TensorInfo &outputStateIn, const TensorInfo &cellStateIn, const TensorInfo &output, const Optional< TensorInfo > &hiddenStateOutput, const Optional< TensorInfo > &cellStateOutput, const UnidirectionalSequenceLstmDescriptor &descriptor, const LstmInputParamsInfo ¶msInfo, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
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 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
const TensorInfo & output
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
const TensorInfo const TensorInfo const TensorInfo const TensorInfo const TensorInfo & cellStateOut
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...