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,6> supportedTypes = {
158 "Reference addition: input 0 is not a supported type.");
161 "Reference addition: input 1 is not a supported type.");
164 "Reference addition: output is not a supported type.");
167 "Reference addition: input 0 and Input 1 types are mismatched");
170 "Reference addition: input and output types are mismatched");
173 "Reference addition: shapes are not suitable for implicit broadcast.");
184 std::array<DataType, 6> supportedTypes =
197 "Reference ArgMinMax: input is not a supported type.");
199 "Reference ArgMinMax: output type not supported");
215 std::array<DataType, 6> supportedTypes =
228 "Reference batch normalization: input is not a supported type.");
231 "Reference batch normalization: output is not a supported type.");
234 "Reference batch normalization: input and output types are mismatched");
237 "Reference batch normalization: mean is not a supported type.");
240 "Reference batch normalization: variance is not a supported type.");
243 "Reference batch normalization: beta is not a supported type.");
246 "Reference batch normalization: gamma is not a supported type.");
260 std::string batchToSpaceNdLayerStr =
"batchToSpaceNd";
261 std::string inputTensorStr =
"input";
262 std::string outputTensorStr =
"output";
265 std::array<DataType,6> supportedTypes =
276 "Reference BatchToSpaceNd: input type not supported.");
279 "Reference BatchToSpaceNd: output type not supported.");
282 "Reference BatchToSpaceNd: input and output types mismatched.");
286 CreateIncorrectDimensionsErrorMsg(4,
288 batchToSpaceNdLayerStr,
289 outputTensorStr).data());
293 CreateIncorrectDimensionsErrorMsg(4,
295 batchToSpaceNdLayerStr,
296 inputTensorStr).data());
301 bool RefLayerSupport::IsComparisonSupported(
const TensorInfo& input0,
308 std::array<DataType, 8> supportedInputTypes =
322 "Reference comparison: input 0 is not a supported type");
325 "Reference comparison: input 0 and Input 1 types are mismatched");
328 "Reference comparison: output is not of type Boolean");
341 std::array<DataType,6> supportedTypes =
352 "Reference concatenation: output type not supported");
357 "Reference concatenation: input type not supported");
360 "Reference concatenation: input and output types mismatched.");
369 std::array<DataType,7> supportedTypes =
381 "Reference constant: output is not a supported type.");
384 bool RefLayerSupport::IsConvertBf16ToFp32Supported(
const TensorInfo& input,
391 "Reference for ConvertBf16ToFp32 layer: input type not supported");
394 "Reference for ConvertBf16ToFp32 layer: output type not supported");
406 &FalseInputFuncF32<>,
412 &FalseOutputFuncF16<>,
419 bool RefLayerSupport::IsConvertFp32ToBf16Supported(
const TensorInfo& input,
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 =
505 DataType::QuantizedSymm8PerAxis
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");
569 bool RefLayerSupport::IsDepthToSpaceSupported(
const TensorInfo& input,
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 =
639 DataType::QuantizedSymm8PerAxis
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,5> supportedInputTypes =
735 "Reference DetectionPostProcess: input 0 is not a supported type.");
738 "Reference DetectionPostProcess: input 1 is not a supported type.");
743 bool RefLayerSupport::IsDilatedDepthwiseConvolutionSupported(
const TensorInfo& input,
760 std::array<DataType,6> supportedTypes = {
770 "Reference division: input 0 is not a supported type.");
773 "Reference division: input 1 is not a supported type.");
776 "Reference division: output is not a supported type.");
779 "Reference division: input 0 and Input 1 types are mismatched");
782 "Reference division: input and output types are mismatched");
785 "Reference division: shapes are not suitable for implicit broadcast.");
790 bool RefLayerSupport::IsElementwiseUnarySupported(
const TensorInfo& input,
797 std::array<DataType, 7> supportedTypes =
811 "Reference elementwise unary: input type not supported");
814 "Reference elementwise unary: output type not supported");
817 "Reference elementwise unary: input and output types not matching");
820 "Reference elementwise unary: input and output shapes" 821 "have different number of total elements");
831 return IsComparisonSupported(input0,
835 reasonIfUnsupported);
845 std::array<DataType,1> supportedTypes =
851 "Reference fake quantization: input type not supported.");
863 std::array<DataType,4> supportedTypes =
872 "Reference Floor: input type not supported.");
875 "Reference Floor: output type not supported.");
890 std::array<DataType,6> supportedTypes =
901 "Reference Fully Connected: input type not supported.");
904 "Reference Fully Connected: output type not supported.");
907 "Reference Fully Connected: weights type not supported.");
914 reasonIfUnsupported.
value() +=
"Output tensor type must be BFloat16 or Float32 for BFloat16 input.\n";
921 "Reference Fully Connected: input and output types mismatched.");
925 std::array<DataType, 4> supportedWeightTypes =
930 DataType::QuantizedSymm8PerAxis
938 "Reference Fully Connected: weights type not supported for quantized input.");
943 "Reference Fully Connected: weights is not a supported type.");
946 "Reference Fully Connected: input and weights types mismatched.");
952 std::array<DataType, 5>
963 "Reference Fully Connected: bias type not supported.");
966 "Reference Fully Connected: bias and weight types mismatch.");
969 "Reference Fully Connected: bias type inferred from weights is incompatible.");
972 "Reference Fully Connected: bias must have 1 dimension.");
985 std::array<DataType,6> supportedTypes =
996 "Reference Gather: input type not supported");
999 "Reference Gather: output type not supported");
1002 "Reference Gather: indices (input1) type not supported");
1005 "Reference Gather: input and output types not matching");
1015 return IsComparisonSupported(input0,
1019 reasonIfUnsupported);
1028 bool RefLayerSupport::IsInstanceNormalizationSupported(
const TensorInfo& input,
1035 std::array<DataType, 3> supportedTypes =
1045 "Reference Instance Normalization: input type not supported.");
1048 "Reference Instance Normalization: output type not supported.");
1051 "Reference Instance Normalization: input and output types mismatched.");
1054 "Reference Instance Normalization: input and output shapes have different " 1055 "num total elements.");
1067 std::array<DataType, 6> supportedTypes =
1080 "Reference L2normalization: input type not supported.");
1083 "Reference L2normalization: output type not supported.");
1086 "Reference L2normalization: input and output types mismatched.");
1089 "Reference L2normalization: input and output shapes have different " 1090 "num total elements.");
1095 bool RefLayerSupport::IsLogSoftmaxSupported(
const TensorInfo& input,
1102 std::array<DataType, 3> supportedTypes =
1111 "Reference LogSoftmax: input type not supported");
1114 "Reference LogSoftmax: output type not supported");
1117 "Reference LogSoftmax: input and output types do not match");
1138 std::array<DataType,3> supportedTypes = {
1146 "Reference Lstm: input is not a supported type.");
1148 "Reference Lstm: input and outputStateIn types are mismatched");
1150 "Reference Lstm: input and cellStateIn types are mismatched");
1152 "Reference Lstm: input and scratchBuffer types are mismatched");
1154 "Reference Lstm: input and outputStateOut types are mismatched");
1156 "Reference Lstm: input and cellStateOut types are mismatched");
1158 "Reference Lstm: input and output types are mismatched");
1161 "Reference Lstm: input and InputToForgetWeights types are mismatched");
1163 "Reference Lstm: input and InputToCellWeights types are mismatched");
1165 "Reference Lstm: input and InputToOutputWeights types are mismatched");
1167 "Reference Lstm: input and RecurrentToForgetWeights types are mismatched");
1169 "Reference Lstm: input and RecurrentToCellWeights types are mismatched");
1171 "Reference Lstm: input and RecurrentToOutputWeights types are mismatched");
1173 "Reference Lstm: input and ForgetGateBias types are mismatched");
1175 "Reference Lstm: input and CellBias types are mismatched");
1177 "Reference Lstm: input and OutputGateBias types are mismatched");
1181 "Reference Lstm: input and InputToInputWeights types are mismatched");
1183 reasonIfUnsupported,
1184 "Reference Lstm: input and RecurrentToInputWeights types are mismatched");
1186 "Reference Lstm: input and InputGateBias types are mismatched");
1190 reasonIfUnsupported,
1191 "Reference Lstm: input and CellToInputWeights types are mismatched");
1197 "Reference Lstm: input and CellToForgetWeights types are mismatched");
1199 "Reference Lstm: input and CellToOutputWeights types are mismatched");
1204 "Reference Lstm: input and mProjectionWeights types are mismatched");
1208 "Reference Lstm: input and ProjectionBias types are mismatched");
1216 reasonIfUnsupported,
1217 "Reference Lstm: input and InputLayerNormWeights types are mismatched");
1220 reasonIfUnsupported,
1221 "Reference Lstm: input and ForgetLayerNormWeights types are mismatched");
1223 reasonIfUnsupported,
1224 "Reference Lstm: input and CellLayerNormWeights types are mismatched");
1226 reasonIfUnsupported,
1227 "Reference Lstm: input and OutputLayerNormWeights types are mismatched");
1240 std::array<DataType,6> supportedTypes = {
1250 "Reference maximum: input 0 is not a supported type.");
1253 "Reference maximum: input 1 is not a supported type.");
1256 "Reference maximum: output is not a supported type.");
1259 "Reference maximum: input 0 and Input 1 types are mismatched");
1262 "Reference maximum: input and output types are mismatched");
1265 "Reference maximum: shapes are not suitable for implicit broadcast.");
1276 std::string meanLayerStr =
"Mean";
1277 std::string outputTensorStr =
"output";
1279 std::array<DataType,6> supportedTypes =
1290 "Reference Mean: input type not supported.");
1293 "Reference Mean: input and output types are mismatched");
1298 reasonIfUnsupported,
1301 meanLayerStr, outputTensorStr).data());
1303 else if (descriptor.
m_Axis.empty())
1306 reasonIfUnsupported,
1308 meanLayerStr, outputTensorStr).data());
1317 reasonIfUnsupported,
1319 meanLayerStr, outputTensorStr).data());
1324 reasonIfUnsupported,
1326 meanLayerStr, outputTensorStr).data());
1347 std::array<DataType,7> supportedTypes =
1359 "Reference MemCopy: input type not supported");
1362 "Reference MemCopy: output type not supported");
1365 "Reference MemCopy: input and output types are mismatched");
1377 std::array<DataType,6> supportedTypes = {
1387 "Reference minimum: input 0 is not a supported type.");
1390 "Reference minimum: input 1 is not a supported type.");
1393 "Reference minimum: output is not a supported type.");
1396 "Reference minimum: input 0 and Input 1 types are mismatched");
1399 "Reference minimum: input and output types are mismatched");
1402 "Reference minimum: shapes are not suitable for implicit broadcast.");
1414 std::array<DataType,6> supportedTypes = {
1424 "Reference multiplication: input 0 is not a supported type.");
1427 "Reference multiplication: input 1 is not a supported type.");
1430 "Reference multiplication: output is not a supported type.");
1433 "Reference multiplication: input 0 and Input 1 types are mismatched");
1436 "Reference multiplication: input and output types are mismatched");
1439 "Reference multiplication: shapes are not suitable for implicit broadcast.");
1452 std::array<DataType, 6> supportedTypes =
1465 "Reference normalization: input type not supported.");
1468 "Reference normalization: output type not supported.");
1471 "Reference normalization: input and output shapes have different " 1472 "num total elements.");
1492 std::array<DataType,6> supportedTypes =
1503 "Reference pad: input is not a supported type.");
1506 "Reference pad: output is not a supported type.");
1509 "Reference pad: input and output types are mismatched.");
1523 std::array<DataType, 6> supportedTypes =
1534 "Reference permute: input is not a supported type.");
1537 "Reference permute: output is not a supported type.");
1540 "Reference permute: input and output types are mismatched.");
1554 std::array<DataType,6> supportedTypes =
1565 "Reference poolind2d: input is not a supported type.");
1568 "Reference poolind2d: output is not a supported type.");
1571 "Reference poolind2d: input and output types are mismatched.");
1607 std::array<DataType,7> supportedInputTypes = {
1618 "Reference quantize: input type not supported.");
1621 std::array<DataType,4> supportedOutputTypes = {
1628 "Reference quantize: output type not supported.");
1631 "Reference quantize: input and output shapes have different num total elements.");
1644 std::array<DataType,7> supportedOutputTypes =
1656 "Reference reshape: input type not supported.");
1664 std::array<DataType,6> supportedTypes =
1675 "Reference ResizeBilinear: input type not supported");
1678 "Reference ResizeBilinear: output type not supported");
1681 "Reference ResizeBilinear: input and output types not matching");
1693 std::array<DataType,6> supportedTypes =
1704 "Reference Resize: input type not supported");
1707 "Reference Resize: output type not supported");
1710 "Reference Resize: input and output types not matching");
1719 return IsElementwiseUnarySupported(input,
1722 reasonIfUnsupported);
1733 std::array<DataType, 5> supportedTypes =
1743 "Reference Slice: input type not supported");
1746 "Reference Slice: output type not supported");
1749 "Reference Slice: input and output types are mismatched");
1761 std::array<DataType,7> supportedTypes =
1773 "Reference Softmax: output type not supported");
1776 "Reference Softmax: input type not supported");
1779 "Reference Softmax: input type not supported");
1791 std::array<DataType,6> supportedTypes =
1802 "Reference SpaceToBatchNd: input type not supported");
1805 "Reference SpaceToBatchNd: output type not supported");
1808 "Reference SpaceToBatchNd: input and output types are mismatched");
1822 std::array<DataType,6> supportedTypes =
1833 "Reference SpaceToDepth: input type not supported");
1836 "Reference SpaceToDepth: output type not supported");
1839 "Reference SpaceToDepth: input and output types are mismatched");
1850 std::array<DataType,6> supportedTypes =
1861 "Reference splitter: input type not supported");
1867 const std::vector<std::reference_wrapper<TensorInfo>>& outputs,
1873 std::array<DataType,6> supportedTypes =
1884 "Reference splitter: output type not supported");
1888 "Reference splitter: input type not supported");
1891 "Reference splitter: input and output types mismatched.");
1905 std::array<DataType,6> supportedTypes =
1916 "Reference stack: output type not supported");
1921 "Reference stack: input type not supported");
1924 "Reference stack: input and output types mismatched.");
1938 std::array<DataType,5> supportedTypes =
1948 "Reference StridedSlice: input type not supported");
1951 "Reference StridedSlice: output type not supported");
1954 "Reference StridedSlice: input and output types are mismatched");
1966 std::array<DataType,6> supportedTypes = {
1976 "Reference subtraction: input 0 is not a supported type.");
1979 "Reference subtraction: input 1 is not a supported type.");
1982 "Reference subtraction: output is not a supported type.");
1985 "Reference subtraction: input 0 and Input 1 types are mismatched");
1988 "Reference subtraction: input and output types are mismatched");
1991 "Reference subtraction: shapes are not suitable for implicit broadcast.");
2003 std::array<DataType, 6> supportedTypes
2014 "PReLU: input is not a supported type.");
2017 "PReLU: alpha is not a supported type.");
2020 "PReLU: output is not a supported type.");
2023 "PReLU: input, alpha and output types are mismatched");
2026 "PReLU: shapes are not suitable for implicit broadcast");
2041 std::array<DataType,7> supportedTypes =
2053 "Reference TransposeConvolution2d: input is not a supported type.");
2056 "Reference TransposeConvolution2d: output is not a supported type.");
2059 "Reference TransposeConvolution2d: input and output types mismatched.");
2066 std::array<DataType, 4> supportedWeightTypes =
2071 DataType::QuantizedSymm8PerAxis
2076 "Reference TransposeConvolution2d: weights type not supported for " 2077 "quantized input.");
2082 "Reference TransposeConvolution2d: weights is not a supported type.");
2085 "Reference TransposeConvolution2d: input and weights types mismatched.");
2090 std::array<DataType,4> biasesSupportedTypes =
2098 "Reference TransposeConvolution2d: biases is not a supported type.");
2104 bool RefLayerSupport::IsTransposeSupported(
const TensorInfo& input,
2113 std::array<DataType, 6> supportedTypes =
2124 "Reference transpose: input is not a supported type.");
2127 "Reference transpose: output is not a supported type.");
2130 "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.
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).
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 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 })