16 #include <boost/cast.hpp> 21 using namespace boost;
29 template<
typename Float32Func,
typename Uint8Func,
typename ... Params>
30 bool IsSupportedForDataTypeRef(Optional<std::string&> reasonIfUnsupported,
32 Float32Func floatFuncPtr,
33 Uint8Func uint8FuncPtr,
38 &FalseFunc<Params...>,
41 &FalseFunc<Params...>,
42 &FalseFunc<Params...>,
43 std::forward<Params>(params)...);
51 std::string CreateIncorrectDimensionsErrorMsg(
unsigned int expected,
53 std::string& layerStr,
54 std::string& tensorName)
56 std::string errorMsg =
"Reference " + layerStr +
": Expected " + std::to_string(expected) +
" dimensions but got" +
57 " " + std::to_string(actual) +
" dimensions instead, for the '" + tensorName +
"' tensor.";
67 return IsElementwiseUnarySupported(input,
81 std::array<DataType,6> supportedTypes = {
91 "Reference activation: input type not supported.");
94 "Reference activation: output type not supported.");
97 "Reference activation: input and output types mismatched.");
100 "Reference activation: input and output shapes are of different rank.");
103 struct ActivationFunctionSupported :
public Rule 109 case ActivationFunction::Abs:
110 case ActivationFunction::BoundedReLu:
111 case ActivationFunction::Elu:
112 case ActivationFunction::HardSwish:
113 case ActivationFunction::LeakyReLu:
114 case ActivationFunction::Linear:
115 case ActivationFunction::ReLu:
116 case ActivationFunction::Sigmoid:
117 case ActivationFunction::SoftReLu:
118 case ActivationFunction::Sqrt:
119 case ActivationFunction::Square:
120 case ActivationFunction::TanH:
135 supported &=
CheckSupportRule(ActivationFunctionSupported(descriptor), reasonIfUnsupported,
136 "Reference activation: function not supported.");
148 std::array<DataType,7> supportedTypes = {
159 "Reference addition: input 0 is not a supported type.");
162 "Reference addition: input 1 is not a supported type.");
165 "Reference addition: output is not a supported type.");
168 "Reference addition: input 0 and Input 1 types are mismatched");
171 "Reference addition: input and output types are mismatched");
174 "Reference addition: shapes are not suitable for implicit broadcast.");
185 std::array<DataType, 7> supportedTypes =
199 "Reference ArgMinMax: input is not a supported type.");
201 "Reference ArgMinMax: output type not supported");
217 std::array<DataType, 6> supportedTypes =
230 "Reference batch normalization: input is not a supported type.");
233 "Reference batch normalization: output is not a supported type.");
236 "Reference batch normalization: input and output types are mismatched");
239 "Reference batch normalization: mean is not a supported type.");
242 "Reference batch normalization: variance is not a supported type.");
245 "Reference batch normalization: beta is not a supported type.");
248 "Reference batch normalization: gamma is not a supported type.");
262 std::string batchToSpaceNdLayerStr =
"batchToSpaceNd";
263 std::string inputTensorStr =
"input";
264 std::string outputTensorStr =
"output";
267 std::array<DataType,6> supportedTypes =
278 "Reference BatchToSpaceNd: input type not supported.");
281 "Reference BatchToSpaceNd: output type not supported.");
284 "Reference BatchToSpaceNd: input and output types mismatched.");
288 CreateIncorrectDimensionsErrorMsg(4,
290 batchToSpaceNdLayerStr,
291 outputTensorStr).data());
295 CreateIncorrectDimensionsErrorMsg(4,
297 batchToSpaceNdLayerStr,
298 inputTensorStr).data());
303 bool RefLayerSupport::IsComparisonSupported(
const TensorInfo& input0,
310 std::array<DataType, 8> supportedInputTypes =
324 "Reference comparison: input 0 is not a supported type");
327 "Reference comparison: input 0 and Input 1 types are mismatched");
330 "Reference comparison: output is not of type Boolean");
343 std::array<DataType,6> supportedTypes =
354 "Reference concatenation: output type not supported");
359 "Reference concatenation: input type not supported");
362 "Reference concatenation: input and output types mismatched.");
371 std::array<DataType,8> supportedTypes =
384 "Reference constant: output is not a supported type.");
387 bool RefLayerSupport::IsConvertBf16ToFp32Supported(
const TensorInfo& input,
394 "Reference for ConvertBf16ToFp32 layer: input type not supported");
397 "Reference for ConvertBf16ToFp32 layer: output type not supported");
409 &FalseInputFuncF32<>,
415 &FalseOutputFuncF16<>,
422 bool RefLayerSupport::IsConvertFp32ToBf16Supported(
const TensorInfo& input,
429 "Reference for ConvertFp32ToBf16 layer: input type not supported");
432 "Reference for ConvertFp32ToBf16 layer: output type not supported");
443 &FalseInputFuncF16<>,
451 &FalseOutputFuncF32<>,
467 std::array<DataType,7> supportedTypes =
479 "Reference Convolution2d: input is not a supported type.");
482 "Reference Convolution2d: output is not a supported type.");
489 reasonIfUnsupported.
value() +=
"Output tensor type must be BFloat16 or Float32 for BFloat16 input.\n";
496 "Reference Convolution2d: input and output types mismatched.");
503 std::array<DataType, 4> supportedWeightTypes =
508 DataType::QuantizedSymm8PerAxis
513 "Reference Convolution2d: weights type not supported for quantized input.");
518 "Reference Convolution2d: weights is not a supported type.");
521 "Reference Convolution2d: input and weights types mismatched.");
526 std::array<DataType,4> biasesSupportedTypes =
535 "Reference Convolution2d: biases is not a supported type.");
548 std::array<DataType, 8> supportedTypes =
561 "Reference for Debug layer: input type not supported");
564 "Reference for Debug layer: output type not supported");
567 "Reference for Debug layer: input and output types are mismatched");
572 bool RefLayerSupport::IsDepthToSpaceSupported(
const TensorInfo& input,
580 std::array<DataType,6> supportedTypes =
591 "Reference DepthToSpace: input type not supported");
594 "Reference DepthToSpace: output type not supported");
597 "Reference DepthToSpace: input and output types are mismatched");
613 std::array<DataType,7> supportedTypes =
625 "Reference DepthwiseConvolution2d: input is not a supported type.");
628 "Reference DepthwiseConvolution2d: output is not a supported type.");
631 "Reference DepthwiseConvolution2d: input and output types mismatched.");
637 std::array<DataType, 4> supportedWeightTypes =
642 DataType::QuantizedSymm8PerAxis
647 "Reference DepthwiseConvolution2d: weights type not supported for " 653 "Reference DepthwiseConvolution2d: weights is not a supported type.");
656 "Reference DepthwiseConvolution2d: input and weights types mismatched.");
661 std::array<DataType,4> biasesSupportedTypes =
669 "Reference DepthwiseConvolution2d: biases is not a supported type.");
682 std::array<DataType,4> supportedInputTypes = {
690 "Reference for Dequantize layer: input type not supported.");
693 "Reference for Dequantize layer: per-axis quantized input not support .");
696 "Reference dequantize: per-axis quantized input not support .");
698 std::array<DataType,3> supportedOutputTypes = {
705 "Reference for Dequantize layer: output type not supported.");
708 "Reference for Dequantize layer: input/output shapes have different num total " 724 IgnoreUnused(anchors, detectionBoxes, detectionClasses, detectionScores, numDetections, descriptor);
728 std::array<DataType,5> supportedInputTypes =
738 "Reference DetectionPostProcess: input 0 is not a supported type.");
741 "Reference DetectionPostProcess: input 1 is not a supported type.");
746 bool RefLayerSupport::IsDilatedDepthwiseConvolutionSupported(
const TensorInfo& input,
763 std::array<DataType,7> supportedTypes = {
774 "Reference division: input 0 is not a supported type.");
777 "Reference division: input 1 is not a supported type.");
780 "Reference division: output is not a supported type.");
783 "Reference division: input 0 and Input 1 types are mismatched");
786 "Reference division: input and output types are mismatched");
789 "Reference division: shapes are not suitable for implicit broadcast.");
794 bool RefLayerSupport::IsElementwiseUnarySupported(
const TensorInfo& input,
801 std::array<DataType, 7> supportedTypes =
815 "Reference elementwise unary: input type not supported");
818 "Reference elementwise unary: output type not supported");
821 "Reference elementwise unary: input and output types not matching");
824 "Reference elementwise unary: input and output shapes" 825 "have different number of total elements");
835 return IsComparisonSupported(input0,
839 reasonIfUnsupported);
849 std::array<DataType,1> supportedTypes =
855 "Reference fake quantization: input type not supported.");
860 bool RefLayerSupport::IsFillSupported(
const TensorInfo& input,
870 std::array<DataType,3> supportedTypes =
878 "Reference Fill: input type not supported.");
881 "Reference Fill: output type not supported.");
892 std::array<DataType,3> supportedTypes =
900 "Reference Floor: input type not supported.");
903 "Reference Floor: output type not supported.");
918 std::array<DataType,6> supportedTypes =
929 "Reference Fully Connected: input type not supported.");
932 "Reference Fully Connected: output type not supported.");
935 "Reference Fully Connected: weights type not supported.");
942 reasonIfUnsupported.
value() +=
"Output tensor type must be BFloat16 or Float32 for BFloat16 input.\n";
949 "Reference Fully Connected: input and output types mismatched.");
953 "Reference Fully Connected: weights is not a supported type.");
956 "Reference Fully Connected: input and weights types mismatched.");
961 std::array<DataType, 5>
972 "Reference Fully Connected: bias type not supported.");
975 "Reference Fully Connected: bias and weight types mismatch.");
978 "Reference Fully Connected: bias type inferred from weights is incompatible.");
981 "Reference Fully Connected: bias must have 1 dimension.");
995 std::array<DataType,7> supportedTypes =
1006 if (descriptor.
m_Axis != 0)
1008 reasonIfUnsupported.
value() += std::string(
"Reference Gather: axis not supported\n");
1012 "Reference Gather: input type not supported");
1015 "Reference Gather: output type not supported");
1018 "Reference Gather: indices (input1) type not supported");
1021 "Reference Gather: input and output types not matching");
1031 return IsComparisonSupported(input0,
1035 reasonIfUnsupported);
1044 bool RefLayerSupport::IsInstanceNormalizationSupported(
const TensorInfo& input,
1051 std::array<DataType, 3> supportedTypes =
1061 "Reference Instance Normalization: input type not supported.");
1064 "Reference Instance Normalization: output type not supported.");
1067 "Reference Instance Normalization: input and output types mismatched.");
1070 "Reference Instance Normalization: input and output shapes have different " 1071 "num total elements.");
1083 std::array<DataType, 6> supportedTypes =
1096 "Reference L2normalization: input type not supported.");
1099 "Reference L2normalization: output type not supported.");
1102 "Reference L2normalization: input and output types mismatched.");
1105 "Reference L2normalization: input and output shapes have different " 1106 "num total elements.");
1111 bool RefLayerSupport::IsLogSoftmaxSupported(
const TensorInfo& input,
1118 std::array<DataType, 3> supportedTypes =
1127 "Reference LogSoftmax: input type not supported");
1130 "Reference LogSoftmax: output type not supported");
1133 "Reference LogSoftmax: input and output types do not match");
1154 std::array<DataType,3> supportedTypes = {
1162 "Reference Lstm: input is not a supported type.");
1164 "Reference Lstm: input and outputStateIn types are mismatched");
1166 "Reference Lstm: input and cellStateIn types are mismatched");
1168 "Reference Lstm: input and scratchBuffer types are mismatched");
1170 "Reference Lstm: input and outputStateOut types are mismatched");
1172 "Reference Lstm: input and cellStateOut types are mismatched");
1174 "Reference Lstm: input and output types are mismatched");
1177 "Reference Lstm: input and InputToForgetWeights types are mismatched");
1179 "Reference Lstm: input and InputToCellWeights types are mismatched");
1181 "Reference Lstm: input and InputToOutputWeights types are mismatched");
1183 "Reference Lstm: input and RecurrentToForgetWeights types are mismatched");
1185 "Reference Lstm: input and RecurrentToCellWeights types are mismatched");
1187 "Reference Lstm: input and RecurrentToOutputWeights types are mismatched");
1189 "Reference Lstm: input and ForgetGateBias types are mismatched");
1191 "Reference Lstm: input and CellBias types are mismatched");
1193 "Reference Lstm: input and OutputGateBias types are mismatched");
1197 "Reference Lstm: input and InputToInputWeights types are mismatched");
1199 reasonIfUnsupported,
1200 "Reference Lstm: input and RecurrentToInputWeights types are mismatched");
1202 "Reference Lstm: input and InputGateBias types are mismatched");
1206 reasonIfUnsupported,
1207 "Reference Lstm: input and CellToInputWeights types are mismatched");
1213 "Reference Lstm: input and CellToForgetWeights types are mismatched");
1215 "Reference Lstm: input and CellToOutputWeights types are mismatched");
1220 "Reference Lstm: input and mProjectionWeights types are mismatched");
1224 "Reference Lstm: input and ProjectionBias types are mismatched");
1232 reasonIfUnsupported,
1233 "Reference Lstm: input and InputLayerNormWeights types are mismatched");
1236 reasonIfUnsupported,
1237 "Reference Lstm: input and ForgetLayerNormWeights types are mismatched");
1239 reasonIfUnsupported,
1240 "Reference Lstm: input and CellLayerNormWeights types are mismatched");
1242 reasonIfUnsupported,
1243 "Reference Lstm: input and OutputLayerNormWeights types are mismatched");
1256 std::array<DataType,7> supportedTypes = {
1267 "Reference maximum: input 0 is not a supported type.");
1270 "Reference maximum: input 1 is not a supported type.");
1273 "Reference maximum: output is not a supported type.");
1276 "Reference maximum: input 0 and Input 1 types are mismatched");
1279 "Reference maximum: input and output types are mismatched");
1282 "Reference maximum: shapes are not suitable for implicit broadcast.");
1293 std::string meanLayerStr =
"Mean";
1294 std::string outputTensorStr =
"output";
1296 std::array<DataType,6> supportedTypes =
1307 "Reference Mean: input type not supported.");
1310 "Reference Mean: input and output types are mismatched");
1315 reasonIfUnsupported,
1318 meanLayerStr, outputTensorStr).data());
1320 else if (descriptor.
m_Axis.empty())
1323 reasonIfUnsupported,
1325 meanLayerStr, outputTensorStr).data());
1334 reasonIfUnsupported,
1336 meanLayerStr, outputTensorStr).data());
1341 reasonIfUnsupported,
1343 meanLayerStr, outputTensorStr).data());
1364 std::array<DataType,7> supportedTypes =
1376 "Reference MemCopy: input type not supported");
1379 "Reference MemCopy: output type not supported");
1382 "Reference MemCopy: input and output types are mismatched");
1394 std::array<DataType,7> supportedTypes = {
1405 "Reference minimum: input 0 is not a supported type.");
1408 "Reference minimum: input 1 is not a supported type.");
1411 "Reference minimum: output is not a supported type.");
1414 "Reference minimum: input 0 and Input 1 types are mismatched");
1417 "Reference minimum: input and output types are mismatched");
1420 "Reference minimum: shapes are not suitable for implicit broadcast.");
1432 std::array<DataType,7> supportedTypes = {
1443 "Reference multiplication: input 0 is not a supported type.");
1446 "Reference multiplication: input 1 is not a supported type.");
1449 "Reference multiplication: output is not a supported type.");
1452 "Reference multiplication: input 0 and Input 1 types are mismatched");
1455 "Reference multiplication: input and output types are mismatched");
1458 "Reference multiplication: shapes are not suitable for implicit broadcast.");
1471 std::array<DataType, 6> supportedTypes =
1484 "Reference normalization: input type not supported.");
1487 "Reference normalization: output type not supported.");
1490 "Reference normalization: input and output shapes have different " 1491 "num total elements.");
1511 std::array<DataType,6> supportedTypes =
1522 "Reference pad: input is not a supported type.");
1525 "Reference pad: output is not a supported type.");
1528 "Reference pad: input and output types are mismatched.");
1542 std::array<DataType, 6> supportedTypes =
1553 "Reference permute: input is not a supported type.");
1556 "Reference permute: output is not a supported type.");
1559 "Reference permute: input and output types are mismatched.");
1573 std::array<DataType,6> supportedTypes =
1584 "Reference poolind2d: input is not a supported type.");
1587 "Reference poolind2d: output is not a supported type.");
1590 "Reference poolind2d: input and output types are mismatched.");
1626 std::array<DataType,7> supportedInputTypes = {
1637 "Reference quantize: input type not supported.");
1640 std::array<DataType,4> supportedOutputTypes = {
1647 "Reference quantize: output type not supported.");
1650 "Reference quantize: input and output shapes have different num total elements.");
1661 std::array<DataType,1> supportedOutputTypes =
1667 "Reference rank: input type not supported.");
1678 std::array<DataType,7> supportedOutputTypes =
1690 "Reference reshape: input type not supported.");
1698 std::array<DataType,6> supportedTypes =
1709 "Reference ResizeBilinear: input type not supported");
1712 "Reference ResizeBilinear: output type not supported");
1715 "Reference ResizeBilinear: input and output types not matching");
1727 std::array<DataType,6> supportedTypes =
1738 "Reference Resize: input type not supported");
1741 "Reference Resize: output type not supported");
1744 "Reference Resize: input and output types not matching");
1753 return IsElementwiseUnarySupported(input,
1756 reasonIfUnsupported);
1767 std::array<DataType, 5> supportedTypes =
1777 "Reference Slice: input type not supported");
1780 "Reference Slice: output type not supported");
1783 "Reference Slice: input and output types are mismatched");
1795 std::array<DataType,7> supportedTypes =
1807 "Reference Softmax: output type not supported");
1810 "Reference Softmax: input type not supported");
1813 "Reference Softmax: input type not supported");
1825 std::array<DataType,6> supportedTypes =
1836 "Reference SpaceToBatchNd: input type not supported");
1839 "Reference SpaceToBatchNd: output type not supported");
1842 "Reference SpaceToBatchNd: input and output types are mismatched");
1856 std::array<DataType,6> supportedTypes =
1867 "Reference SpaceToDepth: input type not supported");
1870 "Reference SpaceToDepth: output type not supported");
1873 "Reference SpaceToDepth: input and output types are mismatched");
1884 std::array<DataType,6> supportedTypes =
1895 "Reference splitter: input type not supported");
1901 const std::vector<std::reference_wrapper<TensorInfo>>& outputs,
1907 std::array<DataType,6> supportedTypes =
1918 "Reference splitter: output type not supported");
1922 "Reference splitter: input type not supported");
1925 "Reference splitter: input and output types mismatched.");
1939 std::array<DataType,6> supportedTypes =
1950 "Reference stack: output type not supported");
1955 "Reference stack: input type not supported");
1958 "Reference stack: input and output types mismatched.");
1972 std::array<DataType,5> supportedTypes =
1982 "Reference StridedSlice: input type not supported");
1985 "Reference StridedSlice: output type not supported");
1988 "Reference StridedSlice: input and output types are mismatched");
2000 std::array<DataType,7> supportedTypes = {
2011 "Reference subtraction: input 0 is not a supported type.");
2014 "Reference subtraction: input 1 is not a supported type.");
2017 "Reference subtraction: output is not a supported type.");
2020 "Reference subtraction: input 0 and Input 1 types are mismatched");
2023 "Reference subtraction: input and output types are mismatched");
2026 "Reference subtraction: shapes are not suitable for implicit broadcast.");
2038 std::array<DataType, 6> supportedTypes
2049 "PReLU: input is not a supported type.");
2052 "PReLU: alpha is not a supported type.");
2055 "PReLU: output is not a supported type.");
2058 "PReLU: input, alpha and output types are mismatched");
2061 "PReLU: shapes are not suitable for implicit broadcast");
2076 std::array<DataType,7> supportedTypes =
2088 "Reference TransposeConvolution2d: input is not a supported type.");
2091 "Reference TransposeConvolution2d: output is not a supported type.");
2094 "Reference TransposeConvolution2d: input and output types mismatched.");
2101 std::array<DataType, 4> supportedWeightTypes =
2106 DataType::QuantizedSymm8PerAxis
2111 "Reference TransposeConvolution2d: weights type not supported for " 2112 "quantized input.");
2117 "Reference TransposeConvolution2d: weights is not a supported type.");
2120 "Reference TransposeConvolution2d: input and weights types mismatched.");
2125 std::array<DataType,4> biasesSupportedTypes =
2133 "Reference TransposeConvolution2d: biases is not a supported type.");
2139 bool RefLayerSupport::IsTransposeSupported(
const TensorInfo& input,
2148 std::array<DataType, 6> supportedTypes =
2159 "Reference transpose: input is not a supported type.");
2162 "Reference transpose: output is not a supported type.");
2165 "Reference transpose: input and output types are mismatched.");
bool m_ProjectionEnabled
Enable/disable the projection layer.
bool IsSoftmaxSupported(const BackendId &backend, const TensorInfo &input, const TensorInfo &output, const SoftmaxDescriptor &descriptor, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
bool IsDequantizeSupported(const BackendId &backend, const TensorInfo &input, const TensorInfo &output, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
bool IsDivisionSupported(const BackendId &backend, const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
bool IsConvertFp32ToFp16Supported(const BackendId &backend, const TensorInfo &input, const TensorInfo &output, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
bool IsConcatSupported(const BackendId &backend, const std::vector< const TensorInfo *> inputs, const TensorInfo &output, const OriginsDescriptor &descriptor, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
A ViewsDescriptor for the SplitterLayer.
bool IsPooling2dSupported(const BackendId &backend, const TensorInfo &input, const TensorInfo &output, const Pooling2dDescriptor &descriptor, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
A TransposeConvolution2dDescriptor for the TransposeConvolution2dLayer.
bool IsL2NormalizationSupported(const BackendId &backend, const TensorInfo &input, const TensorInfo &output, const L2NormalizationDescriptor &descriptor, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
A ReshapeDescriptor for the ReshapeLayer.
bool IsArgMinMaxSupported(const BackendId &backend, const TensorInfo &input, const TensorInfo &output, const ArgMinMaxDescriptor &descriptor, char *reasonIfUnsupported, size_t reasonIfUnsupportedMaxLength)
#define ARMNN_NO_DEPRECATE_WARN_BEGIN
bool IsBatchToSpaceNdSupported(const BackendId &backend, const TensorInfo &input, const TensorInfo &output, const BatchToSpaceNdDescriptor &descriptor, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
A ComparisonDescriptor for the ComparisonLayer.
bool IsMeanSupported(const BackendId &backend, const TensorInfo &input, const TensorInfo &output, const MeanDescriptor &descriptor, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
bool IsMultiplicationSupported(const BackendId &backend, const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
ISubgraphViewConverter supported
A Convolution2dDescriptor for the Convolution2dLayer.
bool IsDebugSupported(const BackendId &backend, const TensorInfo &input, const TensorInfo &output, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
bool IsConvertFp16ToFp32Supported(const BackendId &backend, const TensorInfo &input, const TensorInfo &output, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
bool IsPreluSupported(const BackendId &backend, const TensorInfo &input, const TensorInfo &alpha, const TensorInfo &output, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
bool IsFullyConnectedSupported(const BackendId &backend, const TensorInfo &input, const TensorInfo &output, const TensorInfo &weights, const TensorInfo &biases, const FullyConnectedDescriptor &descriptor, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
bool IsTransposeConvolution2dSupported(const BackendId &backend, const TensorInfo &input, const TensorInfo &output, const TransposeConvolution2dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
bool IsEqualSupported(const BackendId &backend, const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
bool IsDepthwiseConvolutionSupported(const BackendId &backend, const TensorInfo &input, const TensorInfo &output, const DepthwiseConvolution2dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
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 IsGreaterSupported(const BackendId &backend, const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
bool IsPadSupported(const BackendId &backend, const TensorInfo &input, const TensorInfo &output, const PadDescriptor &descriptor, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
Copyright (c) 2020 ARM Limited.
bool IsNormalizationSupported(const BackendId &backend, const TensorInfo &input, const TensorInfo &output, const NormalizationDescriptor &descriptor, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
void IgnoreUnused(Ts &&...)
A SpaceToDepthDescriptor for the SpaceToDepthLayer.
A BatchToSpaceNdDescriptor for the BatchToSpaceNdLayer.
bool IsAdditionSupported(const BackendId &backend, const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
A ResizeDescriptor for the ResizeLayer.
std::vector< unsigned int > m_Axis
Values for the dimensions to reduce.
A StackDescriptor for the StackLayer.
bool IsResizeSupported(const BackendId &backend, const TensorInfo &input, const TensorInfo &output, const ResizeDescriptor &descriptor, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
constexpr bool IsQuantized8BitType(DataType dataType)
bool IsFloorSupported(const BackendId &backend, const TensorInfo &input, const TensorInfo &output, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
bool IsInputSupported(const BackendId &backend, const TensorInfo &input, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
bool IsMemCopySupported(const BackendId &backend, const TensorInfo &input, const TensorInfo &output, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
A PadDescriptor for the PadLayer.
bool IsConstantSupported(const BackendId &backend, const TensorInfo &output, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
bool IsQLstmSupported(const BackendId &backend, const TensorInfo &input, const TensorInfo &previousOutputIn, const TensorInfo &previousCellStateIn, const TensorInfo &outputStateOut, const TensorInfo &cellStateOut, const TensorInfo &output, const QLstmDescriptor &descriptor, const LstmInputParamsInfo ¶msInfo, char *reasonIfUnsupported, size_t reasonIfUnsupportedMaxLength)
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 IsRsqrtSupported(const BackendId &backend, const TensorInfo &input, const TensorInfo &output, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
A L2NormalizationDescriptor for the L2NormalizationLayer.
An ArgMinMaxDescriptor for ArgMinMaxLayer.
bool IsOutputSupported(const BackendId &backend, const TensorInfo &output, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
DataType GetDataType() const
An OriginsDescriptor for the ConcatLayer.
bool IsLstmSupported(const BackendId &backend, 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, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
bool has_value() const noexcept
A FullyConnectedDescriptor for the FullyConnectedLayer.
bool IsFakeQuantizationSupported(const BackendId &backend, const TensorInfo &input, const FakeQuantizationDescriptor &descriptor, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
bool m_BiasEnabled
Enable/disable bias.
bool IsStridedSliceSupported(const BackendId &backend, const TensorInfo &input, const TensorInfo &output, const StridedSliceDescriptor &descriptor, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
bool IsStackSupported(const BackendId &backend, const std::vector< const TensorInfo *> inputs, const TensorInfo &output, const StackDescriptor &descriptor, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
bool IsSubtractionSupported(const BackendId &backend, const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
A FakeQuantizationDescriptor for the FakeQuantizationLayer.
bool IsResizeBilinearSupported(const BackendId &backend, const TensorInfo &input, const TensorInfo &output, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
A GatherDescriptor for the GatherLayer.
bool m_PeepholeEnabled
Enable/disable peephole.
bool IsPermuteSupported(const BackendId &backend, const TensorInfo &input, const TensorInfo &output, const PermuteDescriptor &descriptor, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
bool IsQuantizeSupported(const BackendId &backend, const TensorInfo &input, const TensorInfo &output, char *reasonIfUnsupported, size_t reasonIfUnsupportedMaxLength)
#define ARMNN_ASSERT(COND)
A QLstmDescriptor for the QLstmLayer.
std::enable_if_t< std::is_unsigned< Source >::value &&std::is_unsigned< Dest >::value, Dest > numeric_cast(Source source)
bool IsSpaceToBatchNdSupported(const BackendId &backend, const TensorInfo &input, const TensorInfo &output, const SpaceToBatchNdDescriptor &descriptor, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
bool IsBatchNormalizationSupported(const BackendId &backend, const TensorInfo &input, const TensorInfo &output, const TensorInfo &mean, const TensorInfo &var, const TensorInfo &beta, const TensorInfo &gamma, const BatchNormalizationDescriptor &descriptor, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
bool IsActivationSupported(const BackendId &backend, const TensorInfo &input, const TensorInfo &output, const ActivationDescriptor &descriptor, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
An ActivationDescriptor for the ActivationLayer.
bool IsSplitterSupported(const BackendId &backend, const TensorInfo &input, const ViewsDescriptor &descriptor, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
A SliceDescriptor for the SliceLayer.
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.
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 IsConvolution2dSupported(const BackendId &backend, const TensorInfo &input, const TensorInfo &output, const Convolution2dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
A MeanDescriptor for the MeanLayer.
bool IsMergerSupported(const BackendId &backend, const std::vector< const TensorInfo *> inputs, const TensorInfo &output, const OriginsDescriptor &descriptor, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
bool IsMaximumSupported(const BackendId &backend, const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, char *reasonIfUnSupported=nullptr, size_t reasonIfUnSupportedMaxLength=0)
Deprecated in favor of IBackend and ILayerSupport interfaces.
bool m_LayerNormEnabled
Enable/disable layer normalization.
A TransposeDescriptor for the TransposeLayer.
A StridedSliceDescriptor for the StridedSliceLayer.
bool IsGatherSupported(const BackendId &backend, const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, char *reasonIfUnsupported, size_t reasonIfUnsupportedMaxLength)
A Pooling2dDescriptor for the Pooling2dLayer.
bool IsSpaceToDepthSupported(const BackendId &backend, const TensorInfo &input, const TensorInfo &output, const SpaceToDepthDescriptor &descriptor, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
A NormalizationDescriptor for the NormalizationLayer.
An InstanceNormalizationDescriptor for InstanceNormalizationLayer.
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)
bool IsMinimumSupported(const BackendId &backend, const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
ActivationFunction m_Function
The activation function to use (Sigmoid, TanH, Linear, ReLu, BoundedReLu, SoftReLu, LeakyReLu, Abs, Sqrt, Square, Elu).
A DepthwiseConvolution2dDescriptor for the DepthwiseConvolution2dLayer.
A FillDescriptor for the FillLayer.
A BatchNormalizationDescriptor for the BatchNormalizationLayer.
bool IsDetectionPostProcessSupported(const BackendId &backend, const TensorInfo &input0, const TensorInfo &input1, const DetectionPostProcessDescriptor &descriptor, char *reasonIfUnsupported, size_t reasonIfUnsupportedMaxLength)
A PermuteDescriptor for the PermuteLayer.
bool IsReshapeSupported(const BackendId &backend, const TensorInfo &input, const ReshapeDescriptor &descriptor, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
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 })