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.";
78 std::array<DataType,6> supportedTypes = {
88 "Reference activation: input type not supported.");
91 "Reference activation: output type not supported.");
94 "Reference activation: input and output types mismatched.");
97 "Reference activation: input and output shapes are of different rank.");
100 struct ActivationFunctionSupported :
public Rule 132 supported &=
CheckSupportRule(ActivationFunctionSupported(descriptor), reasonIfUnsupported,
133 "Reference activation: function not supported.");
145 std::array<DataType,7> supportedTypes = {
156 "Reference addition: input 0 is not a supported type.");
159 "Reference addition: input 1 is not a supported type.");
162 "Reference addition: output is not a supported type.");
165 "Reference addition: input 0 and Input 1 types are mismatched");
168 "Reference addition: input and output types are mismatched");
171 "Reference addition: shapes are not suitable for implicit broadcast.");
182 std::array<DataType, 7> supportedTypes =
196 "Reference ArgMinMax: input is not a supported type.");
198 "Reference ArgMinMax: output type not supported");
214 std::array<DataType, 6> supportedTypes =
227 "Reference batch normalization: input is not a supported type.");
230 "Reference batch normalization: output is not a supported type.");
233 "Reference batch normalization: input and output types are mismatched");
236 "Reference batch normalization: mean is not a supported type.");
239 "Reference batch normalization: variance is not a supported type.");
242 "Reference batch normalization: beta is not a supported type.");
245 "Reference batch normalization: gamma is not a supported type.");
259 std::string batchToSpaceNdLayerStr =
"batchToSpaceNd";
260 std::string inputTensorStr =
"input";
261 std::string outputTensorStr =
"output";
264 std::array<DataType,6> supportedTypes =
275 "Reference BatchToSpaceNd: input type not supported.");
278 "Reference BatchToSpaceNd: output type not supported.");
281 "Reference BatchToSpaceNd: input and output types mismatched.");
285 CreateIncorrectDimensionsErrorMsg(4,
287 batchToSpaceNdLayerStr,
288 outputTensorStr).data());
292 CreateIncorrectDimensionsErrorMsg(4,
294 batchToSpaceNdLayerStr,
295 inputTensorStr).data());
307 std::array<DataType, 8> supportedInputTypes =
321 "Reference comparison: input 0 is not a supported type");
324 "Reference comparison: input 0 and Input 1 types are mismatched");
327 "Reference comparison: output is not of type Boolean");
340 std::array<DataType,6> supportedTypes =
351 "Reference concatenation: output type not supported");
356 "Reference concatenation: input type not supported");
359 "Reference concatenation: input and output types mismatched.");
368 std::array<DataType,8> supportedTypes =
381 "Reference constant: output is not a supported type.");
391 "Reference for ConvertBf16ToFp32 layer: input type not supported");
394 "Reference for ConvertBf16ToFp32 layer: output type not supported");
406 &FalseInputFuncF32<>,
412 &FalseOutputFuncF16<>,
426 "Reference for ConvertFp32ToBf16 layer: input type not supported");
429 "Reference for ConvertFp32ToBf16 layer: output type not supported");
440 &FalseInputFuncF16<>,
448 &FalseOutputFuncF32<>,
464 std::array<DataType,7> supportedTypes =
476 "Reference Convolution2d: input is not a supported type.");
479 "Reference Convolution2d: output is not a supported type.");
486 reasonIfUnsupported.
value() +=
"Output tensor type must be BFloat16 or Float32 for BFloat16 input.\n";
493 "Reference Convolution2d: input and output types mismatched.");
500 std::array<DataType, 4> supportedWeightTypes =
510 "Reference Convolution2d: weights type not supported for quantized input.");
515 "Reference Convolution2d: weights is not a supported type.");
518 "Reference Convolution2d: input and weights types mismatched.");
523 std::array<DataType,4> biasesSupportedTypes =
532 "Reference Convolution2d: biases is not a supported type.");
545 std::array<DataType, 8> supportedTypes =
558 "Reference for Debug layer: input type not supported");
561 "Reference for Debug layer: output type not supported");
564 "Reference for Debug layer: input and output types are mismatched");
577 std::array<DataType,6> supportedTypes =
588 "Reference DepthToSpace: input type not supported");
591 "Reference DepthToSpace: output type not supported");
594 "Reference DepthToSpace: input and output types are mismatched");
610 std::array<DataType,7> supportedTypes =
622 "Reference DepthwiseConvolution2d: input is not a supported type.");
625 "Reference DepthwiseConvolution2d: output is not a supported type.");
628 "Reference DepthwiseConvolution2d: input and output types mismatched.");
634 std::array<DataType, 4> supportedWeightTypes =
644 "Reference DepthwiseConvolution2d: weights type not supported for " 650 "Reference DepthwiseConvolution2d: weights is not a supported type.");
653 "Reference DepthwiseConvolution2d: input and weights types mismatched.");
658 std::array<DataType,4> biasesSupportedTypes =
666 "Reference DepthwiseConvolution2d: biases is not a supported type.");
679 std::array<DataType,4> supportedInputTypes = {
687 "Reference for Dequantize layer: input type not supported.");
690 "Reference for Dequantize layer: per-axis quantized input not support .");
693 "Reference dequantize: per-axis quantized input not support .");
695 std::array<DataType,3> supportedOutputTypes = {
702 "Reference for Dequantize layer: output type not supported.");
705 "Reference for Dequantize layer: input/output shapes have different num total " 721 IgnoreUnused(anchors, detectionBoxes, detectionClasses, detectionScores, numDetections, descriptor);
725 std::array<DataType,6> supportedInputTypes =
736 "Reference DetectionPostProcess: input 0 is not a supported type.");
739 "Reference DetectionPostProcess: input 1 is not a supported type.");
761 std::array<DataType,7> supportedTypes = {
772 "Reference division: input 0 is not a supported type.");
775 "Reference division: input 1 is not a supported type.");
778 "Reference division: output is not a supported type.");
781 "Reference division: input 0 and Input 1 types are mismatched");
784 "Reference division: input and output types are mismatched");
787 "Reference division: shapes are not suitable for implicit broadcast.");
799 std::array<DataType, 7> supportedTypes =
810 std::array<DataType, 1> logicalSupportedTypes =
820 "Reference elementwise unary: input type not supported");
823 "Reference elementwise unary: output type not supported");
828 "Reference elementwise unary: input type not supported");
831 "Reference elementwise unary: output type not supported");
835 "Reference elementwise unary: input and output types not matching");
838 "Reference elementwise unary: input and output shapes" 839 "have different number of total elements");
853 reasonIfUnsupported);
863 std::array<DataType,1> supportedTypes =
869 "Reference fake quantization: input type not supported.");
884 std::array<DataType,3> supportedTypes =
892 "Reference Fill: input type not supported.");
895 "Reference Fill: output type not supported.");
906 std::array<DataType,3> supportedTypes =
914 "Reference Floor: input type not supported.");
917 "Reference Floor: output type not supported.");
932 std::array<DataType,6> supportedTypes =
943 "Reference Fully Connected: input type not supported.");
946 "Reference Fully Connected: output type not supported.");
949 "Reference Fully Connected: weights type not supported.");
956 reasonIfUnsupported.
value() +=
"Output tensor type must be BFloat16 or Float32 for BFloat16 input.\n";
963 "Reference Fully Connected: input and output types mismatched.");
967 "Reference Fully Connected: weights is not a supported type.");
970 "Reference Fully Connected: input and weights types mismatched.");
975 std::array<DataType, 5>
986 "Reference Fully Connected: bias type not supported.");
989 "Reference Fully Connected: bias and weight types mismatch.");
992 "Reference Fully Connected: bias type inferred from weights is incompatible.");
995 "Reference Fully Connected: bias must have 1 dimension.");
1009 std::array<DataType,7> supportedTypes =
1020 if (descriptor.
m_Axis != 0)
1022 reasonIfUnsupported.
value() += std::string(
"Reference Gather: axis not supported\n");
1026 "Reference Gather: input type not supported");
1029 "Reference Gather: output type not supported");
1032 "Reference Gather: indices (input1) type not supported");
1035 "Reference Gather: input and output types not matching");
1049 reasonIfUnsupported);
1065 std::array<DataType, 3> supportedTypes =
1075 "Reference Instance Normalization: input type not supported.");
1078 "Reference Instance Normalization: output type not supported.");
1081 "Reference Instance Normalization: input and output types mismatched.");
1084 "Reference Instance Normalization: input and output shapes have different " 1085 "num total elements.");
1097 std::array<DataType, 6> supportedTypes =
1110 "Reference L2normalization: input type not supported.");
1113 "Reference L2normalization: output type not supported.");
1116 "Reference L2normalization: input and output types mismatched.");
1119 "Reference L2normalization: input and output shapes have different " 1120 "num total elements.");
1133 std::array<DataType, 1> supportedTypes =
1140 "Reference LogicalBinary: input 0 type not supported");
1142 "Reference LogicalBinary: input 1 type not supported");
1145 "Reference LogicalBinary: input and output types do not match");
1157 std::array<DataType, 1> supportedTypes =
1164 "Reference LogicalUnary: input type not supported");
1167 "Reference LogicalUnary: input and output types do not match");
1179 std::array<DataType, 3> supportedTypes =
1188 "Reference LogSoftmax: input type not supported");
1191 "Reference LogSoftmax: output type not supported");
1194 "Reference LogSoftmax: input and output types do not match");
1215 std::array<DataType,3> supportedTypes = {
1223 "Reference Lstm: input is not a supported type.");
1225 "Reference Lstm: input and outputStateIn types are mismatched");
1227 "Reference Lstm: input and cellStateIn types are mismatched");
1229 "Reference Lstm: input and scratchBuffer types are mismatched");
1231 "Reference Lstm: input and outputStateOut types are mismatched");
1233 "Reference Lstm: input and cellStateOut types are mismatched");
1235 "Reference Lstm: input and output types are mismatched");
1238 "Reference Lstm: input and InputToForgetWeights types are mismatched");
1240 "Reference Lstm: input and InputToCellWeights types are mismatched");
1242 "Reference Lstm: input and InputToOutputWeights types are mismatched");
1244 "Reference Lstm: input and RecurrentToForgetWeights types are mismatched");
1246 "Reference Lstm: input and RecurrentToCellWeights types are mismatched");
1248 "Reference Lstm: input and RecurrentToOutputWeights types are mismatched");
1250 "Reference Lstm: input and ForgetGateBias types are mismatched");
1252 "Reference Lstm: input and CellBias types are mismatched");
1254 "Reference Lstm: input and OutputGateBias types are mismatched");
1258 "Reference Lstm: input and InputToInputWeights types are mismatched");
1260 reasonIfUnsupported,
1261 "Reference Lstm: input and RecurrentToInputWeights types are mismatched");
1263 "Reference Lstm: input and InputGateBias types are mismatched");
1267 reasonIfUnsupported,
1268 "Reference Lstm: input and CellToInputWeights types are mismatched");
1274 "Reference Lstm: input and CellToForgetWeights types are mismatched");
1276 "Reference Lstm: input and CellToOutputWeights types are mismatched");
1281 "Reference Lstm: input and mProjectionWeights types are mismatched");
1285 "Reference Lstm: input and ProjectionBias types are mismatched");
1293 reasonIfUnsupported,
1294 "Reference Lstm: input and InputLayerNormWeights types are mismatched");
1297 reasonIfUnsupported,
1298 "Reference Lstm: input and ForgetLayerNormWeights types are mismatched");
1300 reasonIfUnsupported,
1301 "Reference Lstm: input and CellLayerNormWeights types are mismatched");
1303 reasonIfUnsupported,
1304 "Reference Lstm: input and OutputLayerNormWeights types are mismatched");
1317 std::array<DataType,7> supportedTypes = {
1328 "Reference maximum: input 0 is not a supported type.");
1331 "Reference maximum: input 1 is not a supported type.");
1334 "Reference maximum: output is not a supported type.");
1337 "Reference maximum: input 0 and Input 1 types are mismatched");
1340 "Reference maximum: input and output types are mismatched");
1343 "Reference maximum: shapes are not suitable for implicit broadcast.");
1354 std::string meanLayerStr =
"Mean";
1355 std::string outputTensorStr =
"output";
1357 std::array<DataType,6> supportedTypes =
1368 "Reference Mean: input type not supported.");
1371 "Reference Mean: input and output types are mismatched");
1376 reasonIfUnsupported,
1379 meanLayerStr, outputTensorStr).data());
1381 else if (descriptor.
m_Axis.empty())
1384 reasonIfUnsupported,
1386 meanLayerStr, outputTensorStr).data());
1395 reasonIfUnsupported,
1397 meanLayerStr, outputTensorStr).data());
1402 reasonIfUnsupported,
1404 meanLayerStr, outputTensorStr).data());
1425 std::array<DataType,7> supportedTypes =
1437 "Reference MemCopy: input type not supported");
1440 "Reference MemCopy: output type not supported");
1443 "Reference MemCopy: input and output types are mismatched");
1455 std::array<DataType,7> supportedTypes = {
1466 "Reference minimum: input 0 is not a supported type.");
1469 "Reference minimum: input 1 is not a supported type.");
1472 "Reference minimum: output is not a supported type.");
1475 "Reference minimum: input 0 and Input 1 types are mismatched");
1478 "Reference minimum: input and output types are mismatched");
1481 "Reference minimum: shapes are not suitable for implicit broadcast.");
1493 std::array<DataType,7> supportedTypes = {
1504 "Reference multiplication: input 0 is not a supported type.");
1507 "Reference multiplication: input 1 is not a supported type.");
1510 "Reference multiplication: output is not a supported type.");
1513 "Reference multiplication: input 0 and Input 1 types are mismatched");
1516 "Reference multiplication: input and output types are mismatched");
1519 "Reference multiplication: shapes are not suitable for implicit broadcast.");
1532 std::array<DataType, 6> supportedTypes =
1545 "Reference normalization: input type not supported.");
1548 "Reference normalization: output type not supported.");
1551 "Reference normalization: input and output shapes have different " 1552 "num total elements.");
1572 std::array<DataType,6> supportedTypes =
1583 "Reference pad: input is not a supported type.");
1586 "Reference pad: output is not a supported type.");
1589 "Reference pad: input and output types are mismatched.");
1603 std::array<DataType, 6> supportedTypes =
1614 "Reference permute: input is not a supported type.");
1617 "Reference permute: output is not a supported type.");
1620 "Reference permute: input and output types are mismatched.");
1634 std::array<DataType,6> supportedTypes =
1645 "Reference poolind2d: input is not a supported type.");
1648 "Reference poolind2d: output is not a supported type.");
1651 "Reference poolind2d: input and output types are mismatched.");
1687 std::array<DataType,7> supportedInputTypes = {
1698 "Reference quantize: input type not supported.");
1701 std::array<DataType,4> supportedOutputTypes = {
1708 "Reference quantize: output type not supported.");
1711 "Reference quantize: input and output shapes have different num total elements.");
1722 std::array<DataType,1> supportedOutputTypes =
1728 "Reference rank: input type not supported.");
1739 std::array<DataType,8> supportedOutputTypes =
1752 "Reference reshape: input type not supported.");
1760 std::array<DataType,6> supportedTypes =
1771 "Reference ResizeBilinear: input type not supported");
1774 "Reference ResizeBilinear: output type not supported");
1777 "Reference ResizeBilinear: input and output types not matching");
1789 std::array<DataType,6> supportedTypes =
1800 "Reference Resize: input type not supported");
1803 "Reference Resize: output type not supported");
1806 "Reference Resize: input and output types not matching");
1818 reasonIfUnsupported);
1829 std::array<DataType, 5> supportedTypes =
1839 "Reference Slice: input type not supported");
1842 "Reference Slice: output type not supported");
1845 "Reference Slice: input and output types are mismatched");
1857 std::array<DataType,7> supportedTypes =
1869 "Reference Softmax: output type not supported");
1872 "Reference Softmax: input type not supported");
1875 "Reference Softmax: input type not supported");
1887 std::array<DataType,6> supportedTypes =
1898 "Reference SpaceToBatchNd: input type not supported");
1901 "Reference SpaceToBatchNd: output type not supported");
1904 "Reference SpaceToBatchNd: input and output types are mismatched");
1918 std::array<DataType,6> supportedTypes =
1929 "Reference SpaceToDepth: input type not supported");
1932 "Reference SpaceToDepth: output type not supported");
1935 "Reference SpaceToDepth: input and output types are mismatched");
1946 std::array<DataType,6> supportedTypes =
1957 "Reference splitter: input type not supported");
1963 const std::vector<std::reference_wrapper<TensorInfo>>& outputs,
1969 std::array<DataType,6> supportedTypes =
1980 "Reference splitter: output type not supported");
1984 "Reference splitter: input type not supported");
1987 "Reference splitter: input and output types mismatched.");
2001 std::array<DataType,6> supportedTypes =
2012 "Reference stack: output type not supported");
2017 "Reference stack: input type not supported");
2020 "Reference stack: input and output types mismatched.");
2034 std::array<DataType,5> supportedTypes =
2044 "Reference StridedSlice: input type not supported");
2047 "Reference StridedSlice: output type not supported");
2050 "Reference StridedSlice: input and output types are mismatched");
2062 std::array<DataType,7> supportedTypes = {
2073 "Reference subtraction: input 0 is not a supported type.");
2076 "Reference subtraction: input 1 is not a supported type.");
2079 "Reference subtraction: output is not a supported type.");
2082 "Reference subtraction: input 0 and Input 1 types are mismatched");
2085 "Reference subtraction: input and output types are mismatched");
2088 "Reference subtraction: shapes are not suitable for implicit broadcast.");
2100 std::array<DataType, 6> supportedTypes
2111 "PReLU: input is not a supported type.");
2114 "PReLU: alpha is not a supported type.");
2117 "PReLU: output is not a supported type.");
2120 "PReLU: input, alpha and output types are mismatched");
2123 "PReLU: shapes are not suitable for implicit broadcast");
2138 std::array<DataType,7> supportedTypes =
2150 "Reference TransposeConvolution2d: input is not a supported type.");
2153 "Reference TransposeConvolution2d: output is not a supported type.");
2156 "Reference TransposeConvolution2d: input and output types mismatched.");
2163 std::array<DataType, 4> supportedWeightTypes =
2173 "Reference TransposeConvolution2d: weights type not supported for " 2174 "quantized input.");
2179 "Reference TransposeConvolution2d: weights is not a supported type.");
2182 "Reference TransposeConvolution2d: input and weights types mismatched.");
2187 std::array<DataType,4> biasesSupportedTypes =
2195 "Reference TransposeConvolution2d: biases is not a supported type.");
2210 std::array<DataType, 6> supportedTypes =
2221 "Reference transpose: input is not a supported type.");
2224 "Reference transpose: output is not a supported type.");
2227 "Reference transpose: input and output types are mismatched.");
bool IsEqualSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
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.
bool IsSoftmaxSupported(const TensorInfo &input, const TensorInfo &output, const SoftmaxDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A TransposeConvolution2dDescriptor for the TransposeConvolution2dLayer.
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
bool IsLogSoftmaxSupported(const TensorInfo &input, const TensorInfo &output, const LogSoftmaxDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported) const override
A ReshapeDescriptor for the ReshapeLayer.
bool IsGatherSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, const GatherDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
#define ARMNN_NO_DEPRECATE_WARN_BEGIN
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
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
ISubgraphViewConverter supported
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 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 IsLogicalUnarySupported(const TensorInfo &input, const TensorInfo &output, const ElementwiseUnaryDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported) const override
A LogicalBinaryDescriptor for the LogicalBinaryLayer.
bool IsDepthToSpaceSupported(const TensorInfo &input, const TensorInfo &output, const DepthToSpaceDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
std::vector< float > boxEncodings({ 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f })
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) 2020 ARM Limited.
void IgnoreUnused(Ts &&...)
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 IsResizeBilinearSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A BatchToSpaceNdDescriptor for the BatchToSpaceNdLayer.
bool IsMergerSupported(const std::vector< const TensorInfo *> inputs, const TensorInfo &output, const MergerDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
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 ResizeDescriptor for the ResizeLayer.
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
bool IsSpaceToBatchNdSupported(const TensorInfo &input, const TensorInfo &output, const SpaceToBatchNdDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
An LstmDescriptor for the LstmLayer.
#define ARMNN_NO_DEPRECATE_WARN_END
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
bool IsRsqrtSupported(const TensorInfo &input, 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.
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 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.
bool IsMeanSupported(const TensorInfo &input, const TensorInfo &output, const MeanDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
#define ARMNN_ASSERT(COND)
A QLstmDescriptor for the QLstmLayer.
bool IsSpaceToDepthSupported(const TensorInfo &input, const TensorInfo &output, const SpaceToDepthDescriptor &descriptor, 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.
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).
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
std::vector< float > scores({ 0.0f, 0.9f, 0.8f, 0.0f, 0.75f, 0.72f, 0.0f, 0.6f, 0.5f, 0.0f, 0.93f, 0.95f, 0.0f, 0.5f, 0.4f, 0.0f, 0.3f, 0.2f })
bool IsConcatSupported(const std::vector< const TensorInfo *> inputs, const TensorInfo &output, const ConcatDescriptor &descriptor, 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
A MeanDescriptor for the MeanLayer.
bool IsGreaterSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
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 IsDivisionSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsAbsSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
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 IsSplitterSupported(const TensorInfo &input, const ViewsDescriptor &descriptor, 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
An InstanceNormalizationDescriptor for InstanceNormalizationLayer.
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)
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.
A PermuteDescriptor for the PermuteLayer.
std::vector< float > anchors({ 0.5f, 0.5f, 1.0f, 1.0f, 0.5f, 0.5f, 1.0f, 1.0f, 0.5f, 0.5f, 1.0f, 1.0f, 0.5f, 10.5f, 1.0f, 1.0f, 0.5f, 10.5f, 1.0f, 1.0f, 0.5f, 100.5f, 1.0f, 1.0f })