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, 8> supportedInputTypes =
194 std::array<DataType,2> supportedOutputTypes = {
202 "Reference ArgMinMax: input is not a supported type.");
204 "Reference ArgMinMax: output type not supported");
220 std::array<DataType, 6> supportedTypes =
233 "Reference batch normalization: input is not a supported type.");
236 "Reference batch normalization: output is not a supported type.");
239 "Reference batch normalization: input and output types are mismatched");
242 "Reference batch normalization: mean is not a supported type.");
245 "Reference batch normalization: variance is not a supported type.");
248 "Reference batch normalization: beta is not a supported type.");
251 "Reference batch normalization: gamma is not a supported type.");
265 std::string batchToSpaceNdLayerStr =
"batchToSpaceNd";
266 std::string inputTensorStr =
"input";
267 std::string outputTensorStr =
"output";
270 std::array<DataType,6> supportedTypes =
281 "Reference BatchToSpaceNd: input type not supported.");
284 "Reference BatchToSpaceNd: output type not supported.");
287 "Reference BatchToSpaceNd: input and output types mismatched.");
291 CreateIncorrectDimensionsErrorMsg(4,
293 batchToSpaceNdLayerStr,
294 outputTensorStr).data());
298 CreateIncorrectDimensionsErrorMsg(4,
300 batchToSpaceNdLayerStr,
301 inputTensorStr).data());
310 std::array<DataType, 9> supportedInputTypes =
324 "Reference cast: input is not a supported type");
328 "Reference cast: output is not a supported type");
331 "Reference cast: input and output shapes have different number of total elements");
343 std::array<DataType, 8> supportedInputTypes =
357 "Reference comparison: input 0 is not a supported type");
360 "Reference comparison: input 0 and Input 1 types are mismatched");
363 "Reference comparison: output is not of type Boolean");
376 std::array<DataType,6> supportedTypes =
387 "Reference concatenation: output type not supported");
392 "Reference concatenation: input type not supported");
395 "Reference concatenation: input and output types mismatched.");
404 std::array<DataType,8> supportedTypes =
417 "Reference constant: output is not a supported type.");
427 "Reference for ConvertBf16ToFp32 layer: input type not supported");
430 "Reference for ConvertBf16ToFp32 layer: output type not supported");
442 &FalseInputFuncF32<>,
448 &FalseOutputFuncF16<>,
462 "Reference for ConvertFp32ToBf16 layer: input type not supported");
465 "Reference for ConvertFp32ToBf16 layer: output type not supported");
476 &FalseInputFuncF16<>,
484 &FalseOutputFuncF32<>,
500 std::array<DataType,7> supportedTypes =
512 "Reference Convolution2d: input is not a supported type.");
515 "Reference Convolution2d: output is not a supported type.");
522 reasonIfUnsupported.
value() +=
"Output tensor type must be BFloat16 or Float32 for BFloat16 input.\n";
529 "Reference Convolution2d: input and output types mismatched.");
536 std::array<DataType, 4> supportedWeightTypes =
546 "Reference Convolution2d: weights type not supported for quantized input.");
551 "Reference Convolution2d: weights is not a supported type.");
554 "Reference Convolution2d: input and weights types mismatched.");
559 std::array<DataType,4> biasesSupportedTypes =
568 "Reference Convolution2d: biases is not a supported type.");
581 std::array<DataType, 8> supportedTypes =
594 "Reference for Debug layer: input type not supported");
597 "Reference for Debug layer: output type not supported");
600 "Reference for Debug layer: input and output types are mismatched");
613 std::array<DataType,6> supportedTypes =
624 "Reference DepthToSpace: input type not supported");
627 "Reference DepthToSpace: output type not supported");
630 "Reference DepthToSpace: input and output types are mismatched");
646 std::array<DataType,7> supportedTypes =
658 "Reference DepthwiseConvolution2d: input is not a supported type.");
661 "Reference DepthwiseConvolution2d: output is not a supported type.");
664 "Reference DepthwiseConvolution2d: input and output types mismatched.");
670 std::array<DataType, 4> supportedWeightTypes =
680 "Reference DepthwiseConvolution2d: weights type not supported for " 686 "Reference DepthwiseConvolution2d: weights is not a supported type.");
689 "Reference DepthwiseConvolution2d: input and weights types mismatched.");
694 std::array<DataType,4> biasesSupportedTypes =
702 "Reference DepthwiseConvolution2d: biases is not a supported type.");
715 std::array<DataType,4> supportedInputTypes = {
723 "Reference for Dequantize layer: input type not supported.");
726 "Reference for Dequantize layer: per-axis quantized input not support .");
729 "Reference dequantize: per-axis quantized input not support .");
731 std::array<DataType,3> supportedOutputTypes = {
738 "Reference for Dequantize layer: output type not supported.");
741 "Reference for Dequantize layer: input/output shapes have different num total " 757 IgnoreUnused(anchors, detectionBoxes, detectionClasses, detectionScores, numDetections, descriptor);
761 std::array<DataType,6> supportedInputTypes =
772 "Reference DetectionPostProcess: input 0 is not a supported type.");
775 "Reference DetectionPostProcess: input 1 is not a supported type.");
797 std::array<DataType,7> supportedTypes = {
808 "Reference division: input 0 is not a supported type.");
811 "Reference division: input 1 is not a supported type.");
814 "Reference division: output is not a supported type.");
817 "Reference division: input 0 and Input 1 types are mismatched");
820 "Reference division: input and output types are mismatched");
823 "Reference division: shapes are not suitable for implicit broadcast.");
835 std::array<DataType, 7> supportedTypes =
846 std::array<DataType, 1> logicalSupportedTypes =
856 "Reference elementwise unary: input type not supported");
859 "Reference elementwise unary: output type not supported");
864 "Reference elementwise unary: input type not supported");
867 "Reference elementwise unary: output type not supported");
871 "Reference elementwise unary: input and output types not matching");
874 "Reference elementwise unary: input and output shapes" 875 "have different number of total elements");
889 reasonIfUnsupported);
899 std::array<DataType,1> supportedTypes =
905 "Reference fake quantization: input type not supported.");
920 std::array<DataType,3> supportedTypes =
928 "Reference Fill: input type not supported.");
931 "Reference Fill: output type not supported.");
942 std::array<DataType,3> supportedTypes =
950 "Reference Floor: input type not supported.");
953 "Reference Floor: output type not supported.");
968 std::array<DataType,6> supportedTypes =
979 "Reference Fully Connected: input type not supported.");
982 "Reference Fully Connected: output type not supported.");
985 "Reference Fully Connected: weights type not supported.");
992 reasonIfUnsupported.
value() +=
"Output tensor type must be BFloat16 or Float32 for BFloat16 input.\n";
999 "Reference Fully Connected: input and output types mismatched.");
1003 "Reference Fully Connected: weights is not a supported type.");
1006 "Reference Fully Connected: input and weights types mismatched.");
1011 std::array<DataType, 5>
1012 supportedBiasTypes =
1022 "Reference Fully Connected: bias type not supported.");
1025 "Reference Fully Connected: bias and weight types mismatch.");
1028 "Reference Fully Connected: bias type inferred from weights is incompatible.");
1031 "Reference Fully Connected: bias must have 1 dimension.");
1045 std::array<DataType,7> supportedTypes =
1056 if (descriptor.
m_Axis != 0)
1058 reasonIfUnsupported.
value() += std::string(
"Reference Gather: axis not supported\n");
1062 "Reference Gather: input type not supported");
1065 "Reference Gather: output type not supported");
1068 "Reference Gather: indices (input1) type not supported");
1071 "Reference Gather: input and output types not matching");
1085 reasonIfUnsupported);
1101 std::array<DataType, 3> supportedTypes =
1111 "Reference Instance Normalization: input type not supported.");
1114 "Reference Instance Normalization: output type not supported.");
1117 "Reference Instance Normalization: input and output types mismatched.");
1120 "Reference Instance Normalization: input and output shapes have different " 1121 "num total elements.");
1133 std::array<DataType, 6> supportedTypes =
1146 "Reference L2normalization: input type not supported.");
1149 "Reference L2normalization: output type not supported.");
1152 "Reference L2normalization: input and output types mismatched.");
1155 "Reference L2normalization: input and output shapes have different " 1156 "num total elements.");
1169 std::array<DataType, 1> supportedTypes =
1176 "Reference LogicalBinary: input 0 type not supported");
1178 "Reference LogicalBinary: input 1 type not supported");
1181 "Reference LogicalBinary: input and output types do not match");
1193 std::array<DataType, 3> supportedTypes =
1202 "Reference LogSoftmax: input type not supported");
1205 "Reference LogSoftmax: output type not supported");
1208 "Reference LogSoftmax: input and output types do not match");
1229 std::array<DataType,3> supportedTypes = {
1237 "Reference Lstm: input is not a supported type.");
1239 "Reference Lstm: input and outputStateIn types are mismatched");
1241 "Reference Lstm: input and cellStateIn types are mismatched");
1243 "Reference Lstm: input and scratchBuffer types are mismatched");
1245 "Reference Lstm: input and outputStateOut types are mismatched");
1247 "Reference Lstm: input and cellStateOut types are mismatched");
1249 "Reference Lstm: input and output types are mismatched");
1252 "Reference Lstm: input and InputToForgetWeights types are mismatched");
1254 "Reference Lstm: input and InputToCellWeights types are mismatched");
1256 "Reference Lstm: input and InputToOutputWeights types are mismatched");
1258 "Reference Lstm: input and RecurrentToForgetWeights types are mismatched");
1260 "Reference Lstm: input and RecurrentToCellWeights types are mismatched");
1262 "Reference Lstm: input and RecurrentToOutputWeights types are mismatched");
1264 "Reference Lstm: input and ForgetGateBias types are mismatched");
1266 "Reference Lstm: input and CellBias types are mismatched");
1268 "Reference Lstm: input and OutputGateBias types are mismatched");
1272 "Reference Lstm: input and InputToInputWeights types are mismatched");
1274 reasonIfUnsupported,
1275 "Reference Lstm: input and RecurrentToInputWeights types are mismatched");
1277 "Reference Lstm: input and InputGateBias types are mismatched");
1281 reasonIfUnsupported,
1282 "Reference Lstm: input and CellToInputWeights types are mismatched");
1288 "Reference Lstm: input and CellToForgetWeights types are mismatched");
1290 "Reference Lstm: input and CellToOutputWeights types are mismatched");
1295 "Reference Lstm: input and mProjectionWeights types are mismatched");
1299 "Reference Lstm: input and ProjectionBias types are mismatched");
1307 reasonIfUnsupported,
1308 "Reference Lstm: input and InputLayerNormWeights types are mismatched");
1311 reasonIfUnsupported,
1312 "Reference Lstm: input and ForgetLayerNormWeights types are mismatched");
1314 reasonIfUnsupported,
1315 "Reference Lstm: input and CellLayerNormWeights types are mismatched");
1317 reasonIfUnsupported,
1318 "Reference Lstm: input and OutputLayerNormWeights types are mismatched");
1331 std::array<DataType,7> supportedTypes = {
1342 "Reference maximum: input 0 is not a supported type.");
1345 "Reference maximum: input 1 is not a supported type.");
1348 "Reference maximum: output is not a supported type.");
1351 "Reference maximum: input 0 and Input 1 types are mismatched");
1354 "Reference maximum: input and output types are mismatched");
1357 "Reference maximum: shapes are not suitable for implicit broadcast.");
1368 std::string meanLayerStr =
"Mean";
1369 std::string outputTensorStr =
"output";
1371 std::array<DataType,6> supportedTypes =
1382 "Reference Mean: input type not supported.");
1385 "Reference Mean: input and output types are mismatched");
1390 reasonIfUnsupported,
1393 meanLayerStr, outputTensorStr).data());
1395 else if (descriptor.
m_Axis.empty())
1398 reasonIfUnsupported,
1400 meanLayerStr, outputTensorStr).data());
1409 reasonIfUnsupported,
1411 meanLayerStr, outputTensorStr).data());
1416 reasonIfUnsupported,
1418 meanLayerStr, outputTensorStr).data());
1439 std::array<DataType,7> supportedTypes =
1451 "Reference MemCopy: input type not supported");
1454 "Reference MemCopy: output type not supported");
1457 "Reference MemCopy: input and output types are mismatched");
1469 std::array<DataType,7> supportedTypes = {
1480 "Reference minimum: input 0 is not a supported type.");
1483 "Reference minimum: input 1 is not a supported type.");
1486 "Reference minimum: output is not a supported type.");
1489 "Reference minimum: input 0 and Input 1 types are mismatched");
1492 "Reference minimum: input and output types are mismatched");
1495 "Reference minimum: shapes are not suitable for implicit broadcast.");
1507 std::array<DataType,7> supportedTypes = {
1518 "Reference multiplication: input 0 is not a supported type.");
1521 "Reference multiplication: input 1 is not a supported type.");
1524 "Reference multiplication: output is not a supported type.");
1527 "Reference multiplication: input 0 and Input 1 types are mismatched");
1530 "Reference multiplication: input and output types are mismatched");
1533 "Reference multiplication: shapes are not suitable for implicit broadcast.");
1546 std::array<DataType, 6> supportedTypes =
1559 "Reference normalization: input type not supported.");
1562 "Reference normalization: output type not supported.");
1565 "Reference normalization: input and output shapes have different " 1566 "num total elements.");
1586 std::array<DataType,6> supportedTypes =
1597 "Reference pad: input is not a supported type.");
1600 "Reference pad: output is not a supported type.");
1603 "Reference pad: input and output types are mismatched.");
1617 std::array<DataType, 6> supportedTypes =
1628 "Reference permute: input is not a supported type.");
1631 "Reference permute: output is not a supported type.");
1634 "Reference permute: input and output types are mismatched.");
1648 std::array<DataType,6> supportedTypes =
1659 "Reference poolind2d: input is not a supported type.");
1662 "Reference poolind2d: output is not a supported type.");
1665 "Reference poolind2d: input and output types are mismatched.");
1701 std::array<DataType,7> supportedInputTypes = {
1712 "Reference quantize: input type not supported.");
1715 std::array<DataType,4> supportedOutputTypes = {
1722 "Reference quantize: output type not supported.");
1725 "Reference quantize: input and output shapes have different num total elements.");
1736 std::array<DataType,1> supportedOutputTypes =
1742 "Reference rank: input type not supported.");
1752 std::array<DataType,7> supportedTypes =
1764 "Reference Reduce: input type not supported");
1767 "Reference Reduce: output type not supported");
1770 "Reference Reduce: input and output types not matching");
1783 std::array<DataType,8> supportedOutputTypes =
1796 "Reference reshape: input type not supported.");
1804 std::array<DataType,6> supportedTypes =
1815 "Reference ResizeBilinear: input type not supported");
1818 "Reference ResizeBilinear: output type not supported");
1821 "Reference ResizeBilinear: input and output types not matching");
1833 std::array<DataType,6> supportedTypes =
1844 "Reference Resize: input type not supported");
1847 "Reference Resize: output type not supported");
1850 "Reference Resize: input and output types not matching");
1862 reasonIfUnsupported);
1873 std::array<DataType, 5> supportedTypes =
1883 "Reference Slice: input type not supported");
1886 "Reference Slice: output type not supported");
1889 "Reference Slice: input and output types are mismatched");
1901 std::array<DataType,7> supportedTypes =
1913 "Reference Softmax: output type not supported");
1916 "Reference Softmax: input type not supported");
1919 "Reference Softmax: input type not supported");
1931 std::array<DataType,6> supportedTypes =
1942 "Reference SpaceToBatchNd: input type not supported");
1945 "Reference SpaceToBatchNd: output type not supported");
1948 "Reference SpaceToBatchNd: input and output types are mismatched");
1962 std::array<DataType,6> supportedTypes =
1973 "Reference SpaceToDepth: input type not supported");
1976 "Reference SpaceToDepth: output type not supported");
1979 "Reference SpaceToDepth: input and output types are mismatched");
1990 std::array<DataType,6> supportedTypes =
2001 "Reference splitter: input type not supported");
2007 const std::vector<std::reference_wrapper<TensorInfo>>& outputs,
2013 std::array<DataType,6> supportedTypes =
2024 "Reference splitter: output type not supported");
2028 "Reference splitter: input type not supported");
2031 "Reference splitter: input and output types mismatched.");
2045 std::array<DataType,6> supportedTypes =
2056 "Reference stack: output type not supported");
2061 "Reference stack: input type not supported");
2064 "Reference stack: input and output types mismatched.");
2078 std::array<DataType,5> supportedTypes =
2088 "Reference StridedSlice: input type not supported");
2091 "Reference StridedSlice: output type not supported");
2094 "Reference StridedSlice: input and output types are mismatched");
2106 std::array<DataType,7> supportedTypes = {
2117 "Reference subtraction: input 0 is not a supported type.");
2120 "Reference subtraction: input 1 is not a supported type.");
2123 "Reference subtraction: output is not a supported type.");
2126 "Reference subtraction: input 0 and Input 1 types are mismatched");
2129 "Reference subtraction: input and output types are mismatched");
2132 "Reference subtraction: shapes are not suitable for implicit broadcast.");
2144 std::array<DataType, 6> supportedTypes
2155 "PReLU: input is not a supported type.");
2158 "PReLU: alpha is not a supported type.");
2161 "PReLU: output is not a supported type.");
2164 "PReLU: input, alpha and output types are mismatched");
2167 "PReLU: shapes are not suitable for implicit broadcast");
2182 std::array<DataType,7> supportedTypes =
2194 "Reference TransposeConvolution2d: input is not a supported type.");
2197 "Reference TransposeConvolution2d: output is not a supported type.");
2200 "Reference TransposeConvolution2d: input and output types mismatched.");
2207 std::array<DataType, 4> supportedWeightTypes =
2217 "Reference TransposeConvolution2d: weights type not supported for " 2218 "quantized input.");
2223 "Reference TransposeConvolution2d: weights is not a supported type.");
2226 "Reference TransposeConvolution2d: input and weights types mismatched.");
2231 std::array<DataType,4> biasesSupportedTypes =
2239 "Reference TransposeConvolution2d: biases is not a supported type.");
2254 std::array<DataType, 6> supportedTypes =
2265 "Reference transpose: input is not a supported type.");
2268 "Reference transpose: output is not a supported type.");
2271 "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
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) 2021 ARM Limited and Contributors.
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.
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 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
bool IsCastSupported(const TensorInfo &input, const TensorInfo &output, 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.
bool IsReduceSupported(const TensorInfo &input, const TensorInfo &output, const ReduceDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
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 })