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.";
66 bool supported =
true;
69 std::array<DataType,6> supportedTypes = {
79 "Reference activation: input type not supported.");
82 "Reference activation: output type not supported.");
85 "Reference activation: input and output types mismatched.");
88 "Reference activation: input and output shapes are of different rank.");
91 struct ActivationFunctionSupported :
public Rule 123 supported &=
CheckSupportRule(ActivationFunctionSupported(descriptor), reasonIfUnsupported,
124 "Reference activation: function not supported.");
134 bool supported =
true;
136 std::array<DataType,7> supportedTypes = {
147 "Reference addition: input 0 is not a supported type.");
150 "Reference addition: input 1 is not a supported type.");
153 "Reference addition: output is not a supported type.");
156 "Reference addition: input 0 and Input 1 types are mismatched");
159 "Reference addition: input and output types are mismatched");
162 "Reference addition: shapes are not suitable for implicit broadcast.");
173 std::array<DataType, 8> supportedInputTypes =
185 std::array<DataType,2> supportedOutputTypes = {
190 bool supported =
true;
193 "Reference ArgMinMax: input is not a supported type.");
195 "Reference ArgMinMax: output type not supported");
211 std::array<DataType, 6> supportedTypes =
221 bool supported =
true;
224 "Reference batch normalization: input is not a supported type.");
227 "Reference batch normalization: output is not a supported type.");
230 "Reference batch normalization: input and output types are mismatched");
233 "Reference batch normalization: mean is not a supported type.");
236 "Reference batch normalization: variance is not a supported type.");
239 "Reference batch normalization: beta is not a supported type.");
242 "Reference batch normalization: gamma is not a supported type.");
254 bool supported =
true;
256 std::string batchToSpaceNdLayerStr =
"batchToSpaceNd";
257 std::string inputTensorStr =
"input";
258 std::string outputTensorStr =
"output";
261 std::array<DataType,6> supportedTypes =
272 "Reference BatchToSpaceNd: input type not supported.");
275 "Reference BatchToSpaceNd: output type not supported.");
278 "Reference BatchToSpaceNd: input and output types mismatched.");
282 CreateIncorrectDimensionsErrorMsg(4,
284 batchToSpaceNdLayerStr,
285 outputTensorStr).data());
289 CreateIncorrectDimensionsErrorMsg(4,
291 batchToSpaceNdLayerStr,
292 inputTensorStr).data());
301 std::array<DataType, 9> supportedInputTypes =
313 bool supported =
true;
315 "Reference cast: input is not a supported type");
319 "Reference cast: output is not a supported type");
322 "Reference cast: input and output shapes have different number of total elements");
333 bool supported =
true;
336 std::array<DataType, 7> supportedTypes =
348 "Reference ChannelShuffle: input is not a supported type.");
351 "Reference ChannelShuffle: output is not a supported type.");
354 "Reference ChannelShuffle: input and output types are mismatched.");
367 std::array<DataType, 8> supportedInputTypes =
379 bool supported =
true;
381 "Reference comparison: input 0 is not a supported type");
384 "Reference comparison: input 0 and Input 1 types are mismatched");
387 "Reference comparison: output is not of type Boolean");
399 bool supported =
true;
400 std::array<DataType,6> supportedTypes =
411 "Reference concatenation: output type not supported");
416 "Reference concatenation: input type not supported");
419 "Reference concatenation: input and output types mismatched.");
428 std::array<DataType,8> supportedTypes =
441 "Reference constant: output is not a supported type.");
448 bool supported =
true;
451 "Reference for ConvertBf16ToFp32 layer: input type not supported");
454 "Reference for ConvertBf16ToFp32 layer: output type not supported");
466 &FalseInputFuncF32<>,
472 &FalseOutputFuncF16<>,
483 bool supported =
true;
486 "Reference for ConvertFp32ToBf16 layer: input type not supported");
489 "Reference for ConvertFp32ToBf16 layer: output type not supported");
500 &FalseInputFuncF16<>,
508 &FalseOutputFuncF32<>,
521 bool supported =
true;
524 std::array<DataType,7> supportedTypes =
536 "Reference Convolution2d: input is not a supported type.");
539 "Reference Convolution2d: output is not a supported type.");
546 reasonIfUnsupported.
value() +=
"Output tensor type must be BFloat16 or Float32 for BFloat16 input.\n";
553 "Reference Convolution2d: input and output types mismatched.");
559 std::array<DataType, 3> supportedWeightTypes =
567 "Reference Convolution2d: weights type not supported for quantized input.");
572 "Reference Convolution2d: weights is not a supported type.");
575 "Reference Convolution2d: input and weights types mismatched.");
580 std::array<DataType,4> biasesSupportedTypes =
589 "Reference Convolution2d: biases is not a supported type.");
603 bool supported =
true;
606 std::array<DataType,7> supportedTypes =
618 "Reference Convolution3d: input is not a supported type.");
621 "Reference Convolution3d: output is not a supported type.");
624 "Reference Convolution3d: input and output types mismatched.");
629 std::array<DataType, 3> supportedWeightTypes =
637 "Reference Convolution3d: weights type not supported for quantized input.");
642 "Reference Convolution3d: weights is not a supported type.");
645 "Reference Convolution3d: input and weights types mismatched.");
650 std::array<DataType,4> biasesSupportedTypes =
659 "Reference Convolution3d: biases is not a supported type.");
670 bool supported =
true;
672 std::array<DataType, 8> supportedTypes =
685 "Reference for Debug layer: input type not supported");
688 "Reference for Debug layer: output type not supported");
691 "Reference for Debug layer: input and output types are mismatched");
702 bool supported =
true;
704 std::array<DataType,6> supportedTypes =
715 "Reference DepthToSpace: input type not supported");
718 "Reference DepthToSpace: output type not supported");
721 "Reference DepthToSpace: input and output types are mismatched");
734 bool supported =
true;
737 std::array<DataType,7> supportedTypes =
749 "Reference DepthwiseConvolution2d: input is not a supported type.");
752 "Reference DepthwiseConvolution2d: output is not a supported type.");
755 "Reference DepthwiseConvolution2d: input and output types mismatched.");
760 std::array<DataType, 3> supportedWeightTypes =
768 "Reference DepthwiseConvolution2d: weights type not supported for " 774 "Reference DepthwiseConvolution2d: weights is not a supported type.");
777 "Reference DepthwiseConvolution2d: input and weights types mismatched.");
782 std::array<DataType,4> biasesSupportedTypes =
790 "Reference DepthwiseConvolution2d: biases is not a supported type.");
801 bool supported =
true;
803 std::array<DataType,4> supportedInputTypes = {
811 "Reference for Dequantize layer: input type not supported.");
814 "Reference for Dequantize layer: per-axis quantized input not supported.");
816 std::array<DataType,3> supportedOutputTypes = {
823 "Reference for Dequantize layer: output type not supported.");
826 "Reference for Dequantize layer: input/output shapes have different num total " 842 IgnoreUnused(anchors, detectionBoxes, detectionClasses, detectionScores, numDetections, descriptor);
844 bool supported =
true;
846 std::array<DataType,6> supportedInputTypes =
857 "Reference DetectionPostProcess: input 0 is not a supported type.");
860 "Reference DetectionPostProcess: input 1 is not a supported type.");
880 bool supported =
true;
882 std::array<DataType,7> supportedTypes = {
893 "Reference division: input 0 is not a supported type.");
896 "Reference division: input 1 is not a supported type.");
899 "Reference division: output is not a supported type.");
902 "Reference division: input 0 and Input 1 types are mismatched");
905 "Reference division: input and output types are mismatched");
908 "Reference division: shapes are not suitable for implicit broadcast.");
920 std::array<DataType, 7> supportedTypes =
931 std::array<DataType, 1> logicalSupportedTypes =
936 bool supported =
true;
941 "Reference elementwise unary: input type not supported");
944 "Reference elementwise unary: output type not supported");
949 "Reference elementwise unary: input type not supported");
952 "Reference elementwise unary: output type not supported");
956 "Reference elementwise unary: input and output types not matching");
959 "Reference elementwise unary: input and output shapes" 960 "have different number of total elements");
970 bool supported =
true;
972 std::array<DataType,1> supportedTypes =
978 "Reference fake quantization: input type not supported.");
991 bool supported =
true;
993 std::array<DataType,3> supportedTypes =
1001 "Reference Fill: input type not supported.");
1004 "Reference Fill: output type not supported.");
1013 bool supported =
true;
1015 std::array<DataType,3> supportedTypes =
1023 "Reference Floor: input type not supported.");
1026 "Reference Floor: output type not supported.");
1038 bool supported =
true;
1041 std::array<DataType,6> supportedTypes =
1052 "Reference Fully Connected: input type not supported.");
1055 "Reference Fully Connected: output type not supported.");
1058 "Reference Fully Connected: weights type not supported.");
1065 reasonIfUnsupported.
value() +=
"Output tensor type must be BFloat16 or Float32 for BFloat16 input.\n";
1072 "Reference Fully Connected: input and output types mismatched.");
1076 "Reference Fully Connected: weights is not a supported type.");
1079 "Reference Fully Connected: input and weights types mismatched.");
1084 std::array<DataType, 5>
1085 supportedBiasTypes =
1095 "Reference Fully Connected: bias type not supported.");
1098 "Reference Fully Connected: bias and weight types mismatch.");
1101 "Reference Fully Connected: bias type inferred from weights is incompatible.");
1104 "Reference Fully Connected: bias must have 1 dimension.");
1117 bool supported =
true;
1118 std::array<DataType,7> supportedTypes =
1129 if (descriptor.
m_Axis != 0)
1131 reasonIfUnsupported.
value() += std::string(
"Reference Gather: axis not supported\n");
1135 "Reference Gather: input type not supported");
1138 "Reference Gather: output type not supported");
1141 "Reference Gather: indices (input1) type not supported");
1144 "Reference Gather: input and output types not matching");
1162 std::array<DataType, 3> supportedTypes =
1169 bool supported =
true;
1172 "Reference Instance Normalization: input type not supported.");
1175 "Reference Instance Normalization: output type not supported.");
1178 "Reference Instance Normalization: input and output types mismatched.");
1181 "Reference Instance Normalization: input and output shapes have different " 1182 "num total elements.");
1194 std::array<DataType, 6> supportedTypes =
1204 bool supported =
true;
1207 "Reference L2normalization: input type not supported.");
1210 "Reference L2normalization: output type not supported.");
1213 "Reference L2normalization: input and output types mismatched.");
1216 "Reference L2normalization: input and output shapes have different " 1217 "num total elements.");
1230 std::array<DataType, 1> supportedTypes =
1235 bool supported =
true;
1237 "Reference LogicalBinary: input 0 type not supported");
1239 "Reference LogicalBinary: input 1 type not supported");
1242 "Reference LogicalBinary: input and output types do not match");
1254 std::array<DataType, 3> supportedTypes =
1261 bool supported =
true;
1263 "Reference LogSoftmax: input type not supported");
1266 "Reference LogSoftmax: output type not supported");
1269 "Reference LogSoftmax: input and output types do not match");
1288 bool supported =
true;
1290 std::array<DataType,3> supportedTypes = {
1298 "Reference Lstm: input is not a supported type.");
1300 "Reference Lstm: input and outputStateIn types are mismatched");
1302 "Reference Lstm: input and cellStateIn types are mismatched");
1304 "Reference Lstm: input and scratchBuffer types are mismatched");
1306 "Reference Lstm: input and outputStateOut types are mismatched");
1308 "Reference Lstm: input and cellStateOut types are mismatched");
1311 "Reference Lstm: input and output types are mismatched");
1314 "Reference Lstm: input and InputToForgetWeights types are mismatched");
1316 "Reference Lstm: input and InputToCellWeights types are mismatched");
1318 "Reference Lstm: input and InputToOutputWeights types are mismatched");
1320 "Reference Lstm: input and RecurrentToForgetWeights types are mismatched");
1322 "Reference Lstm: input and RecurrentToCellWeights types are mismatched");
1324 "Reference Lstm: input and RecurrentToOutputWeights types are mismatched");
1326 "Reference Lstm: input and ForgetGateBias types are mismatched");
1328 "Reference Lstm: input and CellBias types are mismatched");
1330 "Reference Lstm: input and OutputGateBias types are mismatched");
1334 "Reference Lstm: input and InputToInputWeights types are mismatched");
1336 reasonIfUnsupported,
1337 "Reference Lstm: input and RecurrentToInputWeights types are mismatched");
1339 "Reference Lstm: input and InputGateBias types are mismatched");
1343 reasonIfUnsupported,
1344 "Reference Lstm: input and CellToInputWeights types are mismatched");
1350 "Reference Lstm: input and CellToForgetWeights types are mismatched");
1352 "Reference Lstm: input and CellToOutputWeights types are mismatched");
1357 "Reference Lstm: input and mProjectionWeights types are mismatched");
1361 "Reference Lstm: input and ProjectionBias types are mismatched");
1369 reasonIfUnsupported,
1370 "Reference Lstm: input and InputLayerNormWeights types are mismatched");
1373 reasonIfUnsupported,
1374 "Reference Lstm: input and ForgetLayerNormWeights types are mismatched");
1376 reasonIfUnsupported,
1377 "Reference Lstm: input and CellLayerNormWeights types are mismatched");
1379 reasonIfUnsupported,
1380 "Reference Lstm: input and OutputLayerNormWeights types are mismatched");
1391 bool supported =
true;
1393 std::array<DataType,7> supportedTypes = {
1404 "Reference maximum: input 0 is not a supported type.");
1407 "Reference maximum: input 1 is not a supported type.");
1410 "Reference maximum: output is not a supported type.");
1413 "Reference maximum: input 0 and Input 1 types are mismatched");
1416 "Reference maximum: input and output types are mismatched");
1419 "Reference maximum: shapes are not suitable for implicit broadcast.");
1429 bool supported =
true;
1430 std::string meanLayerStr =
"Mean";
1431 std::string outputTensorStr =
"output";
1433 std::array<DataType,6> supportedTypes =
1444 "Reference Mean: input type not supported.");
1447 "Reference Mean: input and output types are mismatched");
1452 reasonIfUnsupported,
1455 meanLayerStr, outputTensorStr).data());
1457 else if (descriptor.
m_Axis.empty())
1460 reasonIfUnsupported,
1462 meanLayerStr, outputTensorStr).data());
1471 reasonIfUnsupported,
1473 meanLayerStr, outputTensorStr).data());
1478 reasonIfUnsupported,
1480 meanLayerStr, outputTensorStr).data());
1491 bool supported =
true;
1493 std::array<DataType,7> supportedTypes =
1505 "Reference MemCopy: input type not supported");
1508 "Reference MemCopy: output type not supported");
1511 "Reference MemCopy: input and output types are mismatched");
1521 bool supported =
true;
1523 std::array<DataType,7> supportedTypes = {
1534 "Reference minimum: input 0 is not a supported type.");
1537 "Reference minimum: input 1 is not a supported type.");
1540 "Reference minimum: output is not a supported type.");
1543 "Reference minimum: input 0 and Input 1 types are mismatched");
1546 "Reference minimum: input and output types are mismatched");
1549 "Reference minimum: shapes are not suitable for implicit broadcast.");
1559 bool supported =
true;
1561 std::array<DataType,7> supportedTypes = {
1572 "Reference multiplication: input 0 is not a supported type.");
1575 "Reference multiplication: input 1 is not a supported type.");
1578 "Reference multiplication: output is not a supported type.");
1581 "Reference multiplication: input 0 and Input 1 types are mismatched");
1584 "Reference multiplication: input and output types are mismatched");
1587 "Reference multiplication: shapes are not suitable for implicit broadcast.");
1600 std::array<DataType, 6> supportedTypes =
1610 bool supported =
true;
1613 "Reference normalization: input type not supported.");
1616 "Reference normalization: output type not supported.");
1619 "Reference normalization: input and output shapes have different " 1620 "num total elements.");
1637 bool supported =
true;
1640 std::array<DataType,6> supportedTypes =
1651 "Reference pad: input is not a supported type.");
1654 "Reference pad: output is not a supported type.");
1657 "Reference pad: input and output types are mismatched.");
1668 bool supported =
true;
1671 std::array<DataType, 6> supportedTypes =
1682 "Reference permute: input is not a supported type.");
1685 "Reference permute: output is not a supported type.");
1688 "Reference permute: input and output types are mismatched.");
1699 bool supported =
true;
1702 std::array<DataType,6> supportedTypes =
1713 "Reference poolind2d: input is not a supported type.");
1716 "Reference poolind2d: output is not a supported type.");
1719 "Reference poolind2d: input and output types are mismatched.");
1752 bool supported =
true;
1755 std::array<DataType,7> supportedInputTypes = {
1766 "Reference quantize: input type not supported.");
1769 std::array<DataType,4> supportedOutputTypes = {
1776 "Reference quantize: output type not supported.");
1779 "Reference quantize: input and output shapes have different num total elements.");
1790 std::array<DataType,1> supportedOutputTypes =
1796 "Reference rank: input type not supported.");
1805 bool supported =
true;
1806 std::array<DataType,7> supportedTypes =
1818 "Reference Reduce: input type not supported");
1821 "Reference Reduce: output type not supported");
1824 "Reference Reduce: input and output types not matching");
1837 std::array<DataType,8> supportedOutputTypes =
1850 "Reference reshape: input type not supported.");
1859 bool supported =
true;
1860 std::array<DataType,6> supportedTypes =
1871 "Reference Resize: input type not supported");
1874 "Reference Resize: output type not supported");
1877 "Reference Resize: input and output types not matching");
1887 bool supported =
true;
1889 std::array<DataType, 1> supportedTypes =
1895 "Reference Shape: output type not supported");
1906 bool supported =
true;
1908 std::array<DataType, 5> supportedTypes =
1918 "Reference Slice: input type not supported");
1921 "Reference Slice: output type not supported");
1924 "Reference Slice: input and output types are mismatched");
1935 bool supported =
true;
1936 std::array<DataType,7> supportedTypes =
1948 "Reference Softmax: output type not supported");
1951 "Reference Softmax: input type not supported");
1954 "Reference Softmax: input type not supported");
1965 bool supported =
true;
1966 std::array<DataType,6> supportedTypes =
1977 "Reference SpaceToBatchNd: input type not supported");
1980 "Reference SpaceToBatchNd: output type not supported");
1983 "Reference SpaceToBatchNd: input and output types are mismatched");
1995 bool supported =
true;
1997 std::array<DataType,6> supportedTypes =
2008 "Reference SpaceToDepth: input type not supported");
2011 "Reference SpaceToDepth: output type not supported");
2014 "Reference SpaceToDepth: input and output types are mismatched");
2020 const std::vector<std::reference_wrapper<TensorInfo>>& outputs,
2025 bool supported =
true;
2026 std::array<DataType,6> supportedTypes =
2037 "Reference splitter: output type not supported");
2041 "Reference splitter: input type not supported");
2044 "Reference splitter: input and output types mismatched.");
2057 bool supported =
true;
2058 std::array<DataType,6> supportedTypes =
2069 "Reference stack: output type not supported");
2074 "Reference stack: input type not supported");
2077 "Reference stack: input and output types mismatched.");
2089 bool supported =
true;
2091 std::array<DataType,5> supportedTypes =
2101 "Reference StridedSlice: input type not supported");
2104 "Reference StridedSlice: output type not supported");
2107 "Reference StridedSlice: input and output types are mismatched");
2117 bool supported =
true;
2119 std::array<DataType,7> supportedTypes = {
2130 "Reference subtraction: input 0 is not a supported type.");
2133 "Reference subtraction: input 1 is not a supported type.");
2136 "Reference subtraction: output is not a supported type.");
2139 "Reference subtraction: input 0 and Input 1 types are mismatched");
2142 "Reference subtraction: input and output types are mismatched");
2145 "Reference subtraction: shapes are not suitable for implicit broadcast.");
2155 bool supported =
true;
2157 std::array<DataType, 6> supportedTypes
2168 "PReLU: input is not a supported type.");
2171 "PReLU: alpha is not a supported type.");
2174 "PReLU: output is not a supported type.");
2177 "PReLU: input, alpha and output types are mismatched");
2180 "PReLU: shapes are not suitable for implicit broadcast");
2193 bool supported =
true;
2195 std::array<DataType,7> supportedTypes =
2207 "Reference TransposeConvolution2d: input is not a supported type.");
2210 "Reference TransposeConvolution2d: output is not a supported type.");
2213 "Reference TransposeConvolution2d: input and output types mismatched.");
2219 std::array<DataType, 3> supportedWeightTypes =
2227 "Reference TransposeConvolution2d: weights type not supported for " 2228 "quantized input.");
2233 "Reference TransposeConvolution2d: weights is not a supported type.");
2236 "Reference TransposeConvolution2d: input and weights types mismatched.");
2241 std::array<DataType,4> biasesSupportedTypes =
2249 "Reference TransposeConvolution2d: biases is not a supported type.");
2261 bool supported =
true;
2264 std::array<DataType, 6> supportedTypes =
2275 "Reference transpose: input is not a supported type.");
2278 "Reference transpose: output is not a supported type.");
2281 "Reference transpose: input and output types are mismatched.");
2301 bool supported =
true;
2305 reasonIfUnsupported.
value() +=
"Reference UnidirectionalSequenceLstm: hidden state output " 2306 "and cell state output are not supported at the moment.";
2309 std::array<DataType, 1> supportedTypes =
2314 std::array<DataType, 2> supportedWeightTypes =
2322 "Reference UnidirectionalSequenceLstm: input is not a supported type.");
2324 "Reference UnidirectionalSequenceLstm: input and outputStateIn types are mismatched");
2326 "Reference UnidirectionalSequenceLstm: input and cellStateIn types are mismatched");
2329 "Reference UnidirectionalSequenceLstm: input and output types are mismatched");
2332 reasonIfUnsupported,
2333 "Reference UnidirectionalSequenceLstm: InputToForgetWeights " 2334 "is not a supported type.");
2336 reasonIfUnsupported,
2337 "Reference UnidirectionalSequenceLstm: InputToCellWeights is not a supported type.");
2339 reasonIfUnsupported,
2340 "Reference UnidirectionalSequenceLstm: InputToOutputWeights " 2341 "is not a supported type.");
2343 reasonIfUnsupported,
2344 "Reference UnidirectionalSequenceLstm: RecurrentToForgetWeights " 2345 "is not a supported type.");
2347 reasonIfUnsupported,
2348 "Reference UnidirectionalSequenceLstm: RecurrentToCellWeights " 2349 "is not a supported type.");
2351 reasonIfUnsupported,
2352 "Reference UnidirectionalSequenceLstm: RecurrentToOutputWeights " 2353 "is not a supported type.");
2355 "Reference UnidirectionalSequenceLstm: input and ForgetGateBias types " 2358 "Reference UnidirectionalSequenceLstm: input and CellBias types are mismatched");
2360 "Reference UnidirectionalSequenceLstm: input and OutputGateBias types " 2365 reasonIfUnsupported,
2366 "Reference UnidirectionalSequenceLstm: InputToInputWeights " 2367 "is not a supported type.");
2369 reasonIfUnsupported,
2370 "Reference UnidirectionalSequenceLstm: RecurrentToInputWeights " 2371 "is not a supported type.");
2373 "Reference UnidirectionalSequenceLstm: input and InputGateBias types " 2378 reasonIfUnsupported,
2379 "Reference UnidirectionalSequenceLstm: CellToInputWeights " 2380 "is not a supported type.");
2386 reasonIfUnsupported,
2387 "Reference UnidirectionalSequenceLstm: CellToForgetWeights " 2388 "is not a supported type.");
2390 reasonIfUnsupported,
2391 "Reference UnidirectionalSequenceLstm: CellToOutputWeights " 2392 "is not a supported type.");
2397 reasonIfUnsupported,
2398 "Reference UnidirectionalSequenceLstm: ProjectionWeights " 2399 "is not a supported type.");
2403 "Reference UnidirectionalSequenceLstm: input and ProjectionBias types " 2412 reasonIfUnsupported,
2413 "Reference UnidirectionalSequenceLstm: InputLayerNormWeights " 2414 "is not a supported type.");
2417 reasonIfUnsupported,
2418 "Reference UnidirectionalSequenceLstm: ForgetLayerNormWeights " 2419 "is not a supported type.");
2421 reasonIfUnsupported,
2422 "Reference UnidirectionalSequenceLstm: CellLayerNormWeights " 2423 "is not a supported type.");
2425 reasonIfUnsupported,
2426 "Reference UnidirectionalSequenceLstm: OutputLayerNormWeights " 2427 "is not a supported type.");
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
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
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 IsSplitterSupported(const TensorInfo &input, const std::vector< std::reference_wrapper< TensorInfo >> &outputs, const ViewsDescriptor &descriptor, 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
bool IsConvolution3dSupported(const TensorInfo &input, const TensorInfo &output, const Convolution3dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, 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
A BatchToSpaceNdDescriptor for the BatchToSpaceNdLayer.
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 ResizeBilinearDescriptor for the ResizeBilinearLayer.
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.
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
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.
A Convolution3dDescriptor for the Convolution3dLayer.
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 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 IsChannelShuffleSupported(const TensorInfo &input, const TensorInfo &output, const ChannelShuffleDescriptor &descriptor, 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 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
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.
A ChannelShuffleDescriptor for the ChannelShuffle operator.
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.