26 template<
typename Float32Func,
typename Uint8Func,
typename ... Params>
27 bool IsSupportedForDataTypeRef(Optional<std::string&> reasonIfUnsupported,
29 Float32Func floatFuncPtr,
30 Uint8Func uint8FuncPtr,
35 &FalseFunc<Params...>,
38 &FalseFunc<Params...>,
39 &FalseFunc<Params...>,
40 std::forward<Params>(params)...);
48 std::string CreateIncorrectDimensionsErrorMsg(
unsigned int expected,
50 std::string& layerStr,
51 std::string& tensorName)
53 std::string errorMsg =
"Reference " + layerStr +
": Expected " + std::to_string(expected) +
" dimensions but got" +
54 " " + std::to_string(actual) +
" dimensions instead, for the '" + tensorName +
"' tensor.";
78 std::array<DataType,6> supportedTypes = {
88 "Reference activation: input type not supported.");
91 "Reference activation: output type not supported.");
94 "Reference activation: input and output types mismatched.");
97 "Reference activation: input and output shapes are of different rank.");
100 struct ActivationFunctionSupported :
public Rule 132 supported &=
CheckSupportRule(ActivationFunctionSupported(descriptor), reasonIfUnsupported,
133 "Reference activation: function not supported.");
145 std::array<DataType,7> supportedTypes = {
156 "Reference addition: input 0 is not a supported type.");
159 "Reference addition: input 1 is not a supported type.");
162 "Reference addition: output is not a supported type.");
165 "Reference addition: input 0 and Input 1 types are mismatched");
168 "Reference addition: input and output types are mismatched");
171 "Reference addition: shapes are not suitable for implicit broadcast.");
182 std::array<DataType, 8> supportedInputTypes =
194 std::array<DataType,2> supportedOutputTypes = {
202 "Reference ArgMinMax: input is not a supported type.");
204 "Reference ArgMinMax: output type not supported");
220 std::array<DataType, 6> supportedTypes =
233 "Reference batch normalization: input is not a supported type.");
236 "Reference batch normalization: output is not a supported type.");
239 "Reference batch normalization: input and output types are mismatched");
242 "Reference batch normalization: mean is not a supported type.");
245 "Reference batch normalization: variance is not a supported type.");
248 "Reference batch normalization: beta is not a supported type.");
251 "Reference batch normalization: gamma is not a supported type.");
265 std::string batchToSpaceNdLayerStr =
"batchToSpaceNd";
266 std::string inputTensorStr =
"input";
267 std::string outputTensorStr =
"output";
270 std::array<DataType,6> supportedTypes =
281 "Reference BatchToSpaceNd: input type not supported.");
284 "Reference BatchToSpaceNd: output type not supported.");
287 "Reference BatchToSpaceNd: input and output types mismatched.");
291 CreateIncorrectDimensionsErrorMsg(4,
293 batchToSpaceNdLayerStr,
294 outputTensorStr).data());
298 CreateIncorrectDimensionsErrorMsg(4,
300 batchToSpaceNdLayerStr,
301 inputTensorStr).data());
310 std::array<DataType, 9> supportedInputTypes =
324 "Reference cast: input is not a supported type");
328 "Reference cast: output is not a supported type");
331 "Reference cast: input and output shapes have different number of total elements");
343 std::array<DataType, 8> supportedInputTypes =
357 "Reference comparison: input 0 is not a supported type");
360 "Reference comparison: input 0 and Input 1 types are mismatched");
363 "Reference comparison: output is not of type Boolean");
376 std::array<DataType,6> supportedTypes =
387 "Reference concatenation: output type not supported");
392 "Reference concatenation: input type not supported");
395 "Reference concatenation: input and output types mismatched.");
404 std::array<DataType,8> supportedTypes =
417 "Reference constant: output is not a supported type.");
427 "Reference for ConvertBf16ToFp32 layer: input type not supported");
430 "Reference for ConvertBf16ToFp32 layer: output type not supported");
442 &FalseInputFuncF32<>,
448 &FalseOutputFuncF16<>,
462 "Reference for ConvertFp32ToBf16 layer: input type not supported");
465 "Reference for ConvertFp32ToBf16 layer: output type not supported");
476 &FalseInputFuncF16<>,
484 &FalseOutputFuncF32<>,
500 std::array<DataType,7> supportedTypes =
512 "Reference Convolution2d: input is not a supported type.");
515 "Reference Convolution2d: output is not a supported type.");
522 reasonIfUnsupported.
value() +=
"Output tensor type must be BFloat16 or Float32 for BFloat16 input.\n";
529 "Reference Convolution2d: input and output types mismatched.");
536 std::array<DataType, 4> supportedWeightTypes =
546 "Reference Convolution2d: weights type not supported for quantized input.");
551 "Reference Convolution2d: weights is not a supported type.");
554 "Reference Convolution2d: input and weights types mismatched.");
559 std::array<DataType,4> biasesSupportedTypes =
568 "Reference Convolution2d: biases is not a supported type.");
581 std::array<DataType, 8> supportedTypes =
594 "Reference for Debug layer: input type not supported");
597 "Reference for Debug layer: output type not supported");
600 "Reference for Debug layer: input and output types are mismatched");
613 std::array<DataType,6> supportedTypes =
624 "Reference DepthToSpace: input type not supported");
627 "Reference DepthToSpace: output type not supported");
630 "Reference DepthToSpace: input and output types are mismatched");
646 std::array<DataType,7> supportedTypes =
658 "Reference DepthwiseConvolution2d: input is not a supported type.");
661 "Reference DepthwiseConvolution2d: output is not a supported type.");
664 "Reference DepthwiseConvolution2d: input and output types mismatched.");
670 std::array<DataType, 4> supportedWeightTypes =
680 "Reference DepthwiseConvolution2d: weights type not supported for " 686 "Reference DepthwiseConvolution2d: weights is not a supported type.");
689 "Reference DepthwiseConvolution2d: input and weights types mismatched.");
694 std::array<DataType,4> biasesSupportedTypes =
702 "Reference DepthwiseConvolution2d: biases is not a supported type.");
715 std::array<DataType,4> supportedInputTypes = {
723 "Reference for Dequantize layer: input type not supported.");
726 "Reference for Dequantize layer: per-axis quantized input not supported.");
728 std::array<DataType,3> supportedOutputTypes = {
735 "Reference for Dequantize layer: output type not supported.");
738 "Reference for Dequantize layer: input/output shapes have different num total " 754 IgnoreUnused(anchors, detectionBoxes, detectionClasses, detectionScores, numDetections, descriptor);
758 std::array<DataType,6> supportedInputTypes =
769 "Reference DetectionPostProcess: input 0 is not a supported type.");
772 "Reference DetectionPostProcess: input 1 is not a supported type.");
794 std::array<DataType,7> supportedTypes = {
805 "Reference division: input 0 is not a supported type.");
808 "Reference division: input 1 is not a supported type.");
811 "Reference division: output is not a supported type.");
814 "Reference division: input 0 and Input 1 types are mismatched");
817 "Reference division: input and output types are mismatched");
820 "Reference division: shapes are not suitable for implicit broadcast.");
832 std::array<DataType, 7> supportedTypes =
843 std::array<DataType, 1> logicalSupportedTypes =
853 "Reference elementwise unary: input type not supported");
856 "Reference elementwise unary: output type not supported");
861 "Reference elementwise unary: input type not supported");
864 "Reference elementwise unary: output type not supported");
868 "Reference elementwise unary: input and output types not matching");
871 "Reference elementwise unary: input and output shapes" 872 "have different number of total elements");
886 reasonIfUnsupported);
896 std::array<DataType,1> supportedTypes =
902 "Reference fake quantization: input type not supported.");
917 std::array<DataType,3> supportedTypes =
925 "Reference Fill: input type not supported.");
928 "Reference Fill: output type not supported.");
939 std::array<DataType,3> supportedTypes =
947 "Reference Floor: input type not supported.");
950 "Reference Floor: output type not supported.");
965 std::array<DataType,6> supportedTypes =
976 "Reference Fully Connected: input type not supported.");
979 "Reference Fully Connected: output type not supported.");
982 "Reference Fully Connected: weights type not supported.");
989 reasonIfUnsupported.
value() +=
"Output tensor type must be BFloat16 or Float32 for BFloat16 input.\n";
996 "Reference Fully Connected: input and output types mismatched.");
1000 "Reference Fully Connected: weights is not a supported type.");
1003 "Reference Fully Connected: input and weights types mismatched.");
1008 std::array<DataType, 5>
1009 supportedBiasTypes =
1019 "Reference Fully Connected: bias type not supported.");
1022 "Reference Fully Connected: bias and weight types mismatch.");
1025 "Reference Fully Connected: bias type inferred from weights is incompatible.");
1028 "Reference Fully Connected: bias must have 1 dimension.");
1042 std::array<DataType,7> supportedTypes =
1053 if (descriptor.
m_Axis != 0)
1055 reasonIfUnsupported.
value() += std::string(
"Reference Gather: axis not supported\n");
1059 "Reference Gather: input type not supported");
1062 "Reference Gather: output type not supported");
1065 "Reference Gather: indices (input1) type not supported");
1068 "Reference Gather: input and output types not matching");
1082 reasonIfUnsupported);
1098 std::array<DataType, 3> supportedTypes =
1108 "Reference Instance Normalization: input type not supported.");
1111 "Reference Instance Normalization: output type not supported.");
1114 "Reference Instance Normalization: input and output types mismatched.");
1117 "Reference Instance Normalization: input and output shapes have different " 1118 "num total elements.");
1130 std::array<DataType, 6> supportedTypes =
1143 "Reference L2normalization: input type not supported.");
1146 "Reference L2normalization: output type not supported.");
1149 "Reference L2normalization: input and output types mismatched.");
1152 "Reference L2normalization: input and output shapes have different " 1153 "num total elements.");
1166 std::array<DataType, 1> supportedTypes =
1173 "Reference LogicalBinary: input 0 type not supported");
1175 "Reference LogicalBinary: input 1 type not supported");
1178 "Reference LogicalBinary: input and output types do not match");
1190 std::array<DataType, 3> supportedTypes =
1199 "Reference LogSoftmax: input type not supported");
1202 "Reference LogSoftmax: output type not supported");
1205 "Reference LogSoftmax: input and output types do not match");
1226 std::array<DataType,3> supportedTypes = {
1234 "Reference Lstm: input is not a supported type.");
1236 "Reference Lstm: input and outputStateIn types are mismatched");
1238 "Reference Lstm: input and cellStateIn types are mismatched");
1240 "Reference Lstm: input and scratchBuffer types are mismatched");
1242 "Reference Lstm: input and outputStateOut types are mismatched");
1244 "Reference Lstm: input and cellStateOut types are mismatched");
1247 "Reference Lstm: input and output types are mismatched");
1250 "Reference Lstm: input and InputToForgetWeights types are mismatched");
1252 "Reference Lstm: input and InputToCellWeights types are mismatched");
1254 "Reference Lstm: input and InputToOutputWeights types are mismatched");
1256 "Reference Lstm: input and RecurrentToForgetWeights types are mismatched");
1258 "Reference Lstm: input and RecurrentToCellWeights types are mismatched");
1260 "Reference Lstm: input and RecurrentToOutputWeights types are mismatched");
1262 "Reference Lstm: input and ForgetGateBias types are mismatched");
1264 "Reference Lstm: input and CellBias types are mismatched");
1266 "Reference Lstm: input and OutputGateBias types are mismatched");
1270 "Reference Lstm: input and InputToInputWeights types are mismatched");
1272 reasonIfUnsupported,
1273 "Reference Lstm: input and RecurrentToInputWeights types are mismatched");
1275 "Reference Lstm: input and InputGateBias types are mismatched");
1279 reasonIfUnsupported,
1280 "Reference Lstm: input and CellToInputWeights types are mismatched");
1286 "Reference Lstm: input and CellToForgetWeights types are mismatched");
1288 "Reference Lstm: input and CellToOutputWeights types are mismatched");
1293 "Reference Lstm: input and mProjectionWeights types are mismatched");
1297 "Reference Lstm: input and ProjectionBias types are mismatched");
1305 reasonIfUnsupported,
1306 "Reference Lstm: input and InputLayerNormWeights types are mismatched");
1309 reasonIfUnsupported,
1310 "Reference Lstm: input and ForgetLayerNormWeights types are mismatched");
1312 reasonIfUnsupported,
1313 "Reference Lstm: input and CellLayerNormWeights types are mismatched");
1315 reasonIfUnsupported,
1316 "Reference Lstm: input and OutputLayerNormWeights types are mismatched");
1329 std::array<DataType,7> supportedTypes = {
1340 "Reference maximum: input 0 is not a supported type.");
1343 "Reference maximum: input 1 is not a supported type.");
1346 "Reference maximum: output is not a supported type.");
1349 "Reference maximum: input 0 and Input 1 types are mismatched");
1352 "Reference maximum: input and output types are mismatched");
1355 "Reference maximum: shapes are not suitable for implicit broadcast.");
1366 std::string meanLayerStr =
"Mean";
1367 std::string outputTensorStr =
"output";
1369 std::array<DataType,6> supportedTypes =
1380 "Reference Mean: input type not supported.");
1383 "Reference Mean: input and output types are mismatched");
1388 reasonIfUnsupported,
1391 meanLayerStr, outputTensorStr).data());
1393 else if (descriptor.
m_Axis.empty())
1396 reasonIfUnsupported,
1398 meanLayerStr, outputTensorStr).data());
1407 reasonIfUnsupported,
1409 meanLayerStr, outputTensorStr).data());
1414 reasonIfUnsupported,
1416 meanLayerStr, outputTensorStr).data());
1437 std::array<DataType,7> supportedTypes =
1449 "Reference MemCopy: input type not supported");
1452 "Reference MemCopy: output type not supported");
1455 "Reference MemCopy: input and output types are mismatched");
1467 std::array<DataType,7> supportedTypes = {
1478 "Reference minimum: input 0 is not a supported type.");
1481 "Reference minimum: input 1 is not a supported type.");
1484 "Reference minimum: output is not a supported type.");
1487 "Reference minimum: input 0 and Input 1 types are mismatched");
1490 "Reference minimum: input and output types are mismatched");
1493 "Reference minimum: shapes are not suitable for implicit broadcast.");
1505 std::array<DataType,7> supportedTypes = {
1516 "Reference multiplication: input 0 is not a supported type.");
1519 "Reference multiplication: input 1 is not a supported type.");
1522 "Reference multiplication: output is not a supported type.");
1525 "Reference multiplication: input 0 and Input 1 types are mismatched");
1528 "Reference multiplication: input and output types are mismatched");
1531 "Reference multiplication: shapes are not suitable for implicit broadcast.");
1544 std::array<DataType, 6> supportedTypes =
1557 "Reference normalization: input type not supported.");
1560 "Reference normalization: output type not supported.");
1563 "Reference normalization: input and output shapes have different " 1564 "num total elements.");
1584 std::array<DataType,6> supportedTypes =
1595 "Reference pad: input is not a supported type.");
1598 "Reference pad: output is not a supported type.");
1601 "Reference pad: input and output types are mismatched.");
1615 std::array<DataType, 6> supportedTypes =
1626 "Reference permute: input is not a supported type.");
1629 "Reference permute: output is not a supported type.");
1632 "Reference permute: input and output types are mismatched.");
1646 std::array<DataType,6> supportedTypes =
1657 "Reference poolind2d: input is not a supported type.");
1660 "Reference poolind2d: output is not a supported type.");
1663 "Reference poolind2d: input and output types are mismatched.");
1699 std::array<DataType,7> supportedInputTypes = {
1710 "Reference quantize: input type not supported.");
1713 std::array<DataType,4> supportedOutputTypes = {
1720 "Reference quantize: output type not supported.");
1723 "Reference quantize: input and output shapes have different num total elements.");
1734 std::array<DataType,1> supportedOutputTypes =
1740 "Reference rank: input type not supported.");
1750 std::array<DataType,7> supportedTypes =
1762 "Reference Reduce: input type not supported");
1765 "Reference Reduce: output type not supported");
1768 "Reference Reduce: input and output types not matching");
1781 std::array<DataType,8> supportedOutputTypes =
1794 "Reference reshape: input type not supported.");
1802 std::array<DataType,6> supportedTypes =
1813 "Reference ResizeBilinear: input type not supported");
1816 "Reference ResizeBilinear: output type not supported");
1819 "Reference ResizeBilinear: input and output types not matching");
1831 std::array<DataType,6> supportedTypes =
1842 "Reference Resize: input type not supported");
1845 "Reference Resize: output type not supported");
1848 "Reference Resize: input and output types not matching");
1860 reasonIfUnsupported);
1870 std::array<DataType, 1> supportedTypes =
1876 "Reference Shape: output type not supported");
1889 std::array<DataType, 5> supportedTypes =
1899 "Reference Slice: input type not supported");
1902 "Reference Slice: output type not supported");
1905 "Reference Slice: input and output types are mismatched");
1917 std::array<DataType,7> supportedTypes =
1929 "Reference Softmax: output type not supported");
1932 "Reference Softmax: input type not supported");
1935 "Reference Softmax: input type not supported");
1947 std::array<DataType,6> supportedTypes =
1958 "Reference SpaceToBatchNd: input type not supported");
1961 "Reference SpaceToBatchNd: output type not supported");
1964 "Reference SpaceToBatchNd: input and output types are mismatched");
1978 std::array<DataType,6> supportedTypes =
1989 "Reference SpaceToDepth: input type not supported");
1992 "Reference SpaceToDepth: output type not supported");
1995 "Reference SpaceToDepth: input and output types are mismatched");
2006 std::array<DataType,6> supportedTypes =
2017 "Reference splitter: input type not supported");
2023 const std::vector<std::reference_wrapper<TensorInfo>>& outputs,
2029 std::array<DataType,6> supportedTypes =
2040 "Reference splitter: output type not supported");
2044 "Reference splitter: input type not supported");
2047 "Reference splitter: input and output types mismatched.");
2061 std::array<DataType,6> supportedTypes =
2072 "Reference stack: output type not supported");
2077 "Reference stack: input type not supported");
2080 "Reference stack: input and output types mismatched.");
2094 std::array<DataType,5> supportedTypes =
2104 "Reference StridedSlice: input type not supported");
2107 "Reference StridedSlice: output type not supported");
2110 "Reference StridedSlice: input and output types are mismatched");
2122 std::array<DataType,7> supportedTypes = {
2133 "Reference subtraction: input 0 is not a supported type.");
2136 "Reference subtraction: input 1 is not a supported type.");
2139 "Reference subtraction: output is not a supported type.");
2142 "Reference subtraction: input 0 and Input 1 types are mismatched");
2145 "Reference subtraction: input and output types are mismatched");
2148 "Reference subtraction: shapes are not suitable for implicit broadcast.");
2160 std::array<DataType, 6> supportedTypes
2171 "PReLU: input is not a supported type.");
2174 "PReLU: alpha is not a supported type.");
2177 "PReLU: output is not a supported type.");
2180 "PReLU: input, alpha and output types are mismatched");
2183 "PReLU: shapes are not suitable for implicit broadcast");
2198 std::array<DataType,7> supportedTypes =
2210 "Reference TransposeConvolution2d: input is not a supported type.");
2213 "Reference TransposeConvolution2d: output is not a supported type.");
2216 "Reference TransposeConvolution2d: input and output types mismatched.");
2223 std::array<DataType, 4> supportedWeightTypes =
2233 "Reference TransposeConvolution2d: weights type not supported for " 2234 "quantized input.");
2239 "Reference TransposeConvolution2d: weights is not a supported type.");
2242 "Reference TransposeConvolution2d: input and weights types mismatched.");
2247 std::array<DataType,4> biasesSupportedTypes =
2255 "Reference TransposeConvolution2d: biases is not a supported type.");
2270 std::array<DataType, 6> supportedTypes =
2281 "Reference transpose: input is not a supported type.");
2284 "Reference transpose: output is not a supported type.");
2287 "Reference transpose: input and output types are mismatched.");
2311 reasonIfUnsupported.
value() +=
"Reference UnidirectionalSequenceLstm: hidden state output " 2312 "and cell state output are not supported at the moment.";
2315 std::array<DataType, 1> supportedTypes =
2320 std::array<DataType, 1> supportedWeightTypes =
2327 "Reference UnidirectionalSequenceLstm: input is not a supported type.");
2329 "Reference UnidirectionalSequenceLstm: input and outputStateIn types are mismatched");
2331 "Reference UnidirectionalSequenceLstm: input and cellStateIn types are mismatched");
2334 "Reference UnidirectionalSequenceLstm: input and output types are mismatched");
2337 reasonIfUnsupported,
2338 "Reference UnidirectionalSequenceLstm: InputToForgetWeights " 2339 "is not a supported type.");
2341 reasonIfUnsupported,
2342 "Reference UnidirectionalSequenceLstm: InputToCellWeights is not a supported type.");
2344 reasonIfUnsupported,
2345 "Reference UnidirectionalSequenceLstm: InputToOutputWeights " 2346 "is not a supported type.");
2348 reasonIfUnsupported,
2349 "Reference UnidirectionalSequenceLstm: RecurrentToForgetWeights " 2350 "is not a supported type.");
2352 reasonIfUnsupported,
2353 "Reference UnidirectionalSequenceLstm: RecurrentToCellWeights " 2354 "is not a supported type.");
2356 reasonIfUnsupported,
2357 "Reference UnidirectionalSequenceLstm: RecurrentToOutputWeights " 2358 "is not a supported type.");
2360 "Reference UnidirectionalSequenceLstm: input and ForgetGateBias types " 2363 "Reference UnidirectionalSequenceLstm: input and CellBias types are mismatched");
2365 "Reference UnidirectionalSequenceLstm: input and OutputGateBias types " 2370 reasonIfUnsupported,
2371 "Reference UnidirectionalSequenceLstm: InputToInputWeights " 2372 "is not a supported type.");
2374 reasonIfUnsupported,
2375 "Reference UnidirectionalSequenceLstm: RecurrentToInputWeights " 2376 "is not a supported type.");
2378 "Reference UnidirectionalSequenceLstm: input and InputGateBias types " 2383 reasonIfUnsupported,
2384 "Reference UnidirectionalSequenceLstm: CellToInputWeights " 2385 "is not a supported type.");
2391 reasonIfUnsupported,
2392 "Reference UnidirectionalSequenceLstm: CellToForgetWeights " 2393 "is not a supported type.");
2395 reasonIfUnsupported,
2396 "Reference UnidirectionalSequenceLstm: CellToOutputWeights " 2397 "is not a supported type.");
2402 reasonIfUnsupported,
2403 "Reference UnidirectionalSequenceLstm: ProjectionWeights " 2404 "is not a supported type.");
2408 "Reference UnidirectionalSequenceLstm: input and ProjectionBias types " 2417 reasonIfUnsupported,
2418 "Reference UnidirectionalSequenceLstm: InputLayerNormWeights " 2419 "is not a supported type.");
2422 reasonIfUnsupported,
2423 "Reference UnidirectionalSequenceLstm: ForgetLayerNormWeights " 2424 "is not a supported type.");
2426 reasonIfUnsupported,
2427 "Reference UnidirectionalSequenceLstm: CellLayerNormWeights " 2428 "is not a supported type.");
2430 reasonIfUnsupported,
2431 "Reference UnidirectionalSequenceLstm: OutputLayerNormWeights " 2432 "is not a supported type.");
bool IsEqualSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool m_ProjectionEnabled
Enable/disable the projection layer.
bool IsComparisonSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, const ComparisonDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
UnaryOperation m_Operation
Specifies the elementwiseUnary operation to execute.
bool IsReshapeSupported(const TensorInfo &input, const TensorInfo &output, const ReshapeDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A ViewsDescriptor for the SplitterLayer.
bool IsSoftmaxSupported(const TensorInfo &input, const TensorInfo &output, const SoftmaxDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A TransposeConvolution2dDescriptor for the TransposeConvolution2dLayer.
bool IsPermuteSupported(const TensorInfo &input, const TensorInfo &output, const PermuteDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsPadSupported(const TensorInfo &input, const TensorInfo &output, const PadDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsLogSoftmaxSupported(const TensorInfo &input, const TensorInfo &output, const LogSoftmaxDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported) const override
A ReshapeDescriptor for the ReshapeLayer.
bool IsGatherSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, const GatherDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
#define ARMNN_NO_DEPRECATE_WARN_BEGIN
bool IsConvertFp32ToFp16Supported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A ComparisonDescriptor for the ComparisonLayer.
bool IsDilatedDepthwiseConvolutionSupported(const TensorInfo &input, const TensorInfo &output, const DepthwiseConvolution2dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsSliceSupported(const TensorInfo &input, const TensorInfo &output, const SliceDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsStackSupported(const std::vector< const TensorInfo *> &inputs, const TensorInfo &output, const StackDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
ISubgraphViewConverter supported
A Convolution2dDescriptor for the Convolution2dLayer.
bool IsPreluSupported(const TensorInfo &input, const TensorInfo &alpha, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsConvertBf16ToFp32Supported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsLogicalBinarySupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, const LogicalBinaryDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported) const override
bool IsQLstmSupported(const TensorInfo &input, const TensorInfo &previousOutputIn, const TensorInfo &previousCellStateIn, const TensorInfo &outputStateOut, const TensorInfo &cellStateOut, const TensorInfo &output, const QLstmDescriptor &descriptor, const LstmInputParamsInfo ¶msInfo, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsL2NormalizationSupported(const TensorInfo &input, const TensorInfo &output, const L2NormalizationDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A LogicalBinaryDescriptor for the LogicalBinaryLayer.
bool IsDepthToSpaceSupported(const TensorInfo &input, const TensorInfo &output, const DepthToSpaceDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsBatchNormalizationSupported(const TensorInfo &input, const TensorInfo &output, const TensorInfo &mean, const TensorInfo &var, const TensorInfo &beta, const TensorInfo &gamma, const BatchNormalizationDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
Copyright (c) 2021 ARM Limited and Contributors.
void IgnoreUnused(Ts &&...)
A SpaceToDepthDescriptor for the SpaceToDepthLayer.
bool IsDepthwiseConvolutionSupported(const TensorInfo &input, const TensorInfo &output, const DepthwiseConvolution2dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsFakeQuantizationSupported(const TensorInfo &input, const FakeQuantizationDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsBatchToSpaceNdSupported(const TensorInfo &input, const TensorInfo &output, const BatchToSpaceNdDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsResizeBilinearSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A BatchToSpaceNdDescriptor for the BatchToSpaceNdLayer.
bool IsMergerSupported(const std::vector< const TensorInfo *> inputs, const TensorInfo &output, const MergerDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsTransposeConvolution2dSupported(const TensorInfo &input, const TensorInfo &output, const TransposeConvolution2dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A ResizeDescriptor for the ResizeLayer.
std::vector< unsigned int > m_Axis
Values for the dimensions to reduce.
A StackDescriptor for the StackLayer.
constexpr bool IsQuantized8BitType(DataType dataType)
bool IsOutputSupported(const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsFullyConnectedSupported(const TensorInfo &input, const TensorInfo &output, const TensorInfo &weights, const TensorInfo &biases, const FullyConnectedDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsQuantizeSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsResizeSupported(const TensorInfo &input, const TensorInfo &output, const ResizeDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A PadDescriptor for the PadLayer.
bool IsConstantSupported(const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsArgMinMaxSupported(const TensorInfo &input, const TensorInfo &output, const ArgMinMaxDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsSpaceToBatchNdSupported(const TensorInfo &input, const TensorInfo &output, const SpaceToBatchNdDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
An LstmDescriptor for the LstmLayer.
#define ARMNN_NO_DEPRECATE_WARN_END
bool m_KeepDims
Enable/disable keep dimensions. If true, then the reduced dimensions that are of length 1 are kept...
bool IsMinimumSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsRsqrtSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A L2NormalizationDescriptor for the L2NormalizationLayer.
An ArgMinMaxDescriptor for ArgMinMaxLayer.
DataType GetDataType() const
An OriginsDescriptor for the ConcatLayer.
A ReduceDescriptor for the REDUCE operators.
bool has_value() const noexcept
A FullyConnectedDescriptor for the FullyConnectedLayer.
bool IsRankSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool m_BiasEnabled
Enable/disable bias.
A FakeQuantizationDescriptor for the FakeQuantizationLayer.
bool IsUnidirectionalSequenceLstmSupported(const TensorInfo &input, const TensorInfo &outputStateIn, const TensorInfo &cellStateIn, const TensorInfo &output, const Optional< TensorInfo > &hiddenStateOutput, const Optional< TensorInfo > &cellStateOutput, const UnidirectionalSequenceLstmDescriptor &descriptor, const LstmInputParamsInfo ¶msInfo, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsConvertFp16ToFp32Supported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A GatherDescriptor for the GatherLayer.
bool m_PeepholeEnabled
Enable/disable peephole.
bool IsMeanSupported(const TensorInfo &input, const TensorInfo &output, const MeanDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
#define ARMNN_ASSERT(COND)
A QLstmDescriptor for the QLstmLayer.
bool IsSpaceToDepthSupported(const TensorInfo &input, const TensorInfo &output, const SpaceToDepthDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsAdditionSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsStridedSliceSupported(const TensorInfo &input, const TensorInfo &output, const StridedSliceDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsSubtractionSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
An ActivationDescriptor for the ActivationLayer.
bool IsConvertFp32ToBf16Supported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsFloorSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsActivationSupported(const TensorInfo &input, const TensorInfo &output, const ActivationDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
min(a, max(b, input)) ReLu1 & ReLu6.
bool IsDebugSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A SliceDescriptor for the SliceLayer.
bool IsDetectionPostProcessSupported(const TensorInfo &boxEncodings, const TensorInfo &scores, const TensorInfo &anchors, const TensorInfo &detectionBoxes, const TensorInfo &detectionClasses, const TensorInfo &detectionScores, const TensorInfo &numDetections, const DetectionPostProcessDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A SpaceToBatchNdDescriptor for the SpaceToBatchNdLayer.
bool m_CifgEnabled
Enable/disable cifg (coupled input & forget gate).
int32_t m_Axis
The axis in params to gather indices from.
A ElementwiseUnaryDescriptor for the ElementwiseUnaryLayer.
bool IsElementwiseUnarySupported(const TensorInfo &input, const TensorInfo &output, const ElementwiseUnaryDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsMultiplicationSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsConcatSupported(const std::vector< const TensorInfo *> inputs, const TensorInfo &output, const ConcatDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsNormalizationSupported(const TensorInfo &input, const TensorInfo &output, const NormalizationDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsDequantizeSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A MeanDescriptor for the MeanLayer.
bool IsGreaterSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsMemCopySupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool m_LayerNormEnabled
Enable/disable layer normalization.
std::enable_if_t< std::is_unsigned< Source >::value &&std::is_unsigned< Dest >::value, Dest > numeric_cast(Source source)
A TransposeDescriptor for the TransposeLayer.
A StridedSliceDescriptor for the StridedSliceLayer.
bool IsInputSupported(const TensorInfo &input, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsDivisionSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsAbsSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsLstmSupported(const TensorInfo &input, const TensorInfo &outputStateIn, const TensorInfo &cellStateIn, const TensorInfo &scratchBuffer, const TensorInfo &outputStateOut, const TensorInfo &cellStateOut, const TensorInfo &output, const LstmDescriptor &descriptor, const LstmInputParamsInfo ¶msInfo, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsFillSupported(const TensorInfo &input, const TensorInfo &output, const FillDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsShapeSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsSplitterSupported(const TensorInfo &input, const ViewsDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A Pooling2dDescriptor for the Pooling2dLayer.
A NormalizationDescriptor for the NormalizationLayer.
bool IsTransposeSupported(const TensorInfo &input, const TensorInfo &output, const TransposeDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsCastSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
An InstanceNormalizationDescriptor for InstanceNormalizationLayer.
bool IsConvolution2dSupported(const TensorInfo &input, const TensorInfo &output, const Convolution2dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsInstanceNormalizationSupported(const TensorInfo &input, const TensorInfo &output, const InstanceNormalizationDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
unsigned int GetNumDimensions() const
bool IsSupportedForDataTypeGeneric(Optional< std::string &> reasonIfUnsupported, DataType dataType, Float16Func float16FuncPtr, Float32Func float32FuncPtr, Uint8Func uint8FuncPtr, Int32Func int32FuncPtr, BooleanFunc booleanFuncPtr, Params &&... params)
A SoftmaxDescriptor for the SoftmaxLayer.
bool CheckSupportRule(F rule, Optional< std::string &> reasonIfUnsupported, const char *reason)
ActivationFunction m_Function
The activation function to use (Sigmoid, TanH, Linear, ReLu, BoundedReLu, SoftReLu, LeakyReLu, Abs, Sqrt, Square, Elu).
bool IsMaximumSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A DepthwiseConvolution2dDescriptor for the DepthwiseConvolution2dLayer.
A FillDescriptor for the FillLayer.
bool IsPooling2dSupported(const TensorInfo &input, const TensorInfo &output, const Pooling2dDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A BatchNormalizationDescriptor for the BatchNormalizationLayer.
bool IsReduceSupported(const TensorInfo &input, const TensorInfo &output, const ReduceDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A PermuteDescriptor for the PermuteLayer.