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);
364 *(PolymorphicDowncast<const ScatterNdDescriptor*>(&descriptor)),
365 reasonIfUnsupported);
369 *(PolymorphicDowncast<const SliceDescriptor*>(&descriptor)),
370 reasonIfUnsupported);
374 *(PolymorphicDowncast<const SoftmaxDescriptor*>(&descriptor)),
375 reasonIfUnsupported);
379 *(PolymorphicDowncast<const SpaceToBatchNdDescriptor*>(&descriptor)),
380 reasonIfUnsupported);
384 *(PolymorphicDowncast<const SpaceToDepthDescriptor*>(&descriptor)),
385 reasonIfUnsupported);
388 std::vector<TensorInfo> outputInfos;
389 for (uint32_t i = 1; i < infos.size(); i++)
391 outputInfos.push_back(infos[i]);
394 {outputInfos.begin(), outputInfos.end()},
395 *(PolymorphicDowncast<const ViewsDescriptor*>(&descriptor)),
396 reasonIfUnsupported);
400 std::vector<const TensorInfo*> inputInfos;
401 for (uint32_t i = 0; i < infos.size() - 1; i++)
403 inputInfos.push_back(&infos[i]);
406 infos[infos.size() - 1],
407 *(PolymorphicDowncast<const StackDescriptor*>(&descriptor)),
408 reasonIfUnsupported);
413 *(PolymorphicDowncast<const StridedSliceDescriptor*>(&descriptor)),
414 reasonIfUnsupported);
420 *(PolymorphicDowncast<const TileDescriptor*>(&descriptor)),
421 reasonIfUnsupported);
425 *(PolymorphicDowncast<const TransposeDescriptor*>(&descriptor)),
426 reasonIfUnsupported);
429 if (infos.size() != 4)
432 "TensorInfos should be of format: {input, output, weights, biases}.");
435 auto desc = *(PolymorphicDowncast<const TransposeConvolution2dDescriptor*>(&descriptor));
443 reasonIfUnsupported);
452 reasonIfUnsupported);
460 *(PolymorphicDowncast<const ChannelShuffleDescriptor*>(&descriptor)),
461 reasonIfUnsupported);
464 if (infos.size() != 4)
467 "TensorInfos should be of format: {input, output, weights, biases}.");
470 auto desc = *(PolymorphicDowncast<const Convolution3dDescriptor*>(&descriptor));
478 reasonIfUnsupported);
487 reasonIfUnsupported);
500 *(PolymorphicDowncast<const DetectionPostProcessDescriptor*>
502 reasonIfUnsupported);
505 *(PolymorphicDowncast<const FakeQuantizationDescriptor*>(&descriptor)),
506 reasonIfUnsupported);
515 if (infos.size() != 6)
518 "should be of format: {input, outputStateIn, cellStateIn, "
519 "hiddenStateOutputVal, cellStateOutputVal, output}");
521 auto desc = *(PolymorphicDowncast<const UnidirectionalSequenceLstmDescriptor*>(&descriptor));
529 lstmParamsInfo.
value(),
530 reasonIfUnsupported);
535 *(PolymorphicDowncast<const Pooling3dDescriptor*>(&descriptor)),
536 reasonIfUnsupported);
551 quantizedLstmInputParamsInfo.
value(),
552 reasonIfUnsupported);
565 bool supported =
true;
568 std::array<DataType,6> supportedTypes = {
577 "Reference activation: input type not supported.");
580 "Reference activation: output type not supported.");
583 "Reference activation: input and output types mismatched.");
586 "Reference activation: input and output shapes are of different rank.");
589 struct ActivationFunctionSupported :
public Rule
622 supported &=
CheckSupportRule(ActivationFunctionSupported(descriptor), reasonIfUnsupported,
623 "Reference activation: function not supported.");
633 bool supported =
true;
635 std::array<DataType,7> supportedTypes = {
645 "Reference addition: input 0 is not a supported type.");
648 "Reference addition: input 1 is not a supported type.");
651 "Reference addition: output is not a supported type.");
654 "Reference addition: input 0 and Input 1 types are mismatched");
657 "Reference addition: input and output types are mismatched");
660 "Reference addition: shapes are not suitable for implicit broadcast.");
671 std::array<DataType, 8> supportedInputTypes =
682 std::array<DataType,2> supportedOutputTypes = {
687 bool supported =
true;
690 "Reference ArgMinMax: input is not a supported type.");
692 "Reference ArgMinMax: output type not supported");
705 std::array<DataType, 6> supportedTypes =
714 bool supported =
true;
717 "Reference batch matrix multiplication: input X is not a supported type");
720 "Reference batch matrix multiplication: input Y is not a supported type");
723 "Reference batch matrix multiplication: output is not a supported type");
726 "Reference batch matrix multiplication: input X and input Y types are mismatched");
729 "Reference batch matrix multiplication: inputs and output types are mismatched");
733 "Reference batch matrix multiplication: input X is not of rank 2 or greater");
737 "Reference batch matrix multiplication: input Y is not of rank 2 or greater");
753 std::array<DataType, 6> supportedTypes =
762 bool supported =
true;
765 "Reference batch normalization: input is not a supported type.");
768 "Reference batch normalization: output is not a supported type.");
771 "Reference batch normalization: input and output types are mismatched");
774 "Reference batch normalization: mean is not a supported type.");
777 "Reference batch normalization: variance is not a supported type.");
780 "Reference batch normalization: beta is not a supported type.");
783 "Reference batch normalization: gamma is not a supported type.");
795 bool supported =
true;
797 std::string batchToSpaceNdLayerStr =
"batchToSpaceNd";
798 std::string inputTensorStr =
"input";
799 std::string outputTensorStr =
"output";
802 std::array<DataType,6> supportedTypes =
812 "Reference BatchToSpaceNd: input type not supported.");
815 "Reference BatchToSpaceNd: output type not supported.");
818 "Reference BatchToSpaceNd: input and output types mismatched.");
830 bool supported =
true;
832 std::array<DataType, 8> supportedTypes
845 "BroadcastTo: input type not supported.");
848 "BroadcastTo: output type not supported");
857 std::array<DataType, 10> supportedInputTypes =
869 bool supported =
true;
871 "Reference cast: input is not a supported type");
875 "Reference cast: output is not a supported type");
878 "Reference cast: input and output shapes have different number of total elements");
889 bool supported =
true;
892 std::array<DataType, 7> supportedTypes =
903 "Reference ChannelShuffle: input is not a supported type.");
906 "Reference ChannelShuffle: output is not a supported type.");
909 "Reference ChannelShuffle: input and output types are mismatched.");
922 std::array<DataType, 8> supportedInputTypes =
933 bool supported =
true;
935 "Reference comparison: input 0 is not a supported type");
938 "Reference comparison: input 0 and Input 1 types are mismatched");
941 "Reference comparison: output is not of type Boolean");
944 "Reference comparison: shapes are not suitable for implicit broadcast.");
956 bool supported =
true;
957 std::array<DataType,7> supportedTypes =
968 "Reference concatenation: output type not supported");
972 "Reference concatenation: input type not supported");
975 "Reference concatenation: input and output types mismatched.");
984 std::array<DataType,8> supportedTypes =
996 "Reference constant: output is not a supported type.");
1006 &FalseInputFuncF32<>,
1012 &FalseOutputFuncF16<>,
1025 &FalseInputFuncF16<>,
1033 &FalseOutputFuncF32<>,
1046 bool supported =
true;
1049 std::array<DataType,7> supportedTypes =
1060 "Reference Convolution2d: input is not a supported type.");
1063 "Reference Convolution2d: output is not a supported type.");
1066 "Reference Convolution2d: input and output types mismatched.");
1072 std::array<DataType, 3> supportedWeightTypes =
1080 "Reference Convolution2d: weights type not supported for quantized input.");
1085 "Reference Convolution2d: weights is not a supported type.");
1088 "Reference Convolution2d: input and weights types mismatched.");
1093 std::array<DataType,4> biasesSupportedTypes =
1101 "Reference Convolution2d: biases is not a supported type.");
1115 bool supported =
true;
1118 std::array<DataType,7> supportedTypes =
1129 "Reference Convolution3d: input is not a supported type.");
1132 "Reference Convolution3d: output is not a supported type.");
1135 "Reference Convolution3d: input and output types mismatched.");
1140 std::array<DataType, 3> supportedWeightTypes =
1148 "Reference Convolution3d: weights type not supported for quantized input.");
1153 "Reference Convolution3d: weights is not a supported type.");
1156 "Reference Convolution3d: input and weights types mismatched.");
1161 std::array<DataType,4> biasesSupportedTypes =
1169 "Reference Convolution3d: biases is not a supported type.");
1180 bool supported =
true;
1182 std::array<DataType, 8> supportedTypes =
1195 "Reference for Debug layer: input type not supported");
1198 "Reference for Debug layer: output type not supported");
1201 "Reference for Debug layer: input and output types are mismatched");
1212 bool supported =
true;
1214 std::array<DataType,6> supportedTypes =
1224 "Reference DepthToSpace: input type not supported");
1227 "Reference DepthToSpace: output type not supported");
1230 "Reference DepthToSpace: input and output types are mismatched");
1243 bool supported =
true;
1246 std::array<DataType,7> supportedTypes =
1257 "Reference DepthwiseConvolution2d: input is not a supported type.");
1260 "Reference DepthwiseConvolution2d: output is not a supported type.");
1263 "Reference DepthwiseConvolution2d: input and output types mismatched.");
1268 std::array<DataType, 3> supportedWeightTypes =
1276 "Reference DepthwiseConvolution2d: weights type not supported for "
1277 "quantized input.");
1282 "Reference DepthwiseConvolution2d: weights is not a supported type.");
1285 "Reference DepthwiseConvolution2d: input and weights types mismatched.");
1290 std::array<DataType,4> biasesSupportedTypes =
1297 "Reference DepthwiseConvolution2d: biases is not a supported type.");
1308 bool supported =
true;
1310 std::array<DataType,5> supportedInputTypes = {
1319 "Reference for Dequantize layer: input type not supported.");
1322 "Reference for Dequantize layer: per-axis quantized input not supported.");
1324 std::array<DataType,3> supportedOutputTypes = {
1330 "Reference for Dequantize layer: output type not supported.");
1333 "Reference for Dequantize layer: input/output shapes have different num total "
1349 IgnoreUnused(anchors, detectionBoxes, detectionClasses, detectionScores, numDetections, descriptor);
1351 bool supported =
true;
1353 std::array<DataType,6> supportedInputTypes =
1363 "Reference DetectionPostProcess: input 0 is not a supported type.");
1366 "Reference DetectionPostProcess: input 1 is not a supported type.");
1386 bool supported =
true;
1388 std::array<DataType,7> supportedTypes = {
1398 "Reference division: input 0 is not a supported type.");
1401 "Reference division: input 1 is not a supported type.");
1404 "Reference division: output is not a supported type.");
1407 "Reference division: input 0 and Input 1 types are mismatched");
1410 "Reference division: input and output types are mismatched");
1413 "Reference division: shapes are not suitable for implicit broadcast.");
1425 std::array<DataType, 7> supportedTypes =
1435 std::array<DataType, 1> logicalSupportedTypes =
1440 bool supported =
true;
1445 "Reference elementwise unary: input type not supported");
1448 "Reference elementwise unary: output type not supported");
1453 "Reference elementwise unary: input type not supported");
1456 "Reference elementwise unary: output type not supported");
1460 "Reference elementwise unary: input and output types not matching");
1463 "Reference elementwise unary: input and output shapes"
1464 "have different number of total elements");
1474 bool supported =
true;
1476 std::array<DataType,1> supportedTypes =
1482 "Reference fake quantization: input type not supported.");
1495 bool supported =
true;
1497 std::array<DataType,3> supportedTypes =
1505 "Reference Fill: input type not supported.");
1508 "Reference Fill: output type not supported.");
1517 bool supported =
true;
1519 std::array<DataType,3> supportedTypes =
1526 "Reference Floor: input type not supported.");
1529 "Reference Floor: output type not supported.");
1541 bool supported =
true;
1544 std::array<DataType,6> supportedTypes =
1554 "Reference Fully Connected: input type not supported.");
1557 "Reference Fully Connected: output type not supported.");
1560 "Reference Fully Connected: weights type not supported.");
1563 "Reference Fully Connected: input and output types mismatched.");
1566 "Reference Fully Connected: weights is not a supported type.");
1569 "Reference Fully Connected: input and weights types mismatched.");
1574 std::array<DataType, 5>
1575 supportedBiasTypes =
1584 "Reference Fully Connected: bias type not supported.");
1587 "Reference Fully Connected: bias and weight types mismatch.");
1590 "Reference Fully Connected: bias type inferred from weights is incompatible.");
1593 "Reference Fully Connected: bias must have 1 dimension.");
1605 bool supported =
true;
1606 std::array<DataType,7> supportedTypes =
1617 "Reference GatherNd: input type not supported");
1620 "Reference GatherNd: output type not supported");
1623 "Reference GatherNd: indices (input1) type not supported");
1626 "Reference GatherNd: input and output types not matching");
1637 bool supported =
true;
1638 std::array<DataType,7> supportedTypes =
1650 "Reference Gather: input type not supported");
1653 "Reference Gather: output type not supported");
1656 "Reference Gather: indices (input1) type not supported");
1659 "Reference Gather: input and output types not matching");
1677 std::array<DataType, 3> supportedTypes =
1683 bool supported =
true;
1686 "Reference Instance Normalization: input type not supported.");
1689 "Reference Instance Normalization: output type not supported.");
1692 "Reference Instance Normalization: input and output types mismatched.");
1695 "Reference Instance Normalization: input and output shapes have different "
1696 "num total elements.");
1708 std::array<DataType, 6> supportedTypes =
1717 bool supported =
true;
1720 "Reference L2normalization: input type not supported.");
1723 "Reference L2normalization: output type not supported.");
1726 "Reference L2normalization: input and output types mismatched.");
1729 "Reference L2normalization: input and output shapes have different "
1730 "num total elements.");
1743 std::array<DataType, 1> supportedTypes =
1748 bool supported =
true;
1750 "Reference LogicalBinary: input 0 type not supported");
1752 "Reference LogicalBinary: input 1 type not supported");
1755 "Reference LogicalBinary: input and output types do not match");
1758 "Reference LogicalBinary: shapes are not suitable for implicit broadcast.");
1770 std::array<DataType, 3> supportedTypes =
1776 bool supported =
true;
1778 "Reference LogSoftmax: input type not supported");
1781 "Reference LogSoftmax: output type not supported");
1784 "Reference LogSoftmax: input and output types do not match");
1803 bool supported =
true;
1805 std::array<DataType,3> supportedTypes = {
1812 "Reference Lstm: input is not a supported type.");
1814 "Reference Lstm: input and outputStateIn types are mismatched");
1816 "Reference Lstm: input and cellStateIn types are mismatched");
1818 "Reference Lstm: input and scratchBuffer types are mismatched");
1820 "Reference Lstm: input and outputStateOut types are mismatched");
1822 "Reference Lstm: input and cellStateOut types are mismatched");
1825 "Reference Lstm: input and output types are mismatched");
1828 "Reference Lstm: input and InputToForgetWeights types are mismatched");
1830 "Reference Lstm: input and InputToCellWeights types are mismatched");
1832 "Reference Lstm: input and InputToOutputWeights types are mismatched");
1834 "Reference Lstm: input and RecurrentToForgetWeights types are mismatched");
1836 "Reference Lstm: input and RecurrentToCellWeights types are mismatched");
1838 "Reference Lstm: input and RecurrentToOutputWeights types are mismatched");
1840 "Reference Lstm: input and ForgetGateBias types are mismatched");
1842 "Reference Lstm: input and CellBias types are mismatched");
1844 "Reference Lstm: input and OutputGateBias types are mismatched");
1848 "Reference Lstm: input and InputToInputWeights types are mismatched");
1850 reasonIfUnsupported,
1851 "Reference Lstm: input and RecurrentToInputWeights types are mismatched");
1853 "Reference Lstm: input and InputGateBias types are mismatched");
1857 reasonIfUnsupported,
1858 "Reference Lstm: input and CellToInputWeights types are mismatched");
1864 "Reference Lstm: input and CellToForgetWeights types are mismatched");
1866 "Reference Lstm: input and CellToOutputWeights types are mismatched");
1871 "Reference Lstm: input and mProjectionWeights types are mismatched");
1875 "Reference Lstm: input and ProjectionBias types are mismatched");
1883 reasonIfUnsupported,
1884 "Reference Lstm: input and InputLayerNormWeights types are mismatched");
1887 reasonIfUnsupported,
1888 "Reference Lstm: input and ForgetLayerNormWeights types are mismatched");
1890 reasonIfUnsupported,
1891 "Reference Lstm: input and CellLayerNormWeights types are mismatched");
1893 reasonIfUnsupported,
1894 "Reference Lstm: input and OutputLayerNormWeights types are mismatched");
1905 bool supported =
true;
1907 std::array<DataType,7> supportedTypes = {
1917 "Reference maximum: input 0 is not a supported type.");
1920 "Reference maximum: input 1 is not a supported type.");
1923 "Reference maximum: output is not a supported type.");
1926 "Reference maximum: input 0 and Input 1 types are mismatched");
1929 "Reference maximum: input and output types are mismatched");
1932 "Reference maximum: shapes are not suitable for implicit broadcast.");
1942 bool supported =
true;
1943 std::string meanLayerStr =
"Mean";
1944 std::string outputTensorStr =
"output";
1946 std::array<DataType,6> supportedTypes =
1956 "Reference Mean: input type not supported.");
1959 "Reference Mean: input and output types are mismatched");
1964 reasonIfUnsupported,
1967 meanLayerStr, outputTensorStr).data());
1969 else if (descriptor.
m_Axis.empty())
1972 reasonIfUnsupported,
1974 meanLayerStr, outputTensorStr).data());
1983 reasonIfUnsupported,
1985 meanLayerStr, outputTensorStr).data());
1990 reasonIfUnsupported,
1992 meanLayerStr, outputTensorStr).data());
2003 bool supported =
true;
2005 std::array<DataType,7> supportedTypes =
2017 "Reference MemCopy: input type not supported");
2020 "Reference MemCopy: output type not supported");
2023 "Reference MemCopy: input and output types are mismatched");
2033 bool supported =
true;
2035 std::array<DataType,7> supportedTypes = {
2045 "Reference minimum: input 0 is not a supported type.");
2048 "Reference minimum: input 1 is not a supported type.");
2051 "Reference minimum: output is not a supported type.");
2054 "Reference minimum: input 0 and Input 1 types are mismatched");
2057 "Reference minimum: input and output types are mismatched");
2060 "Reference minimum: shapes are not suitable for implicit broadcast.");
2070 bool supported =
true;
2072 std::array<DataType,7> supportedTypes = {
2082 "Reference multiplication: input 0 is not a supported type.");
2085 "Reference multiplication: input 1 is not a supported type.");
2088 "Reference multiplication: output is not a supported type.");
2091 "Reference multiplication: input 0 and Input 1 types are mismatched");
2094 "Reference multiplication: input and output types are mismatched");
2097 "Reference multiplication: shapes are not suitable for implicit broadcast.");
2110 std::array<DataType, 6> supportedTypes =
2119 bool supported =
true;
2122 "Reference normalization: input type not supported.");
2125 "Reference normalization: output type not supported.");
2128 "Reference normalization: input and output shapes have different "
2129 "num total elements.");
2146 bool supported =
true;
2149 std::array<DataType,6> supportedTypes =
2159 "Reference pad: input is not a supported type.");
2162 "Reference pad: output is not a supported type.");
2165 "Reference pad: input and output types are mismatched.");
2176 bool supported =
true;
2179 std::array<DataType, 6> supportedTypes =
2190 "Reference permute: input is not a supported type.");
2193 "Reference permute: output is not a supported type.");
2196 "Reference permute: input and output types are mismatched.");
2207 bool supported =
true;
2210 std::array<DataType,6> supportedTypes =
2220 "Reference poolind2d: input is not a supported type.");
2223 "Reference poolind2d: output is not a supported type.");
2226 "Reference poolind2d: input and output types are mismatched.");
2237 bool supported =
true;
2240 std::array<DataType,6> supportedTypes =
2250 "Reference poolind3d: input is not a supported type.");
2253 "Reference poolind3d: output is not a supported type.");
2256 "Reference poolind3d: input and output types are mismatched.");
2290 bool supported =
true;
2293 std::array<DataType,7> supportedInputTypes = {
2303 "Reference quantize: input type not supported.");
2306 std::array<DataType,4> supportedOutputTypes = {
2313 "Reference quantize: output type not supported.");
2316 "Reference quantize: input and output shapes have different num total elements.");
2327 std::array<DataType,1> supportedOutputTypes =
2333 "Reference rank: input type not supported.");
2342 bool supported =
true;
2343 std::array<DataType,7> supportedTypes =
2354 "Reference Reduce: input type not supported");
2357 "Reference Reduce: output type not supported");
2360 "Reference Reduce: input and output types not matching");
2373 std::array<DataType,8> supportedOutputTypes =
2386 "Reference reshape: input type not supported.");
2395 bool supported =
true;
2396 std::array<DataType,7> supportedTypes =
2408 "Reference Resize: input type not supported");
2411 "Reference Resize: output type not supported");
2414 "Reference Resize: input and output types not matching");
2424 bool supported =
true;
2426 std::array<DataType,8> supportedTypes =
2439 "Reference ReverseV2: input0 type not supported");
2442 "Reference ReverseV2: output type not supported");
2445 "Reference ReverseV2: input0 and output types not matching");
2447 std::array<DataType,6> input2SupportedTypes =
2453 "Reference ReverseV2: input1 type not supported");
2467 bool supported =
true;
2469 std::array<DataType, 7> supportedTypes
2480 std::array<DataType, 1> indicesSupportedTypes =
2486 "ScatterNd: indices type not supported.");
2489 "ScatterNd: updates type not supported.");
2492 "ScatterNd: output type not supported");
2495 "ScatterNd: input and updates types are mismatched");
2501 "ScatterNd: input type not supported.");
2504 "ScatterNd: input and output types are mismatched");
2510 "ScatterNd: shape type not supported.");
2521 bool supported =
true;
2523 std::array<DataType, 1> supportedTypes =
2529 "Reference Shape: output type not supported");
2540 bool supported =
true;
2542 std::array<DataType, 5> supportedTypes =
2552 "Reference Slice: input type not supported");
2555 "Reference Slice: output type not supported");
2558 "Reference Slice: input and output types are mismatched");
2569 bool supported =
true;
2570 std::array<DataType,7> supportedTypes =
2581 "Reference Softmax: output type not supported");
2584 "Reference Softmax: input type not supported");
2587 "Reference Softmax: input type not supported");
2598 bool supported =
true;
2599 std::array<DataType,6> supportedTypes =
2609 "Reference SpaceToBatchNd: input type not supported");
2612 "Reference SpaceToBatchNd: output type not supported");
2615 "Reference SpaceToBatchNd: input and output types are mismatched");
2627 bool supported =
true;
2629 std::array<DataType,6> supportedTypes =
2639 "Reference SpaceToDepth: input type not supported");
2642 "Reference SpaceToDepth: output type not supported");
2645 "Reference SpaceToDepth: input and output types are mismatched");
2651 const std::vector<std::reference_wrapper<TensorInfo>>& outputs,
2656 bool supported =
true;
2657 std::array<DataType,6> supportedTypes =
2667 "Reference splitter: output type not supported");
2671 "Reference splitter: input type not supported");
2674 "Reference splitter: input and output types mismatched.");
2687 bool supported =
true;
2688 std::array<DataType,7> supportedTypes =
2699 "Reference stack: output type not supported");
2703 "Reference stack: input type not supported");
2706 "Reference stack: input and output types mismatched.");
2718 bool supported =
true;
2720 std::array<DataType,5> supportedTypes =
2729 "Reference StridedSlice: input type not supported");
2732 "Reference StridedSlice: output type not supported");
2735 "Reference StridedSlice: input and output types are mismatched");
2745 bool supported =
true;
2747 std::array<DataType,7> supportedTypes = {
2757 "Reference subtraction: input 0 is not a supported type.");
2760 "Reference subtraction: input 1 is not a supported type.");
2763 "Reference subtraction: output is not a supported type.");
2766 "Reference subtraction: input 0 and Input 1 types are mismatched");
2769 "Reference subtraction: input and output types are mismatched");
2772 "Reference subtraction: shapes are not suitable for implicit broadcast.");
2782 bool supported =
true;
2784 std::array<DataType, 6> supportedTypes
2794 "PReLU: input is not a supported type.");
2797 "PReLU: alpha is not a supported type.");
2800 "PReLU: output is not a supported type.");
2803 "PReLU: input, alpha and output types are mismatched");
2806 "PReLU: shapes are not suitable for implicit broadcast");
2818 bool supported =
true;
2820 std::array<DataType, 7> supportedTypes
2832 "Tile: input type not supported.");
2835 "Tile: output type not supported");
2848 bool supported =
true;
2850 std::array<DataType,7> supportedTypes =
2861 "Reference TransposeConvolution2d: input is not a supported type.");
2864 "Reference TransposeConvolution2d: output is not a supported type.");
2867 "Reference TransposeConvolution2d: input and output types mismatched.");
2873 std::array<DataType, 3> supportedWeightTypes =
2881 "Reference TransposeConvolution2d: weights type not supported for "
2882 "quantized input.");
2887 "Reference TransposeConvolution2d: weights is not a supported type.");
2890 "Reference TransposeConvolution2d: input and weights types mismatched.");
2895 std::array<DataType,4> biasesSupportedTypes =
2902 "Reference TransposeConvolution2d: biases is not a supported type.");
2914 bool supported =
true;
2917 std::array<DataType, 6> supportedTypes =
2928 "Reference transpose: input is not a supported type.");
2931 "Reference transpose: output is not a supported type.");
2934 "Reference transpose: input and output types are mismatched.");
2956 bool supported =
true;
2958 std::array<DataType, 2> supportedTypes =
2964 std::array<DataType, 2> supportedWeightTypes =
2970 std::array<DataType, 3> supportedBiasTypes =
2979 "Reference UnidirectionalSequenceLstm: input is not a supported type.");
2981 "Reference UnidirectionalSequenceLstm: output is not a supported type.");
2985 reasonIfUnsupported,
2986 "Reference UnidirectionalSequenceLstm: InputToForgetWeights "
2987 "is not a supported type.");
2989 reasonIfUnsupported,
2990 "Reference UnidirectionalSequenceLstm: InputToCellWeights is not a supported type.");
2992 reasonIfUnsupported,
2993 "Reference UnidirectionalSequenceLstm: InputToOutputWeights "
2994 "is not a supported type.");
2996 reasonIfUnsupported,
2997 "Reference UnidirectionalSequenceLstm: RecurrentToForgetWeights "
2998 "is not a supported type.");
3000 reasonIfUnsupported,
3001 "Reference UnidirectionalSequenceLstm: RecurrentToCellWeights "
3002 "is not a supported type.");
3004 reasonIfUnsupported,
3005 "Reference UnidirectionalSequenceLstm: RecurrentToOutputWeights "
3006 "is not a supported type.");
3009 "Reference UnidirectionalSequenceLstm: ForgetGateBias is not a supported type.");
3011 "Reference UnidirectionalSequenceLstm: CellBias is not a supported type.");
3013 "Reference UnidirectionalSequenceLstm: OutputGateBias is not a supported type.");
3017 reasonIfUnsupported,
3018 "Reference UnidirectionalSequenceLstm: InputToInputWeights "
3019 "is not a supported type.");
3021 reasonIfUnsupported,
3022 "Reference UnidirectionalSequenceLstm: RecurrentToInputWeights "
3023 "is not a supported type.");
3025 "Reference UnidirectionalSequenceLstm: InputGateBias is not a supported type.");
3029 reasonIfUnsupported,
3030 "Reference UnidirectionalSequenceLstm: CellToInputWeights "
3031 "is not a supported type.");
3037 reasonIfUnsupported,
3038 "Reference UnidirectionalSequenceLstm: CellToForgetWeights "
3039 "is not a supported type.");
3041 reasonIfUnsupported,
3042 "Reference UnidirectionalSequenceLstm: CellToOutputWeights "
3043 "is not a supported type.");
3048 reasonIfUnsupported,
3049 "Reference UnidirectionalSequenceLstm: ProjectionWeights "
3050 "is not a supported type.");
3054 "Reference UnidirectionalSequenceLstm: input and ProjectionBias types "
3063 reasonIfUnsupported,
3064 "Reference UnidirectionalSequenceLstm: InputLayerNormWeights "
3065 "is not a supported type.");
3068 reasonIfUnsupported,
3069 "Reference UnidirectionalSequenceLstm: ForgetLayerNormWeights "
3070 "is not a supported type.");
3072 reasonIfUnsupported,
3073 "Reference UnidirectionalSequenceLstm: CellLayerNormWeights "
3074 "is not a supported type.");
3076 reasonIfUnsupported,
3077 "Reference UnidirectionalSequenceLstm: OutputLayerNormWeights "
3078 "is not a supported type.");