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.";
62 const std::vector<TensorInfo>& infos,
73 *(PolymorphicDowncast<const ActivationDescriptor*>(&descriptor)),
80 *(PolymorphicDowncast<const ArgMinMaxDescriptor*>(&descriptor)),
86 *(PolymorphicDowncast<const BatchMatMulDescriptor*>(&descriptor)),
95 *(PolymorphicDowncast<const BatchNormalizationDescriptor*>
101 *(PolymorphicDowncast<const BatchToSpaceNdDescriptor*>(&descriptor)),
102 reasonIfUnsupported);
106 *(PolymorphicDowncast<const BroadcastToDescriptor*>(&descriptor)),
107 reasonIfUnsupported);
112 *(PolymorphicDowncast<const ComparisonDescriptor*>(&descriptor)),
113 reasonIfUnsupported);
116 std::vector<const TensorInfo*> inputInfos;
117 for (uint32_t i = 0; i < (infos.size() - 1); i++)
119 inputInfos.push_back(&infos[i]);
122 infos[infos.size() - 1],
123 *(PolymorphicDowncast<const OriginsDescriptor*>(&descriptor)),
124 reasonIfUnsupported);
134 if (infos.size() != 4)
137 "TensorInfos should be of format: {input, output, weights, biases}.");
140 auto desc = *(PolymorphicDowncast<const Convolution2dDescriptor*>(&descriptor));
148 reasonIfUnsupported);
157 reasonIfUnsupported);
163 *(PolymorphicDowncast<const DepthToSpaceDescriptor*>(&descriptor)),
164 reasonIfUnsupported);
167 if (infos.size() != 4)
170 "TensorInfos should be of format: {input, output, weights, biases}.");
173 auto desc = *(PolymorphicDowncast<const DepthwiseConvolution2dDescriptor*>(&descriptor));
181 reasonIfUnsupported);
190 reasonIfUnsupported);
199 std::array<DataType, 7> supportedTypes =
209 bool supported =
true;
211 "Reference elementwise unary: input type not supported");
214 "Reference elementwise unary: input type not supported");
217 "Reference elementwise unary: output type not supported");
220 "Reference elementwise unary: input types not matching");
223 "Reference elementwise unary: input and output types not matching");
230 *(PolymorphicDowncast<const ElementwiseUnaryDescriptor*>(&descriptor)),
231 reasonIfUnsupported);
235 *(PolymorphicDowncast<const FillDescriptor*>(&descriptor)),
236 reasonIfUnsupported);
244 *(PolymorphicDowncast<const FullyConnectedDescriptor*>(&descriptor)),
245 reasonIfUnsupported);
250 *(PolymorphicDowncast<const GatherDescriptor*>(&descriptor)),
251 reasonIfUnsupported);
256 reasonIfUnsupported);
262 *(PolymorphicDowncast<const InstanceNormalizationDescriptor*>
264 reasonIfUnsupported);
268 *(PolymorphicDowncast<const L2NormalizationDescriptor*>(&descriptor)),
269 reasonIfUnsupported);
274 *(PolymorphicDowncast<const LogicalBinaryDescriptor*>(&descriptor)),
275 reasonIfUnsupported);
279 *(PolymorphicDowncast<const LogSoftmaxDescriptor*>(&descriptor)),
280 reasonIfUnsupported);
289 *(PolymorphicDowncast<const LstmDescriptor*>(&descriptor)),
290 lstmParamsInfo.
value(),
291 reasonIfUnsupported);
299 *(PolymorphicDowncast<const QLstmDescriptor*>(&descriptor)),
300 lstmParamsInfo.
value(),
301 reasonIfUnsupported);
307 *(PolymorphicDowncast<const MeanDescriptor*>(&descriptor)),
308 reasonIfUnsupported);
316 *(PolymorphicDowncast<const NormalizationDescriptor*>(&descriptor)),
317 reasonIfUnsupported);
323 *(PolymorphicDowncast<const PadDescriptor*>(&descriptor)),
324 reasonIfUnsupported);
328 *(PolymorphicDowncast<const PermuteDescriptor*>(&descriptor)),
329 reasonIfUnsupported);
333 *(PolymorphicDowncast<const Pooling2dDescriptor*>(&descriptor)),
334 reasonIfUnsupported);
342 *(PolymorphicDowncast<const ReshapeDescriptor*>(&descriptor)),
343 reasonIfUnsupported);
347 *(PolymorphicDowncast<const ResizeDescriptor*>(&descriptor)),
348 reasonIfUnsupported);
353 reasonIfUnsupported);
357 *(PolymorphicDowncast<const ReduceDescriptor*>(&descriptor)),
358 reasonIfUnsupported);
362 *(PolymorphicDowncast<const SliceDescriptor*>(&descriptor)),
363 reasonIfUnsupported);
367 *(PolymorphicDowncast<const SoftmaxDescriptor*>(&descriptor)),
368 reasonIfUnsupported);
372 *(PolymorphicDowncast<const SpaceToBatchNdDescriptor*>(&descriptor)),
373 reasonIfUnsupported);
377 *(PolymorphicDowncast<const SpaceToDepthDescriptor*>(&descriptor)),
378 reasonIfUnsupported);
381 std::vector<TensorInfo> outputInfos;
382 for (uint32_t i = 1; i < infos.size(); i++)
384 outputInfos.push_back(infos[i]);
387 {outputInfos.begin(), outputInfos.end()},
388 *(PolymorphicDowncast<const ViewsDescriptor*>(&descriptor)),
389 reasonIfUnsupported);
393 std::vector<const TensorInfo*> inputInfos;
394 for (uint32_t i = 0; i < infos.size() - 1; i++)
396 inputInfos.push_back(&infos[i]);
399 infos[infos.size() - 1],
400 *(PolymorphicDowncast<const StackDescriptor*>(&descriptor)),
401 reasonIfUnsupported);
406 *(PolymorphicDowncast<const StridedSliceDescriptor*>(&descriptor)),
407 reasonIfUnsupported);
413 *(PolymorphicDowncast<const TileDescriptor*>(&descriptor)),
414 reasonIfUnsupported);
418 *(PolymorphicDowncast<const TransposeDescriptor*>(&descriptor)),
419 reasonIfUnsupported);
422 if (infos.size() != 4)
425 "TensorInfos should be of format: {input, output, weights, biases}.");
428 auto desc = *(PolymorphicDowncast<const TransposeConvolution2dDescriptor*>(&descriptor));
436 reasonIfUnsupported);
445 reasonIfUnsupported);
453 *(PolymorphicDowncast<const ChannelShuffleDescriptor*>(&descriptor)),
454 reasonIfUnsupported);
457 if (infos.size() != 4)
460 "TensorInfos should be of format: {input, output, weights, biases}.");
463 auto desc = *(PolymorphicDowncast<const Convolution3dDescriptor*>(&descriptor));
471 reasonIfUnsupported);
480 reasonIfUnsupported);
493 *(PolymorphicDowncast<const DetectionPostProcessDescriptor*>
495 reasonIfUnsupported);
498 *(PolymorphicDowncast<const FakeQuantizationDescriptor*>(&descriptor)),
499 reasonIfUnsupported);
508 if (infos.size() != 6)
511 "should be of format: {input, outputStateIn, cellStateIn, "
512 "hiddenStateOutputVal, cellStateOutputVal, output}");
514 auto desc = *(PolymorphicDowncast<const UnidirectionalSequenceLstmDescriptor*>(&descriptor));
522 lstmParamsInfo.
value(),
523 reasonIfUnsupported);
528 *(PolymorphicDowncast<const Pooling3dDescriptor*>(&descriptor)),
529 reasonIfUnsupported);
544 quantizedLstmInputParamsInfo.
value(),
545 reasonIfUnsupported);
558 bool supported =
true;
561 std::array<DataType,6> supportedTypes = {
570 "Reference activation: input type not supported.");
573 "Reference activation: output type not supported.");
576 "Reference activation: input and output types mismatched.");
579 "Reference activation: input and output shapes are of different rank.");
582 struct ActivationFunctionSupported :
public Rule
615 supported &=
CheckSupportRule(ActivationFunctionSupported(descriptor), reasonIfUnsupported,
616 "Reference activation: function not supported.");
626 bool supported =
true;
628 std::array<DataType,7> supportedTypes = {
638 "Reference addition: input 0 is not a supported type.");
641 "Reference addition: input 1 is not a supported type.");
644 "Reference addition: output is not a supported type.");
647 "Reference addition: input 0 and Input 1 types are mismatched");
650 "Reference addition: input and output types are mismatched");
653 "Reference addition: shapes are not suitable for implicit broadcast.");
664 std::array<DataType, 8> supportedInputTypes =
675 std::array<DataType,2> supportedOutputTypes = {
680 bool supported =
true;
683 "Reference ArgMinMax: input is not a supported type.");
685 "Reference ArgMinMax: output type not supported");
698 std::array<DataType, 6> supportedTypes =
707 bool supported =
true;
710 "Reference batch matrix multiplication: input X is not a supported type");
713 "Reference batch matrix multiplication: input Y is not a supported type");
716 "Reference batch matrix multiplication: output is not a supported type");
719 "Reference batch matrix multiplication: input X and input Y types are mismatched");
722 "Reference batch matrix multiplication: inputs and output types are mismatched");
726 "Reference batch matrix multiplication: input X is not of rank 2 or greater");
730 "Reference batch matrix multiplication: input Y is not of rank 2 or greater");
746 std::array<DataType, 6> supportedTypes =
755 bool supported =
true;
758 "Reference batch normalization: input is not a supported type.");
761 "Reference batch normalization: output is not a supported type.");
764 "Reference batch normalization: input and output types are mismatched");
767 "Reference batch normalization: mean is not a supported type.");
770 "Reference batch normalization: variance is not a supported type.");
773 "Reference batch normalization: beta is not a supported type.");
776 "Reference batch normalization: gamma is not a supported type.");
788 bool supported =
true;
790 std::string batchToSpaceNdLayerStr =
"batchToSpaceNd";
791 std::string inputTensorStr =
"input";
792 std::string outputTensorStr =
"output";
795 std::array<DataType,6> supportedTypes =
805 "Reference BatchToSpaceNd: input type not supported.");
808 "Reference BatchToSpaceNd: output type not supported.");
811 "Reference BatchToSpaceNd: input and output types mismatched.");
823 bool supported =
true;
825 std::array<DataType, 8> supportedTypes
838 "BroadcastTo: input type not supported.");
841 "BroadcastTo: output type not supported");
850 std::array<DataType, 10> supportedInputTypes =
862 bool supported =
true;
864 "Reference cast: input is not a supported type");
868 "Reference cast: output is not a supported type");
871 "Reference cast: input and output shapes have different number of total elements");
882 bool supported =
true;
885 std::array<DataType, 7> supportedTypes =
896 "Reference ChannelShuffle: input is not a supported type.");
899 "Reference ChannelShuffle: output is not a supported type.");
902 "Reference ChannelShuffle: input and output types are mismatched.");
915 std::array<DataType, 8> supportedInputTypes =
926 bool supported =
true;
928 "Reference comparison: input 0 is not a supported type");
931 "Reference comparison: input 0 and Input 1 types are mismatched");
934 "Reference comparison: output is not of type Boolean");
946 bool supported =
true;
947 std::array<DataType,7> supportedTypes =
958 "Reference concatenation: output type not supported");
963 "Reference concatenation: input type not supported");
966 "Reference concatenation: input and output types mismatched.");
975 std::array<DataType,8> supportedTypes =
987 "Reference constant: output is not a supported type.");
997 &FalseInputFuncF32<>,
1003 &FalseOutputFuncF16<>,
1016 &FalseInputFuncF16<>,
1024 &FalseOutputFuncF32<>,
1037 bool supported =
true;
1040 std::array<DataType,7> supportedTypes =
1051 "Reference Convolution2d: input is not a supported type.");
1054 "Reference Convolution2d: output is not a supported type.");
1057 "Reference Convolution2d: input and output types mismatched.");
1063 std::array<DataType, 3> supportedWeightTypes =
1071 "Reference Convolution2d: weights type not supported for quantized input.");
1076 "Reference Convolution2d: weights is not a supported type.");
1079 "Reference Convolution2d: input and weights types mismatched.");
1084 std::array<DataType,4> biasesSupportedTypes =
1092 "Reference Convolution2d: biases is not a supported type.");
1106 bool supported =
true;
1109 std::array<DataType,7> supportedTypes =
1120 "Reference Convolution3d: input is not a supported type.");
1123 "Reference Convolution3d: output is not a supported type.");
1126 "Reference Convolution3d: input and output types mismatched.");
1131 std::array<DataType, 3> supportedWeightTypes =
1139 "Reference Convolution3d: weights type not supported for quantized input.");
1144 "Reference Convolution3d: weights is not a supported type.");
1147 "Reference Convolution3d: input and weights types mismatched.");
1152 std::array<DataType,4> biasesSupportedTypes =
1160 "Reference Convolution3d: biases is not a supported type.");
1171 bool supported =
true;
1173 std::array<DataType, 8> supportedTypes =
1186 "Reference for Debug layer: input type not supported");
1189 "Reference for Debug layer: output type not supported");
1192 "Reference for Debug layer: input and output types are mismatched");
1203 bool supported =
true;
1205 std::array<DataType,6> supportedTypes =
1215 "Reference DepthToSpace: input type not supported");
1218 "Reference DepthToSpace: output type not supported");
1221 "Reference DepthToSpace: input and output types are mismatched");
1234 bool supported =
true;
1237 std::array<DataType,7> supportedTypes =
1248 "Reference DepthwiseConvolution2d: input is not a supported type.");
1251 "Reference DepthwiseConvolution2d: output is not a supported type.");
1254 "Reference DepthwiseConvolution2d: input and output types mismatched.");
1259 std::array<DataType, 3> supportedWeightTypes =
1267 "Reference DepthwiseConvolution2d: weights type not supported for "
1268 "quantized input.");
1273 "Reference DepthwiseConvolution2d: weights is not a supported type.");
1276 "Reference DepthwiseConvolution2d: input and weights types mismatched.");
1281 std::array<DataType,4> biasesSupportedTypes =
1288 "Reference DepthwiseConvolution2d: biases is not a supported type.");
1299 bool supported =
true;
1301 std::array<DataType,5> supportedInputTypes = {
1310 "Reference for Dequantize layer: input type not supported.");
1313 "Reference for Dequantize layer: per-axis quantized input not supported.");
1315 std::array<DataType,3> supportedOutputTypes = {
1321 "Reference for Dequantize layer: output type not supported.");
1324 "Reference for Dequantize layer: input/output shapes have different num total "
1340 IgnoreUnused(anchors, detectionBoxes, detectionClasses, detectionScores, numDetections, descriptor);
1342 bool supported =
true;
1344 std::array<DataType,6> supportedInputTypes =
1354 "Reference DetectionPostProcess: input 0 is not a supported type.");
1357 "Reference DetectionPostProcess: input 1 is not a supported type.");
1377 bool supported =
true;
1379 std::array<DataType,7> supportedTypes = {
1389 "Reference division: input 0 is not a supported type.");
1392 "Reference division: input 1 is not a supported type.");
1395 "Reference division: output is not a supported type.");
1398 "Reference division: input 0 and Input 1 types are mismatched");
1401 "Reference division: input and output types are mismatched");
1404 "Reference division: shapes are not suitable for implicit broadcast.");
1416 std::array<DataType, 7> supportedTypes =
1426 std::array<DataType, 1> logicalSupportedTypes =
1431 bool supported =
true;
1436 "Reference elementwise unary: input type not supported");
1439 "Reference elementwise unary: output type not supported");
1444 "Reference elementwise unary: input type not supported");
1447 "Reference elementwise unary: output type not supported");
1451 "Reference elementwise unary: input and output types not matching");
1454 "Reference elementwise unary: input and output shapes"
1455 "have different number of total elements");
1465 bool supported =
true;
1467 std::array<DataType,1> supportedTypes =
1473 "Reference fake quantization: input type not supported.");
1486 bool supported =
true;
1488 std::array<DataType,3> supportedTypes =
1496 "Reference Fill: input type not supported.");
1499 "Reference Fill: output type not supported.");
1508 bool supported =
true;
1510 std::array<DataType,3> supportedTypes =
1517 "Reference Floor: input type not supported.");
1520 "Reference Floor: output type not supported.");
1532 bool supported =
true;
1535 std::array<DataType,6> supportedTypes =
1545 "Reference Fully Connected: input type not supported.");
1548 "Reference Fully Connected: output type not supported.");
1551 "Reference Fully Connected: weights type not supported.");
1554 "Reference Fully Connected: input and output types mismatched.");
1557 "Reference Fully Connected: weights is not a supported type.");
1560 "Reference Fully Connected: input and weights types mismatched.");
1565 std::array<DataType, 5>
1566 supportedBiasTypes =
1575 "Reference Fully Connected: bias type not supported.");
1578 "Reference Fully Connected: bias and weight types mismatch.");
1581 "Reference Fully Connected: bias type inferred from weights is incompatible.");
1584 "Reference Fully Connected: bias must have 1 dimension.");
1596 bool supported =
true;
1597 std::array<DataType,7> supportedTypes =
1608 "Reference GatherNd: input type not supported");
1611 "Reference GatherNd: output type not supported");
1614 "Reference GatherNd: indices (input1) type not supported");
1617 "Reference GatherNd: input and output types not matching");
1628 bool supported =
true;
1629 std::array<DataType,7> supportedTypes =
1641 "Reference Gather: input type not supported");
1644 "Reference Gather: output type not supported");
1647 "Reference Gather: indices (input1) type not supported");
1650 "Reference Gather: input and output types not matching");
1668 std::array<DataType, 3> supportedTypes =
1674 bool supported =
true;
1677 "Reference Instance Normalization: input type not supported.");
1680 "Reference Instance Normalization: output type not supported.");
1683 "Reference Instance Normalization: input and output types mismatched.");
1686 "Reference Instance Normalization: input and output shapes have different "
1687 "num total elements.");
1699 std::array<DataType, 6> supportedTypes =
1708 bool supported =
true;
1711 "Reference L2normalization: input type not supported.");
1714 "Reference L2normalization: output type not supported.");
1717 "Reference L2normalization: input and output types mismatched.");
1720 "Reference L2normalization: input and output shapes have different "
1721 "num total elements.");
1734 std::array<DataType, 1> supportedTypes =
1739 bool supported =
true;
1741 "Reference LogicalBinary: input 0 type not supported");
1743 "Reference LogicalBinary: input 1 type not supported");
1746 "Reference LogicalBinary: input and output types do not match");
1758 std::array<DataType, 3> supportedTypes =
1764 bool supported =
true;
1766 "Reference LogSoftmax: input type not supported");
1769 "Reference LogSoftmax: output type not supported");
1772 "Reference LogSoftmax: input and output types do not match");
1791 bool supported =
true;
1793 std::array<DataType,3> supportedTypes = {
1800 "Reference Lstm: input is not a supported type.");
1802 "Reference Lstm: input and outputStateIn types are mismatched");
1804 "Reference Lstm: input and cellStateIn types are mismatched");
1806 "Reference Lstm: input and scratchBuffer types are mismatched");
1808 "Reference Lstm: input and outputStateOut types are mismatched");
1810 "Reference Lstm: input and cellStateOut types are mismatched");
1813 "Reference Lstm: input and output types are mismatched");
1816 "Reference Lstm: input and InputToForgetWeights types are mismatched");
1818 "Reference Lstm: input and InputToCellWeights types are mismatched");
1820 "Reference Lstm: input and InputToOutputWeights types are mismatched");
1822 "Reference Lstm: input and RecurrentToForgetWeights types are mismatched");
1824 "Reference Lstm: input and RecurrentToCellWeights types are mismatched");
1826 "Reference Lstm: input and RecurrentToOutputWeights types are mismatched");
1828 "Reference Lstm: input and ForgetGateBias types are mismatched");
1830 "Reference Lstm: input and CellBias types are mismatched");
1832 "Reference Lstm: input and OutputGateBias types are mismatched");
1836 "Reference Lstm: input and InputToInputWeights types are mismatched");
1838 reasonIfUnsupported,
1839 "Reference Lstm: input and RecurrentToInputWeights types are mismatched");
1841 "Reference Lstm: input and InputGateBias types are mismatched");
1845 reasonIfUnsupported,
1846 "Reference Lstm: input and CellToInputWeights types are mismatched");
1852 "Reference Lstm: input and CellToForgetWeights types are mismatched");
1854 "Reference Lstm: input and CellToOutputWeights types are mismatched");
1859 "Reference Lstm: input and mProjectionWeights types are mismatched");
1863 "Reference Lstm: input and ProjectionBias types are mismatched");
1871 reasonIfUnsupported,
1872 "Reference Lstm: input and InputLayerNormWeights types are mismatched");
1875 reasonIfUnsupported,
1876 "Reference Lstm: input and ForgetLayerNormWeights types are mismatched");
1878 reasonIfUnsupported,
1879 "Reference Lstm: input and CellLayerNormWeights types are mismatched");
1881 reasonIfUnsupported,
1882 "Reference Lstm: input and OutputLayerNormWeights types are mismatched");
1893 bool supported =
true;
1895 std::array<DataType,7> supportedTypes = {
1905 "Reference maximum: input 0 is not a supported type.");
1908 "Reference maximum: input 1 is not a supported type.");
1911 "Reference maximum: output is not a supported type.");
1914 "Reference maximum: input 0 and Input 1 types are mismatched");
1917 "Reference maximum: input and output types are mismatched");
1920 "Reference maximum: shapes are not suitable for implicit broadcast.");
1930 bool supported =
true;
1931 std::string meanLayerStr =
"Mean";
1932 std::string outputTensorStr =
"output";
1934 std::array<DataType,6> supportedTypes =
1944 "Reference Mean: input type not supported.");
1947 "Reference Mean: input and output types are mismatched");
1952 reasonIfUnsupported,
1955 meanLayerStr, outputTensorStr).data());
1957 else if (descriptor.
m_Axis.empty())
1960 reasonIfUnsupported,
1962 meanLayerStr, outputTensorStr).data());
1971 reasonIfUnsupported,
1973 meanLayerStr, outputTensorStr).data());
1978 reasonIfUnsupported,
1980 meanLayerStr, outputTensorStr).data());
1991 bool supported =
true;
1993 std::array<DataType,7> supportedTypes =
2005 "Reference MemCopy: input type not supported");
2008 "Reference MemCopy: output type not supported");
2011 "Reference MemCopy: input and output types are mismatched");
2021 bool supported =
true;
2023 std::array<DataType,7> supportedTypes = {
2033 "Reference minimum: input 0 is not a supported type.");
2036 "Reference minimum: input 1 is not a supported type.");
2039 "Reference minimum: output is not a supported type.");
2042 "Reference minimum: input 0 and Input 1 types are mismatched");
2045 "Reference minimum: input and output types are mismatched");
2048 "Reference minimum: shapes are not suitable for implicit broadcast.");
2058 bool supported =
true;
2060 std::array<DataType,7> supportedTypes = {
2070 "Reference multiplication: input 0 is not a supported type.");
2073 "Reference multiplication: input 1 is not a supported type.");
2076 "Reference multiplication: output is not a supported type.");
2079 "Reference multiplication: input 0 and Input 1 types are mismatched");
2082 "Reference multiplication: input and output types are mismatched");
2085 "Reference multiplication: shapes are not suitable for implicit broadcast.");
2098 std::array<DataType, 6> supportedTypes =
2107 bool supported =
true;
2110 "Reference normalization: input type not supported.");
2113 "Reference normalization: output type not supported.");
2116 "Reference normalization: input and output shapes have different "
2117 "num total elements.");
2134 bool supported =
true;
2137 std::array<DataType,6> supportedTypes =
2147 "Reference pad: input is not a supported type.");
2150 "Reference pad: output is not a supported type.");
2153 "Reference pad: input and output types are mismatched.");
2164 bool supported =
true;
2167 std::array<DataType, 6> supportedTypes =
2178 "Reference permute: input is not a supported type.");
2181 "Reference permute: output is not a supported type.");
2184 "Reference permute: input and output types are mismatched.");
2195 bool supported =
true;
2198 std::array<DataType,6> supportedTypes =
2208 "Reference poolind2d: input is not a supported type.");
2211 "Reference poolind2d: output is not a supported type.");
2214 "Reference poolind2d: input and output types are mismatched.");
2225 bool supported =
true;
2228 std::array<DataType,6> supportedTypes =
2238 "Reference poolind3d: input is not a supported type.");
2241 "Reference poolind3d: output is not a supported type.");
2244 "Reference poolind3d: input and output types are mismatched.");
2278 bool supported =
true;
2281 std::array<DataType,7> supportedInputTypes = {
2291 "Reference quantize: input type not supported.");
2294 std::array<DataType,4> supportedOutputTypes = {
2301 "Reference quantize: output type not supported.");
2304 "Reference quantize: input and output shapes have different num total elements.");
2315 std::array<DataType,1> supportedOutputTypes =
2321 "Reference rank: input type not supported.");
2330 bool supported =
true;
2331 std::array<DataType,7> supportedTypes =
2342 "Reference Reduce: input type not supported");
2345 "Reference Reduce: output type not supported");
2348 "Reference Reduce: input and output types not matching");
2361 std::array<DataType,8> supportedOutputTypes =
2374 "Reference reshape: input type not supported.");
2383 bool supported =
true;
2384 std::array<DataType,7> supportedTypes =
2396 "Reference Resize: input type not supported");
2399 "Reference Resize: output type not supported");
2402 "Reference Resize: input and output types not matching");
2412 bool supported =
true;
2414 std::array<DataType,8> supportedTypes =
2427 "Reference ReverseV2: input0 type not supported");
2430 "Reference ReverseV2: output type not supported");
2433 "Reference ReverseV2: input0 and output types not matching");
2435 std::array<DataType,6> input2SupportedTypes =
2441 "Reference ReverseV2: input1 type not supported");
2451 bool supported =
true;
2453 std::array<DataType, 1> supportedTypes =
2459 "Reference Shape: output type not supported");
2470 bool supported =
true;
2472 std::array<DataType, 5> supportedTypes =
2482 "Reference Slice: input type not supported");
2485 "Reference Slice: output type not supported");
2488 "Reference Slice: input and output types are mismatched");
2499 bool supported =
true;
2500 std::array<DataType,7> supportedTypes =
2511 "Reference Softmax: output type not supported");
2514 "Reference Softmax: input type not supported");
2517 "Reference Softmax: input type not supported");
2528 bool supported =
true;
2529 std::array<DataType,6> supportedTypes =
2539 "Reference SpaceToBatchNd: input type not supported");
2542 "Reference SpaceToBatchNd: output type not supported");
2545 "Reference SpaceToBatchNd: input and output types are mismatched");
2557 bool supported =
true;
2559 std::array<DataType,6> supportedTypes =
2569 "Reference SpaceToDepth: input type not supported");
2572 "Reference SpaceToDepth: output type not supported");
2575 "Reference SpaceToDepth: input and output types are mismatched");
2581 const std::vector<std::reference_wrapper<TensorInfo>>& outputs,
2586 bool supported =
true;
2587 std::array<DataType,6> supportedTypes =
2597 "Reference splitter: output type not supported");
2601 "Reference splitter: input type not supported");
2604 "Reference splitter: input and output types mismatched.");
2617 bool supported =
true;
2618 std::array<DataType,7> supportedTypes =
2629 "Reference stack: output type not supported");
2634 "Reference stack: input type not supported");
2637 "Reference stack: input and output types mismatched.");
2649 bool supported =
true;
2651 std::array<DataType,5> supportedTypes =
2660 "Reference StridedSlice: input type not supported");
2663 "Reference StridedSlice: output type not supported");
2666 "Reference StridedSlice: input and output types are mismatched");
2676 bool supported =
true;
2678 std::array<DataType,7> supportedTypes = {
2688 "Reference subtraction: input 0 is not a supported type.");
2691 "Reference subtraction: input 1 is not a supported type.");
2694 "Reference subtraction: output is not a supported type.");
2697 "Reference subtraction: input 0 and Input 1 types are mismatched");
2700 "Reference subtraction: input and output types are mismatched");
2703 "Reference subtraction: shapes are not suitable for implicit broadcast.");
2713 bool supported =
true;
2715 std::array<DataType, 6> supportedTypes
2725 "PReLU: input is not a supported type.");
2728 "PReLU: alpha is not a supported type.");
2731 "PReLU: output is not a supported type.");
2734 "PReLU: input, alpha and output types are mismatched");
2737 "PReLU: shapes are not suitable for implicit broadcast");
2749 bool supported =
true;
2751 std::array<DataType, 7> supportedTypes
2763 "Tile: input type not supported.");
2766 "Tile: output type not supported");
2779 bool supported =
true;
2781 std::array<DataType,7> supportedTypes =
2792 "Reference TransposeConvolution2d: input is not a supported type.");
2795 "Reference TransposeConvolution2d: output is not a supported type.");
2798 "Reference TransposeConvolution2d: input and output types mismatched.");
2804 std::array<DataType, 3> supportedWeightTypes =
2812 "Reference TransposeConvolution2d: weights type not supported for "
2813 "quantized input.");
2818 "Reference TransposeConvolution2d: weights is not a supported type.");
2821 "Reference TransposeConvolution2d: input and weights types mismatched.");
2826 std::array<DataType,4> biasesSupportedTypes =
2833 "Reference TransposeConvolution2d: biases is not a supported type.");
2845 bool supported =
true;
2848 std::array<DataType, 6> supportedTypes =
2859 "Reference transpose: input is not a supported type.");
2862 "Reference transpose: output is not a supported type.");
2865 "Reference transpose: input and output types are mismatched.");
2887 bool supported =
true;
2889 std::array<DataType, 2> supportedTypes =
2895 std::array<DataType, 2> supportedWeightTypes =
2901 std::array<DataType, 3> supportedBiasTypes =
2910 "Reference UnidirectionalSequenceLstm: input is not a supported type.");
2912 "Reference UnidirectionalSequenceLstm: output is not a supported type.");
2916 reasonIfUnsupported,
2917 "Reference UnidirectionalSequenceLstm: InputToForgetWeights "
2918 "is not a supported type.");
2920 reasonIfUnsupported,
2921 "Reference UnidirectionalSequenceLstm: InputToCellWeights is not a supported type.");
2923 reasonIfUnsupported,
2924 "Reference UnidirectionalSequenceLstm: InputToOutputWeights "
2925 "is not a supported type.");
2927 reasonIfUnsupported,
2928 "Reference UnidirectionalSequenceLstm: RecurrentToForgetWeights "
2929 "is not a supported type.");
2931 reasonIfUnsupported,
2932 "Reference UnidirectionalSequenceLstm: RecurrentToCellWeights "
2933 "is not a supported type.");
2935 reasonIfUnsupported,
2936 "Reference UnidirectionalSequenceLstm: RecurrentToOutputWeights "
2937 "is not a supported type.");
2940 "Reference UnidirectionalSequenceLstm: ForgetGateBias is not a supported type.");
2942 "Reference UnidirectionalSequenceLstm: CellBias is not a supported type.");
2944 "Reference UnidirectionalSequenceLstm: OutputGateBias is not a supported type.");
2948 reasonIfUnsupported,
2949 "Reference UnidirectionalSequenceLstm: InputToInputWeights "
2950 "is not a supported type.");
2952 reasonIfUnsupported,
2953 "Reference UnidirectionalSequenceLstm: RecurrentToInputWeights "
2954 "is not a supported type.");
2956 "Reference UnidirectionalSequenceLstm: InputGateBias is not a supported type.");
2960 reasonIfUnsupported,
2961 "Reference UnidirectionalSequenceLstm: CellToInputWeights "
2962 "is not a supported type.");
2968 reasonIfUnsupported,
2969 "Reference UnidirectionalSequenceLstm: CellToForgetWeights "
2970 "is not a supported type.");
2972 reasonIfUnsupported,
2973 "Reference UnidirectionalSequenceLstm: CellToOutputWeights "
2974 "is not a supported type.");
2979 reasonIfUnsupported,
2980 "Reference UnidirectionalSequenceLstm: ProjectionWeights "
2981 "is not a supported type.");
2985 "Reference UnidirectionalSequenceLstm: input and ProjectionBias types "
2994 reasonIfUnsupported,
2995 "Reference UnidirectionalSequenceLstm: InputLayerNormWeights "
2996 "is not a supported type.");
2999 reasonIfUnsupported,
3000 "Reference UnidirectionalSequenceLstm: ForgetLayerNormWeights "
3001 "is not a supported type.");
3003 reasonIfUnsupported,
3004 "Reference UnidirectionalSequenceLstm: CellLayerNormWeights "
3005 "is not a supported type.");
3007 reasonIfUnsupported,
3008 "Reference UnidirectionalSequenceLstm: OutputLayerNormWeights "
3009 "is not a supported type.");