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, 5> supportedTypes =
196 "Reference ArgMinMax: input is not a supported type.");
198 "Reference ArgMinMax: output type not supported");
214 std::array<DataType, 5> supportedTypes =
226 "Reference batch normalization: input is not a supported type.");
229 "Reference batch normalization: output is not a supported type.");
232 "Reference batch normalization: input and output types are mismatched");
235 "Reference batch normalization: mean is not a supported type.");
238 "Reference batch normalization: variance is not a supported type.");
241 "Reference batch normalization: beta is not a supported type.");
244 "Reference batch normalization: gamma is not a supported type.");
258 std::string batchToSpaceNdLayerStr =
"batchToSpaceNd";
259 std::string inputTensorStr =
"input";
260 std::string outputTensorStr =
"output";
263 std::array<DataType,5> supportedTypes =
273 "Reference BatchToSpaceNd: input type not supported.");
276 "Reference BatchToSpaceNd: output type not supported.");
279 "Reference BatchToSpaceNd: input and output types mismatched.");
283 CreateIncorrectDimensionsErrorMsg(4,
285 batchToSpaceNdLayerStr,
286 outputTensorStr).data());
290 CreateIncorrectDimensionsErrorMsg(4,
292 batchToSpaceNdLayerStr,
293 inputTensorStr).data());
298 bool RefLayerSupport::IsComparisonSupported(
const TensorInfo& input0,
306 std::array<DataType, 5> supportedInputTypes =
317 "Reference comparison: input 0 is not a supported type");
320 "Reference comparison: input 0 and Input 1 types are mismatched");
323 "Reference comparison: output is not of type Boolean");
336 std::array<DataType,6> supportedTypes =
347 "Reference concatenation: output type not supported");
350 BOOST_ASSERT(input !=
nullptr);
352 "Reference concatenation: input type not supported");
355 "Reference concatenation: input and output types mismatched.");
364 std::array<DataType,7> supportedTypes =
376 "Reference constant: output is not a supported type.");
386 &FalseInputFuncF32<>,
392 &FalseOutputFuncF16<>,
405 &FalseInputFuncF16<>,
413 &FalseOutputFuncF32<>,
429 std::array<DataType,7> supportedTypes =
441 "Reference Convolution2d: input is not a supported type.");
444 "Reference Convolution2d: output is not a supported type.");
447 "Reference Convolution2d: input and output types mismatched.");
453 std::array<DataType, 4> supportedWeightTypes =
458 DataType::QuantizedSymm8PerAxis
463 "Reference Convolution2d: weights type not supported for quantized input.");
468 "Reference Convolution2d: weights is not a supported type.");
471 "Reference Convolution2d: input and weights types mismatched.");
476 std::array<DataType,4> biasesSupportedTypes =
485 "Reference Convolution2d: biases is not a supported type.");
498 std::array<DataType, 8> supportedTypes =
511 "Reference for Debug layer: input type not supported");
514 "Reference for Debug layer: output type not supported");
517 "Reference for Debug layer: input and output types are mismatched");
522 bool RefLayerSupport::IsDepthToSpaceSupported(
const TensorInfo& input,
530 std::array<DataType,5> supportedTypes =
540 "Reference DepthToSpace: input type not supported");
543 "Reference DepthToSpace: output type not supported");
546 "Reference DepthToSpace: input and output types are mismatched");
561 std::array<DataType,7> supportedTypes =
573 "Reference DepthwiseConvolution2d: input is not a supported type.");
576 "Reference DepthwiseConvolution2d: output is not a supported type.");
579 "Reference DepthwiseConvolution2d: input and output types mismatched.");
582 std::array<DataType, 3> supportedWeightTypes =
586 DataType::QuantizedSymm8PerAxis
595 "Reference convolution2d: weights type not supported for quantized input.");
600 "Reference DepthwiseConvolution2d: weights is not a supported type.");
603 "Reference DepthwiseConvolution2d: input and weights types mismatched.");
608 std::array<DataType,4> biasesSupportedTypes =
616 "Reference DepthwiseConvolution2d: biases is not a supported type.");
630 std::array<DataType,4> supportedInputTypes = {
638 "Reference for Dequantize layer: input type not supported.");
641 "Reference for Dequantize layer: per-axis quantized input not support .");
644 "Reference dequantize: per-axis quantized input not support .");
646 std::array<DataType,3> supportedOutputTypes = {
653 "Reference for Dequantize layer: output type not supported.");
656 "Reference for Dequantize layer: input/output shapes have different num total " 672 IgnoreUnused(anchors, detectionBoxes, detectionClasses, detectionScores, numDetections, descriptor);
676 std::array<DataType,4> supportedInputTypes =
685 "Reference DetectionPostProcess: input 0 is not a supported type.");
688 "Reference DetectionPostProcess: input 1 is not a supported type.");
693 bool RefLayerSupport::IsDilatedDepthwiseConvolutionSupported(
const TensorInfo& input,
710 std::array<DataType,5> supportedTypes = {
719 "Reference division: input 0 is not a supported type.");
722 "Reference division: input 1 is not a supported type.");
725 "Reference division: output is not a supported type.");
728 "Reference division: input 0 and Input 1 types are mismatched");
731 "Reference division: input and output types are mismatched");
734 "Reference division: shapes are not suitable for implicit broadcast.");
739 bool RefLayerSupport::IsElementwiseUnarySupported(
const TensorInfo& input,
746 std::array<DataType, 5> supportedTypes =
758 "Reference elementwise unary: input type not supported");
761 "Reference elementwise unary: output type not supported");
764 "Reference elementwise unary: input and output types not matching");
767 "Reference elementwise unary: input and output shapes" 768 "have different number of total elements");
778 return IsComparisonSupported(input0,
782 reasonIfUnsupported);
792 std::array<DataType,1> supportedTypes =
798 "Reference fake quantization: input type not supported.");
810 std::array<DataType,4> supportedTypes =
819 "Reference Floor: input type not supported.");
822 "Reference Floor: output type not supported.");
837 std::array<DataType,6> supportedTypes =
848 "Reference Fully Connected: input type not supported.");
851 "Reference Fully Connected: output type not supported.");
854 "Reference Fully Connected: input and output types mismatched.");
857 "Reference Fully Connected: weights type not supported.");
860 std::array<DataType, 3> supportedWeightTypes =
864 DataType::QuantizedSymm8PerAxis
872 "Reference Fully Connected: weights type not supported for quantized input.");
877 "Reference Fully Connected: weights is not a supported type.");
880 "Reference Fully Connected: input and weights types mismatched.");
886 std::array<DataType, 4>
896 "Reference Fully Connected: bias type not supported.");
899 "Reference Fully Connected: bias and weight types mismatch.");
902 "Reference Fully Connected: bias type inferred from weights is incompatible.");
915 std::array<DataType,5> supportedTypes =
925 "Reference Gather: input type not supported");
928 "Reference Gather: output type not supported");
931 "Reference Gather: indices (input1) type not supported");
934 "Reference Gather: input and output types not matching");
944 return IsComparisonSupported(input0,
948 reasonIfUnsupported);
957 bool RefLayerSupport::IsInstanceNormalizationSupported(
const TensorInfo& input,
964 std::array<DataType, 3> supportedTypes =
974 "Reference Instance Normalization: input type not supported.");
977 "Reference Instance Normalization: output type not supported.");
980 "Reference Instance Normalization: input and output types mismatched.");
983 "Reference Instance Normalization: input and output shapes have different " 984 "num total elements.");
996 std::array<DataType, 5> supportedTypes =
1008 "Reference L2normalization: input type not supported.");
1011 "Reference L2normalization: output type not supported.");
1014 "Reference L2normalization: input and output types mismatched.");
1017 "Reference L2normalization: input and output shapes have different " 1018 "num total elements.");
1023 bool RefLayerSupport::IsLogSoftmaxSupported(
const TensorInfo& input,
1030 std::array<DataType, 3> supportedTypes =
1039 "Reference LogSoftmax: input type not supported");
1042 "Reference LogSoftmax: output type not supported");
1045 "Reference LogSoftmax: input and output types do not match");
1066 std::array<DataType,3> supportedTypes = {
1074 "Reference Lstm: input is not a supported type.");
1076 "Reference Lstm: input and outputStateIn types are mismatched");
1078 "Reference Lstm: input and cellStateIn types are mismatched");
1080 "Reference Lstm: input and scratchBuffer types are mismatched");
1082 "Reference Lstm: input and outputStateOut types are mismatched");
1084 "Reference Lstm: input and cellStateOut types are mismatched");
1086 "Reference Lstm: input and output types are mismatched");
1089 "Reference Lstm: input and InputToForgetWeights types are mismatched");
1091 "Reference Lstm: input and InputToCellWeights types are mismatched");
1093 "Reference Lstm: input and InputToOutputWeights types are mismatched");
1095 "Reference Lstm: input and RecurrentToForgetWeights types are mismatched");
1097 "Reference Lstm: input and RecurrentToCellWeights types are mismatched");
1099 "Reference Lstm: input and RecurrentToOutputWeights types are mismatched");
1101 "Reference Lstm: input and ForgetGateBias types are mismatched");
1103 "Reference Lstm: input and CellBias types are mismatched");
1105 "Reference Lstm: input and OutputGateBias types are mismatched");
1109 "Reference Lstm: input and InputToInputWeights types are mismatched");
1111 reasonIfUnsupported,
1112 "Reference Lstm: input and RecurrentToInputWeights types are mismatched");
1114 "Reference Lstm: input and InputGateBias types are mismatched");
1118 reasonIfUnsupported,
1119 "Reference Lstm: input and CellToInputWeights types are mismatched");
1125 "Reference Lstm: input and CellToForgetWeights types are mismatched");
1127 "Reference Lstm: input and CellToOutputWeights types are mismatched");
1132 "Reference Lstm: input and mProjectionWeights types are mismatched");
1136 "Reference Lstm: input and ProjectionBias types are mismatched");
1144 reasonIfUnsupported,
1145 "Reference Lstm: input and InputLayerNormWeights types are mismatched");
1148 reasonIfUnsupported,
1149 "Reference Lstm: input and ForgetLayerNormWeights types are mismatched");
1151 reasonIfUnsupported,
1152 "Reference Lstm: input and CellLayerNormWeights types are mismatched");
1154 reasonIfUnsupported,
1155 "Reference Lstm: input and OutputLayerNormWeights types are mismatched");
1168 std::array<DataType,6> supportedTypes = {
1178 "Reference maximum: input 0 is not a supported type.");
1181 "Reference maximum: input 1 is not a supported type.");
1184 "Reference maximum: output is not a supported type.");
1187 "Reference maximum: input 0 and Input 1 types are mismatched");
1190 "Reference maximum: input and output types are mismatched");
1193 "Reference maximum: shapes are not suitable for implicit broadcast.");
1204 std::string meanLayerStr =
"Mean";
1205 std::string outputTensorStr =
"output";
1207 std::array<DataType,5> supportedTypes =
1217 "Reference Mean: input type not supported.");
1220 "Reference Mean: input and output types are mismatched");
1225 reasonIfUnsupported,
1228 meanLayerStr, outputTensorStr).data());
1230 else if (descriptor.
m_Axis.empty())
1233 reasonIfUnsupported,
1235 meanLayerStr, outputTensorStr).data());
1244 reasonIfUnsupported,
1246 meanLayerStr, outputTensorStr).data());
1251 reasonIfUnsupported,
1253 meanLayerStr, outputTensorStr).data());
1274 std::array<DataType,6> supportedTypes =
1285 "Reference MemCopy: input type not supported");
1288 "Reference MemCopy: output type not supported");
1291 "Reference MemCopy: input and output types are mismatched");
1303 std::array<DataType,5> supportedTypes = {
1312 "Reference minimum: input 0 is not a supported type.");
1315 "Reference minimum: input 1 is not a supported type.");
1318 "Reference minimum: output is not a supported type.");
1321 "Reference minimum: input 0 and Input 1 types are mismatched");
1324 "Reference minimum: input and output types are mismatched");
1327 "Reference minimum: shapes are not suitable for implicit broadcast.");
1339 std::array<DataType,6> supportedTypes = {
1349 "Reference multiplication: input 0 is not a supported type.");
1352 "Reference multiplication: input 1 is not a supported type.");
1355 "Reference multiplication: output is not a supported type.");
1358 "Reference multiplication: input 0 and Input 1 types are mismatched");
1361 "Reference multiplication: input and output types are mismatched");
1364 "Reference multiplication: shapes are not suitable for implicit broadcast.");
1377 std::array<DataType, 5> supportedTypes =
1389 "Reference normalization: input type not supported.");
1392 "Reference normalization: output type not supported.");
1395 "Reference normalization: input and output shapes have different " 1396 "num total elements.");
1416 std::array<DataType,5> supportedTypes =
1426 "Reference pad: input is not a supported type.");
1429 "Reference pad: output is not a supported type.");
1432 "Reference pad: input and output types are mismatched.");
1446 std::array<DataType, 5> supportedTypes =
1456 "Reference permute: input is not a supported type.");
1459 "Reference permute: output is not a supported type.");
1462 "Reference permute: input and output types are mismatched.");
1476 std::array<DataType,6> supportedTypes =
1487 "Reference poolind2d: input is not a supported type.");
1490 "Reference poolind2d: output is not a supported type.");
1493 "Reference poolind2d: input and output types are mismatched.");
1505 std::array<DataType,7> supportedInputTypes = {
1516 "Reference quantize: input type not supported.");
1519 std::array<DataType,4> supportedOutputTypes = {
1526 "Reference quantize: output type not supported.");
1529 "Reference quantize: input and output shapes have different num total elements.");
1542 std::array<DataType,7> supportedOutputTypes =
1554 "Reference reshape: input type not supported.");
1562 std::array<DataType,5> supportedTypes =
1572 "Reference ResizeBilinear: input type not supported");
1575 "Reference ResizeBilinear: output type not supported");
1578 "Reference ResizeBilinear: input and output types not matching");
1590 std::array<DataType,6> supportedTypes =
1601 "Reference Resize: input type not supported");
1604 "Reference Resize: output type not supported");
1607 "Reference Resize: input and output types not matching");
1616 return IsElementwiseUnarySupported(input,
1619 reasonIfUnsupported);
1630 std::array<DataType, 4> supportedTypes =
1639 "Reference Slice: input type not supported");
1642 "Reference Slice: output type not supported");
1645 "Reference Slice: input and output types are mismatched");
1657 std::array<DataType,7> supportedTypes =
1669 "Reference Softmax: output type not supported");
1672 "Reference Softmax: input type not supported");
1675 "Reference Softmax: input type not supported");
1687 std::array<DataType,5> supportedTypes =
1697 "Reference SpaceToBatchNd: input type not supported");
1700 "Reference SpaceToBatchNd: output type not supported");
1703 "Reference SpaceToBatchNd: input and output types are mismatched");
1717 std::array<DataType,5> supportedTypes =
1727 "Reference SpaceToDepth: input type not supported");
1730 "Reference SpaceToDepth: output type not supported");
1733 "Reference SpaceToDepth: input and output types are mismatched");
1744 std::array<DataType,5> supportedTypes =
1754 "Reference splitter: input type not supported");
1760 const std::vector<std::reference_wrapper<TensorInfo>>& outputs,
1766 std::array<DataType,5> supportedTypes =
1776 "Reference splitter: output type not supported");
1780 "Reference splitter: input type not supported");
1783 "Reference splitter: input and output types mismatched.");
1797 std::array<DataType,5> supportedTypes =
1807 "Reference stack: output type not supported");
1810 BOOST_ASSERT(input !=
nullptr);
1812 "Reference stack: input type not supported");
1815 "Reference stack: input and output types mismatched.");
1829 std::array<DataType,4> supportedTypes =
1838 "Reference StridedSlice: input type not supported");
1841 "Reference StridedSlice: output type not supported");
1844 "Reference StridedSlice: input and output types are mismatched");
1856 std::array<DataType,5> supportedTypes = {
1865 "Reference subtraction: input 0 is not a supported type.");
1868 "Reference subtraction: input 1 is not a supported type.");
1871 "Reference subtraction: output is not a supported type.");
1874 "Reference subtraction: input 0 and Input 1 types are mismatched");
1877 "Reference subtraction: input and output types are mismatched");
1880 "Reference subtraction: shapes are not suitable for implicit broadcast.");
1892 std::array<DataType, 5> supportedTypes
1902 "PReLU: input is not a supported type.");
1905 "PReLU: alpha is not a supported type.");
1908 "PReLU: output is not a supported type.");
1911 "PReLU: input, alpha and output types are mismatched");
1914 "PReLU: shapes are not suitable for implicit broadcast");
1929 std::array<DataType,5> supportedTypes =
1939 "Reference TransposeConvolution2d: input is not a supported type.");
1942 "Reference TransposeConvolution2d: output is not a supported type.");
1945 "Reference TransposeConvolution2d: input and output types mismatched.");
1949 if (inputType == DataType::QAsymmU8)
1952 std::array<DataType, 3> supportedWeightTypes =
1956 DataType::QuantizedSymm8PerAxis
1961 "Reference TransposeConvolution2d: weights type not supported for " 1962 "quantized input.");
1967 "Reference TransposeConvolution2d: weights is not a supported type.");
1970 "Reference TransposeConvolution2d: input and weights types mismatched.");
1975 std::array<DataType,4> biasesSupportedTypes =
1983 "Reference TransposeConvolution2d: biases is not a supported type.");
1989 bool RefLayerSupport::IsTransposeSupported(
const TensorInfo& input,
1998 std::array<DataType, 5> supportedTypes =
2008 "Reference transpose: input is not a supported type.");
2011 "Reference transpose: output is not a supported type.");
2014 "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.
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)
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).
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 })