13 #include <boost/core/ignore_unused.hpp> 18 bool DefaultLayerSupport(
const char* func,
24 if (reasonIfUnsupported)
26 std::stringstream message;
27 message << func <<
" is not implemented [" << file <<
":" << line <<
"]";
29 reasonIfUnsupported.
value() = message.str();
44 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
52 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
60 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
68 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
80 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
88 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
97 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
105 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
111 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
118 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
125 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
135 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
142 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
150 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
160 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
167 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
180 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
190 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
198 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
226 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
233 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
240 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
250 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
258 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
266 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
272 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
280 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
288 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
296 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
310 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
318 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
326 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
348 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
364 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
372 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
380 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
386 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
394 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
402 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
410 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
417 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
425 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
432 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
443 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
451 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
458 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
466 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
473 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
481 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
489 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
497 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
505 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
512 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
516 const std::vector<std::reference_wrapper<TensorInfo>>& ,
520 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
528 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
532 const std::vector<const TensorInfo*>& ,
536 if (reasonIfUnsupported)
538 std::stringstream message;
539 message <<
"StandIn layer is not executable via backends";
541 reasonIfUnsupported.
value() = message.str();
552 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
560 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
569 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
579 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
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 IsReshapeSupported(const TensorInfo &input, const TensorInfo &output, const ReshapeDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsConstantSupported(const TensorInfo &output, 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 IsFullyConnectedSupported(const TensorInfo &input, const TensorInfo &output, const TensorInfo &weights, const TensorInfo &biases, const FullyConnectedDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsLogSoftmaxSupported(const TensorInfo &input, const TensorInfo &output, const LogSoftmaxDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsConcatSupported(const std::vector< const TensorInfo *> inputs, const TensorInfo &output, const OriginsDescriptor &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
UnaryOperation m_Operation
Specifies the elementwiseUnary operation to execute.
bool IsSoftmaxSupported(const TensorInfo &input, const TensorInfo &output, const SoftmaxDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A BatchToSpaceNdDescriptor for the BatchToSpaceNdLayer.
bool IsSplitterSupported(const TensorInfo &input, const ViewsDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A NormalizationDescriptor for the NormalizationLayer.
bool IsActivationSupported(const TensorInfo &input, const TensorInfo &output, const ActivationDescriptor &descriptor, 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 IsMemImportSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A FakeQuantizationDescriptor for the FakeQuantizationLayer.
bool IsStandInSupported(const std::vector< const TensorInfo *> &inputs, const std::vector< const TensorInfo *> &outputs, const StandInDescriptor &descriptor, 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.
An ActivationDescriptor for the ActivationLayer.
A BatchNormalizationDescriptor for the BatchNormalizationLayer.
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
bool IsSubtractionSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsQuantizedLstmSupported(const TensorInfo &input, const TensorInfo &previousCellStateIn, const TensorInfo &previousOutputIn, const TensorInfo &cellStateOut, const TensorInfo &output, const QuantizedLstmInputParamsInfo ¶msInfo, 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
bool IsFloorSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsPreCompiledSupported(const TensorInfo &input, const PreCompiledDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A L2NormalizationDescriptor for the L2NormalizationLayer.
A ViewsDescriptor for the SplitterLayer. Descriptor to configure the splitting process. Number of Views must be equal to the number of outputs, and their order must match - e.g. first view corresponds to the first output, second view to the second output, etc.
bool IsMaximumSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsRsqrtSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A SpaceToDepthDescriptor for the SpaceToDepthLayer.
bool IsPreluSupported(const TensorInfo &input, const TensorInfo &alpha, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported) const override
bool IsDepthToSpaceSupported(const TensorInfo &input, const TensorInfo &output, const DepthToSpaceDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A ReshapeDescriptor for the ReshapeLayer.
bool IsSwitchSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output0, const TensorInfo &output1, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A TransposeConvolution2dDescriptor for the TransposeConvolution2dLayer.
bool IsPooling2dSupported(const TensorInfo &input, const TensorInfo &output, const Pooling2dDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A ElementwiseUnaryDescriptor for the ElementwiseUnaryLayer.
bool IsDequantizeSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsComparisonSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, const ComparisonDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsMinimumSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsAbsSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsLstmSupported(const TensorInfo &input, const TensorInfo &outputStateIn, const TensorInfo &cellStateIn, const TensorInfo &scratchBuffer, const TensorInfo &outputStateOut, const TensorInfo &cellStateOut, const TensorInfo &output, const LstmDescriptor &descriptor, const LstmInputParamsInfo ¶msInfo, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsMultiplicationSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
#define ARMNN_NO_DEPRECATE_WARN_BEGIN
bool IsGatherSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsPermuteSupported(const TensorInfo &input, const TensorInfo &output, const PermuteDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
An LstmDescriptor for the LstmLayer.
bool IsGreaterSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, 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
bool IsPadSupported(const TensorInfo &input, const TensorInfo &output, const PadDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsOutputSupported(const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsSpaceToDepthSupported(const TensorInfo &input, const TensorInfo &output, const SpaceToDepthDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsEqualSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsDebugSupported(const TensorInfo &input, 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
An InstanceNormalizationDescriptor for InstanceNormalizationLayer.
A FullyConnectedDescriptor for the FullyConnectedLayer.
bool IsNormalizationSupported(const TensorInfo &input, const TensorInfo &output, const NormalizationDescriptor &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 IsSpaceToBatchNdSupported(const TensorInfo &input, const TensorInfo &output, const SpaceToBatchNdDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
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
bool IsAdditionSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
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
A StackDescriptor for the StackLayer.
A SoftmaxDescriptor for the SoftmaxLayer.
bool IsMeanSupported(const TensorInfo &input, const TensorInfo &output, const MeanDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsMergeSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsResizeBilinearSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsFakeQuantizationSupported(const TensorInfo &input, const FakeQuantizationDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsMemCopySupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A Pooling2dDescriptor for the Pooling2dLayer.
bool IsConvertFp32ToFp16Supported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsInputSupported(const TensorInfo &input, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A StandInDescriptor for the StandIn layer.
A SliceDescriptor for the SliceLayer.
bool IsConvertFp16ToFp32Supported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
bool IsMergerSupported(const std::vector< const TensorInfo *> inputs, const TensorInfo &output, const OriginsDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A DepthwiseConvolution2dDescriptor for the DepthwiseConvolution2dLayer.
A PermuteDescriptor for the PermuteLayer.
A Convolution2dDescriptor for the Convolution2dLayer.
A MeanDescriptor for the MeanLayer.
A SpaceToBatchNdDescriptor for the SpaceToBatchNdLayer.
bool IsStackSupported(const std::vector< const TensorInfo *> &inputs, const TensorInfo &output, const StackDescriptor &descriptor, 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
An ArgMinMaxDescriptor for ArgMinMaxLayer.
bool IsQuantizeSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A PreCompiledDescriptor for the PreCompiledLayer.
bool IsElementwiseUnarySupported(const TensorInfo &input, const TensorInfo &output, const ElementwiseUnaryDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const override
A ResizeDescriptor for the ResizeLayer.
A ComparisonDescriptor for the ComparisonLayer.
An OriginsDescriptor for the ConcatLayer. Descriptor to configure the concatenation process...
#define ARMNN_NO_DEPRECATE_WARN_END
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
A StridedSliceDescriptor for the StridedSliceLayer.