16 #include <boost/cast.hpp> 17 #include <boost/core/ignore_unused.hpp> 22 using namespace boost;
30 template<
typename Float32Func,
typename Uint8Func,
typename ... Params>
31 bool IsSupportedForDataTypeRef(Optional<std::string&> reasonIfUnsupported,
33 Float32Func floatFuncPtr,
34 Uint8Func uint8FuncPtr,
39 &FalseFunc<Params...>,
42 &FalseFunc<Params...>,
43 &FalseFunc<Params...>,
44 std::forward<Params>(params)...);
52 std::string CreateIncorrectDimensionsErrorMsg(
unsigned int expected,
54 std::string& layerStr,
55 std::string& tensorName)
57 std::string errorMsg =
"Reference " + layerStr +
": Expected " + std::to_string(expected) +
" dimensions but got" +
58 " " + std::to_string(actual) +
" dimensions instead, for the '" + tensorName +
"' tensor.";
68 return IsElementwiseUnarySupported(input,
82 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::LeakyReLu:
112 case ActivationFunction::Linear:
113 case ActivationFunction::ReLu:
114 case ActivationFunction::Sigmoid:
115 case ActivationFunction::SoftReLu:
116 case ActivationFunction::Sqrt:
117 case ActivationFunction::Square:
118 case ActivationFunction::TanH:
133 supported &=
CheckSupportRule(ActivationFunctionSupported(descriptor), reasonIfUnsupported,
134 "Reference activation: function not supported.");
146 std::array<DataType,6> supportedTypes = {
155 "Reference addition: input 0 is not a supported type.");
158 "Reference addition: input 1 is not a supported type.");
161 "Reference addition: output is not a supported type.");
164 "Reference addition: input 0 and Input 1 types are mismatched");
167 "Reference addition: input and output types are mismatched");
170 "Reference addition: shapes are not suitable for implicit broadcast.");
179 ignore_unused(descriptor);
181 std::array<DataType, 4> supportedTypes =
192 "Reference ArgMinMax: input is not a supported type.");
194 "Reference ArgMinMax: output type not supported");
208 ignore_unused(descriptor);
210 std::array<DataType, 4> supportedTypes =
221 "Reference batch normalization: input is not a supported type.");
224 "Reference batch normalization: output is not a supported type.");
227 "Reference batch normalization: input and output types are mismatched");
230 "Reference batch normalization: mean is not a supported type.");
233 "Reference batch normalization: variance is not a supported type.");
236 "Reference batch normalization: beta is not a supported type.");
239 "Reference batch normalization: gamma is not a supported type.");
249 ignore_unused(descriptor);
253 std::string batchToSpaceNdLayerStr =
"batchToSpaceNd";
254 std::string inputTensorStr =
"input";
255 std::string outputTensorStr =
"output";
258 std::array<DataType,4> supportedTypes =
267 "Reference BatchToSpaceNd: input type not supported.");
270 "Reference BatchToSpaceNd: output type not supported.");
273 "Reference BatchToSpaceNd: input and output types mismatched.");
277 CreateIncorrectDimensionsErrorMsg(4,
279 batchToSpaceNdLayerStr,
280 outputTensorStr).data());
284 CreateIncorrectDimensionsErrorMsg(4,
286 batchToSpaceNdLayerStr,
287 inputTensorStr).data());
292 bool RefLayerSupport::IsComparisonSupported(
const TensorInfo& input0,
298 boost::ignore_unused(descriptor);
300 std::array<DataType, 4> supportedInputTypes =
310 "Reference comparison: input 0 is not a supported type");
313 "Reference comparison: input 0 and Input 1 types are mismatched");
316 "Reference comparison: output is not of type Boolean");
326 ignore_unused(descriptor);
329 std::array<DataType,5> supportedTypes =
339 "Reference concatenation: output type not supported");
342 BOOST_ASSERT(input !=
nullptr);
344 "Reference concatenation: input type not supported");
347 "Reference concatenation: input and output types mismatched.");
356 std::array<DataType,6> supportedTypes =
367 "Reference constant: output is not a supported type.");
377 &FalseInputFuncF32<>,
383 &FalseOutputFuncF16<>,
396 &FalseInputFuncF16<>,
404 &FalseOutputFuncF32<>,
420 std::array<DataType,6> supportedTypes =
431 "Reference Convolution2d: input is not a supported type.");
434 "Reference Convolution2d: output is not a supported type.");
437 "Reference Convolution2d: input and output types mismatched.");
443 std::array<DataType, 4> supportedWeightTypes =
448 DataType::QuantizedSymm8PerAxis
453 "Reference Convolution2d: weights type not supported for quantized input.");
458 "Reference Convolution2d: weights is not a supported type.");
461 "Reference Convolution2d: input and weights types mismatched.");
466 std::array<DataType,3> biasesSupportedTypes =
474 "Reference Convolution2d: biases is not a supported type.");
476 ignore_unused(descriptor);
487 std::array<DataType, 7> supportedTypes =
499 "Reference for Debug layer: input type not supported");
502 "Reference for Debug layer: output type not supported");
505 "Reference for Debug layer: input and output types are mismatched");
510 bool RefLayerSupport::IsDepthToSpaceSupported(
const TensorInfo& input,
515 ignore_unused(descriptor);
518 std::array<DataType,4> supportedTypes =
527 "Reference DepthToSpace: input type not supported");
530 "Reference DepthToSpace: output type not supported");
533 "Reference DepthToSpace: input and output types are mismatched");
548 std::array<DataType,6> supportedTypes =
559 "Reference DepthwiseConvolution2d: input is not a supported type.");
562 "Reference DepthwiseConvolution2d: output is not a supported type.");
565 "Reference DepthwiseConvolution2d: input and output types mismatched.");
568 std::array<DataType, 3> supportedWeightTypes =
572 DataType::QuantizedSymm8PerAxis
581 "Reference convolution2d: weights type not supported for quantized input.");
586 "Reference DepthwiseConvolution2d: weights is not a supported type.");
589 "Reference DepthwiseConvolution2d: input and weights types mismatched.");
594 std::array<DataType,3> biasesSupportedTypes =
601 "Reference DepthwiseConvolution2d: biases is not a supported type.");
603 ignore_unused(descriptor);
615 std::array<DataType,4> supportedInputTypes = {
623 "Reference for Dequantize layer: input type not supported.");
626 "Reference for Dequantize layer: per-axis quantized input not support .");
629 "Reference dequantize: per-axis quantized input not support .");
631 std::array<DataType,2> supportedOutputTypes = {
637 "Reference for Dequantize layer: output type not supported.");
640 "Reference for Dequantize layer: input/output shapes have different num total " 656 boost::ignore_unused(anchors, detectionBoxes, detectionClasses, detectionScores, numDetections, descriptor);
660 std::array<DataType,3> supportedInputTypes =
668 "Reference DetectionPostProcess: input 0 is not a supported type.");
671 "Reference DetectionPostProcess: input 1 is not a supported type.");
676 bool RefLayerSupport::IsDilatedDepthwiseConvolutionSupported(
const TensorInfo& input,
693 std::array<DataType,4> supportedTypes = {
701 "Reference division: input 0 is not a supported type.");
704 "Reference division: input 1 is not a supported type.");
707 "Reference division: output is not a supported type.");
710 "Reference division: input 0 and Input 1 types are mismatched");
713 "Reference division: input and output types are mismatched");
716 "Reference division: shapes are not suitable for implicit broadcast.");
721 bool RefLayerSupport::IsElementwiseUnarySupported(
const TensorInfo& input,
726 boost::ignore_unused(descriptor);
728 std::array<DataType, 4> supportedTypes =
739 "Reference elementwise unary: input type not supported");
742 "Reference elementwise unary: output type not supported");
745 "Reference elementwise unary: input and output types not matching");
748 "Reference elementwise unary: input and output shapes" 749 "have different number of total elements");
759 return IsComparisonSupported(input0,
763 reasonIfUnsupported);
770 ignore_unused(descriptor);
773 std::array<DataType,1> supportedTypes =
779 "Reference fake quantization: input type not supported.");
788 ignore_unused(output);
791 std::array<DataType,3> supportedTypes =
799 "Reference Floor: input type not supported.");
802 "Reference Floor: output type not supported.");
817 std::array<DataType,4> supportedTypes =
826 "Reference Fully Connected: input type not supported.");
829 "Reference Fully Connected: output type not supported.");
832 "Reference Fully Connected: input and output types mismatched.");
835 "Reference Fully Connected: weights type not supported.");
838 "Reference Fully Connected: input and weight types mismatched.");
843 std::array<DataType, 3>
852 "Reference Fully Connected: bias type not supported.");
855 "Reference Fully Connected: bias and weight types mismatch.");
858 "Reference Fully Connected: bias type inferred from weights is incompatible.");
871 std::array<DataType,4> supportedTypes =
880 "Reference Gather: input type not supported");
883 "Reference Gather: output type not supported");
886 "Reference Gather: indices (input1) type not supported");
889 "Reference Gather: input and output types not matching");
899 return IsComparisonSupported(input0,
903 reasonIfUnsupported);
912 bool RefLayerSupport::IsInstanceNormalizationSupported(
const TensorInfo& input,
917 ignore_unused(descriptor);
919 std::array<DataType, 4> supportedTypes =
928 "Reference Instance Normalization: input type not supported.");
931 "Reference Instance Normalization: output type not supported.");
934 "Reference Instance Normalization: input and output types mismatched.");
937 "Reference Instance Normalization: input and output shapes have different " 938 "num total elements.");
948 ignore_unused(descriptor);
950 std::array<DataType, 4> supportedTypes =
961 "Reference L2normalization: input type not supported.");
964 "Reference L2normalization: output type not supported.");
967 "Reference L2normalization: input and output types mismatched.");
970 "Reference L2normalization: input and output shapes have different " 971 "num total elements.");
976 bool RefLayerSupport::IsLogSoftmaxSupported(
const TensorInfo& input,
981 ignore_unused(descriptor);
983 std::array<DataType, 2> supportedTypes =
991 "Reference LogSoftmax: input type not supported");
994 "Reference LogSoftmax: output type not supported");
997 "Reference LogSoftmax: input and output types do not match");
1013 ignore_unused(descriptor);
1014 ignore_unused(paramsInfo);
1018 std::array<DataType,2> supportedTypes = {
1025 "Reference Lstm: input is not a supported type.");
1027 "Reference Lstm: input and outputStateIn types are mismatched");
1029 "Reference Lstm: input and cellStateIn types are mismatched");
1031 "Reference Lstm: input and scratchBuffer types are mismatched");
1033 "Reference Lstm: input and outputStateOut types are mismatched");
1035 "Reference Lstm: input and cellStateOut types are mismatched");
1037 "Reference Lstm: input and output types are mismatched");
1040 "Reference Lstm: input and InputToForgetWeights types are mismatched");
1042 "Reference Lstm: input and InputToCellWeights types are mismatched");
1044 "Reference Lstm: input and InputToOutputWeights types are mismatched");
1046 "Reference Lstm: input and RecurrentToForgetWeights types are mismatched");
1048 "Reference Lstm: input and RecurrentToCellWeights types are mismatched");
1050 "Reference Lstm: input and RecurrentToOutputWeights types are mismatched");
1052 "Reference Lstm: input and ForgetGateBias types are mismatched");
1054 "Reference Lstm: input and CellBias types are mismatched");
1056 "Reference Lstm: input and OutputGateBias types are mismatched");
1060 "Reference Lstm: input and InputToInputWeights types are mismatched");
1062 reasonIfUnsupported,
1063 "Reference Lstm: input and RecurrentToInputWeights types are mismatched");
1065 "Reference Lstm: input and InputGateBias types are mismatched");
1069 reasonIfUnsupported,
1070 "Reference Lstm: input and CellToInputWeights types are mismatched");
1076 "Reference Lstm: input and CellToForgetWeights types are mismatched");
1078 "Reference Lstm: input and CellToOutputWeights types are mismatched");
1083 "Reference Lstm: input and mProjectionWeights types are mismatched");
1087 "Reference Lstm: input and ProjectionBias types are mismatched");
1095 reasonIfUnsupported,
1096 "Reference Lstm: input and InputLayerNormWeights types are mismatched");
1099 reasonIfUnsupported,
1100 "Reference Lstm: input and ForgetLayerNormWeights types are mismatched");
1102 reasonIfUnsupported,
1103 "Reference Lstm: input and CellLayerNormWeights types are mismatched");
1105 reasonIfUnsupported,
1106 "Reference Lstm: input and OutputLayerNormWeights types are mismatched");
1119 std::array<DataType,5> supportedTypes = {
1128 "Reference maximum: input 0 is not a supported type.");
1131 "Reference maximum: input 1 is not a supported type.");
1134 "Reference maximum: output is not a supported type.");
1137 "Reference maximum: input 0 and Input 1 types are mismatched");
1140 "Reference maximum: input and output types are mismatched");
1143 "Reference maximum: shapes are not suitable for implicit broadcast.");
1154 std::string meanLayerStr =
"Mean";
1155 std::string outputTensorStr =
"output";
1157 std::array<DataType,4> supportedTypes =
1166 "Reference Mean: input type not supported.");
1169 "Reference Mean: input and output types are mismatched");
1174 reasonIfUnsupported,
1177 meanLayerStr, outputTensorStr).data());
1179 else if (descriptor.
m_Axis.empty())
1182 reasonIfUnsupported,
1184 meanLayerStr, outputTensorStr).data());
1193 reasonIfUnsupported,
1195 meanLayerStr, outputTensorStr).data());
1200 reasonIfUnsupported,
1202 meanLayerStr, outputTensorStr).data());
1223 std::array<DataType,5> supportedTypes =
1233 "Reference MemCopy: input type not supported");
1236 "Reference MemCopy: output type not supported");
1239 "Reference MemCopy: input and output types are mismatched");
1251 std::array<DataType,4> supportedTypes = {
1259 "Reference minimum: input 0 is not a supported type.");
1262 "Reference minimum: input 1 is not a supported type.");
1265 "Reference minimum: output is not a supported type.");
1268 "Reference minimum: input 0 and Input 1 types are mismatched");
1271 "Reference minimum: input and output types are mismatched");
1274 "Reference minimum: shapes are not suitable for implicit broadcast.");
1286 std::array<DataType,6> supportedTypes = {
1295 "Reference multiplication: input 0 is not a supported type.");
1298 "Reference multiplication: input 1 is not a supported type.");
1301 "Reference multiplication: output is not a supported type.");
1304 "Reference multiplication: input 0 and Input 1 types are mismatched");
1307 "Reference multiplication: input and output types are mismatched");
1310 "Reference multiplication: shapes are not suitable for implicit broadcast.");
1320 ignore_unused(descriptor);
1323 std::array<DataType, 4> supportedTypes =
1334 "Reference normalization: input type not supported.");
1337 "Reference normalization: output type not supported.");
1340 "Reference normalization: input and output shapes have different " 1341 "num total elements.");
1357 ignore_unused(descriptor);
1361 std::array<DataType,4> supportedTypes =
1370 "Reference pad: input is not a supported type.");
1373 "Reference pad: output is not a supported type.");
1376 "Reference pad: input and output types are mismatched.");
1386 ignore_unused(descriptor);
1390 std::array<DataType,3> supportedTypes =
1398 "Reference permute: input is not a supported type.");
1401 "Reference permute: output is not a supported type.");
1404 "Reference permute: input and output types are mismatched.");
1414 ignore_unused(descriptor);
1418 std::array<DataType,5> supportedTypes =
1428 "Reference poolind2d: input is not a supported type.");
1431 "Reference poolind2d: output is not a supported type.");
1434 "Reference poolind2d: input and output types are mismatched.");
1446 std::array<DataType,6> supportedInputTypes = {
1456 "Reference quantize: input type not supported.");
1459 std::array<DataType,4> supportedOutputTypes = {
1466 "Reference quantize: output type not supported.");
1469 "Reference quantize: input and output shapes have different num total elements.");
1479 ignore_unused(output);
1480 ignore_unused(descriptor);
1482 std::array<DataType,7> supportedOutputTypes =
1493 "Reference reshape: input type not supported.");
1501 std::array<DataType,4> supportedTypes =
1510 "Reference ResizeBilinear: input type not supported");
1513 "Reference ResizeBilinear: output type not supported");
1516 "Reference ResizeBilinear: input and output types not matching");
1526 boost::ignore_unused(descriptor);
1528 std::array<DataType,5> supportedTypes =
1538 "Reference Resize: input type not supported");
1541 "Reference Resize: output type not supported");
1544 "Reference Resize: input and output types not matching");
1553 return IsElementwiseUnarySupported(input,
1556 reasonIfUnsupported);
1564 boost::ignore_unused(descriptor);
1567 std::array<DataType, 3> supportedTypes =
1575 "Reference Slice: input type not supported");
1578 "Reference Slice: output type not supported");
1581 "Reference Slice: input and output types are mismatched");
1591 boost::ignore_unused(descriptor);
1593 std::array<DataType,6> supportedTypes =
1604 "Reference Softmax: output type not supported");
1607 "Reference Softmax: input type not supported");
1610 "Reference Softmax: input type not supported");
1620 boost::ignore_unused(descriptor);
1622 std::array<DataType,4> supportedTypes =
1631 "Reference SpaceToBatchNd: input type not supported");
1634 "Reference SpaceToBatchNd: output type not supported");
1637 "Reference SpaceToBatchNd: input and output types are mismatched");
1648 ignore_unused(descriptor);
1651 std::array<DataType,4> supportedTypes =
1660 "Reference SpaceToDepth: input type not supported");
1663 "Reference SpaceToDepth: output type not supported");
1666 "Reference SpaceToDepth: input and output types are mismatched");
1675 ignore_unused(descriptor);
1677 std::array<DataType,4> supportedTypes =
1686 "Reference splitter: input type not supported");
1692 const std::vector<std::reference_wrapper<TensorInfo>>& outputs,
1696 ignore_unused(descriptor);
1698 std::array<DataType,4> supportedTypes =
1707 "Reference splitter: output type not supported");
1711 "Reference splitter: input type not supported");
1714 "Reference splitter: input and output types mismatched.");
1725 ignore_unused(descriptor);
1728 std::array<DataType,4> supportedTypes =
1737 "Reference stack: output type not supported");
1740 BOOST_ASSERT(input !=
nullptr);
1742 "Reference stack: input type not supported");
1745 "Reference stack: input and output types mismatched.");
1756 ignore_unused(descriptor);
1759 std::array<DataType,3> supportedTypes =
1767 "Reference StridedSlice: input type not supported");
1770 "Reference StridedSlice: output type not supported");
1773 "Reference StridedSlice: input and output types are mismatched");
1785 std::array<DataType,4> supportedTypes = {
1793 "Reference subtraction: input 0 is not a supported type.");
1796 "Reference subtraction: input 1 is not a supported type.");
1799 "Reference subtraction: output is not a supported type.");
1802 "Reference subtraction: input 0 and Input 1 types are mismatched");
1805 "Reference subtraction: input and output types are mismatched");
1808 "Reference subtraction: shapes are not suitable for implicit broadcast.");
1820 std::array<DataType, 4> supportedTypes
1829 "PReLU: input is not a supported type.");
1832 "PReLU: alpha is not a supported type.");
1835 "PReLU: output is not a supported type.");
1838 "PReLU: input, alpha and output types are mismatched");
1841 "PReLU: shapes are not suitable for implicit broadcast");
1853 boost::ignore_unused(descriptor);
1856 std::array<DataType,4> supportedTypes =
1865 "Reference TransposeConvolution2d: input is not a supported type.");
1868 "Reference TransposeConvolution2d: output is not a supported type.");
1871 "Reference TransposeConvolution2d: input and output types mismatched.");
1875 if (inputType == DataType::QAsymmU8)
1878 std::array<DataType, 3> supportedWeightTypes =
1882 DataType::QuantizedSymm8PerAxis
1887 "Reference TransposeConvolution2d: weights type not supported for " 1888 "quantized input.");
1893 "Reference TransposeConvolution2d: weights is not a supported type.");
1896 "Reference TransposeConvolution2d: input and weights types mismatched.");
1901 std::array<DataType,3> biasesSupportedTypes =
1908 "Reference TransposeConvolution2d: biases is not a supported type.");
bool m_ProjectionEnabled
Enable/disable the projection layer.
A BatchToSpaceNdDescriptor for the BatchToSpaceNdLayer.
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 NormalizationDescriptor for the NormalizationLayer.
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 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.
unsigned int GetNumDimensions() const
A FakeQuantizationDescriptor for the FakeQuantizationLayer.
std::vector< unsigned int > m_Axis
Values for the dimensions to reduce.
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.
bool m_CifgEnabled
Enable/disable cifg (coupled input & forget gate).
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 PadDescriptor for the PadLayer.
An ActivationDescriptor for the ActivationLayer.
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.
A BatchNormalizationDescriptor for the BatchNormalizationLayer.
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.
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.
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 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 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 m_KeepDims
Enable/disable keep dimensions. If true, then the reduced dimensions that are of length 1 are kept...
A L2NormalizationDescriptor for the L2NormalizationLayer.
bool m_BiasEnabled
Enable/disable bias.
A ViewsDescriptor for the SplitterLayer. Descriptor to configure the splitting process. Number of Views must be equal to the number of outputs, and their order must match - e.g. first view corresponds to the first output, second view to the second output, etc.
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.
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 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.
A SpaceToDepthDescriptor for the SpaceToDepthLayer.
ISubgraphViewConverter supported
A ReshapeDescriptor for the ReshapeLayer.
A TransposeConvolution2dDescriptor for the TransposeConvolution2dLayer.
A ElementwiseUnaryDescriptor for the ElementwiseUnaryLayer.
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 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.
bool m_PeepholeEnabled
Enable/disable peephole.
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 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.
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 })
#define ARMNN_NO_DEPRECATE_WARN_BEGIN
bool CheckSupportRule(F rule, Optional< std::string &> reasonIfUnsupported, const char *reason)
An LstmDescriptor for the LstmLayer.
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 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.
An InstanceNormalizationDescriptor for InstanceNormalizationLayer.
bool IsSplitterSupported(const BackendId &backend, const TensorInfo &input, const ViewsDescriptor &descriptor, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
A FullyConnectedDescriptor for the FullyConnectedLayer.
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 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.
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 IsGatherSupported(const BackendId &backend, const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, char *reasonIfUnsupported, size_t reasonIfUnsupportedMaxLength)
A StackDescriptor for the StackLayer.
bool IsSupportedForDataTypeGeneric(Optional< std::string &> reasonIfUnsupported, DataType dataType, Float16Func float16FuncPtr, Float32Func float32FuncPtr, Uint8Func uint8FuncPtr, Int32Func int32FuncPtr, BooleanFunc booleanFuncPtr, Params &&... params)
ActivationFunction m_Function
The activation function to use (Sigmoid, TanH, Linear, ReLu, BoundedReLu, SoftReLu, LeakyReLu, Abs, Sqrt, Square).
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 SoftmaxDescriptor for the SoftmaxLayer.
bool IsInputSupported(const BackendId &backend, const TensorInfo &input, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
bool IsOutputSupported(const BackendId &backend, const TensorInfo &output, char *reasonIfUnsupported=nullptr, size_t reasonIfUnsupportedMaxLength=1024)
Deprecated in favor of IBackend and ILayerSupport interfaces.
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 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 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.
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 })
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 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.
DataType GetDataType() const
bool IsConstantSupported(const BackendId &backend, const TensorInfo &output, 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 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.
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.
A Pooling2dDescriptor for the Pooling2dLayer.
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 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.
A SliceDescriptor for the SliceLayer.
bool m_LayerNormEnabled
Enable/disable layer normalization.
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.
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.
A DepthwiseConvolution2dDescriptor for the DepthwiseConvolution2dLayer.
A PermuteDescriptor for the PermuteLayer.
A Convolution2dDescriptor for the Convolution2dLayer.
A MeanDescriptor for the MeanLayer.
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.
A SpaceToBatchNdDescriptor for the SpaceToBatchNdLayer.
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.
An ArgMinMaxDescriptor for ArgMinMaxLayer.
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.
bool has_value() const noexcept
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.
A ResizeDescriptor for the ResizeLayer.
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.
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.
A ComparisonDescriptor for the ComparisonLayer.
bool IsArgMinMaxSupported(const BackendId &backend, const TensorInfo &input, const TensorInfo &output, const ArgMinMaxDescriptor &descriptor, char *reasonIfUnsupported, size_t reasonIfUnsupportedMaxLength)
bool IsDetectionPostProcessSupported(const BackendId &backend, const TensorInfo &input0, const TensorInfo &input1, const DetectionPostProcessDescriptor &descriptor, char *reasonIfUnsupported, size_t reasonIfUnsupportedMaxLength)
bool IsQuantizeSupported(const BackendId &backend, const TensorInfo &input, const TensorInfo &output, char *reasonIfUnsupported, size_t reasonIfUnsupportedMaxLength)
An OriginsDescriptor for the ConcatLayer. Descriptor to configure the concatenation process...
constexpr bool IsQuantized8BitType(DataType dataType)
#define ARMNN_NO_DEPRECATE_WARN_END
A StridedSliceDescriptor for the StridedSliceLayer.