ArmNN
 21.08
LayerSupportHandle Class Reference

#include <BackendHelper.hpp>

Public Member Functions

 LayerSupportHandle (std::shared_ptr< ILayerSupport > layerSupport)
 
 LayerSupportHandle (std::shared_ptr< ILayerSupport > layerSupport, const BackendId &backendId)
 
bool IsBackendRegistered () const
 
bool IsAbsSupported (const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsActivationSupported (const TensorInfo &input, const TensorInfo &output, const ActivationDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsAdditionSupported (const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsArgMinMaxSupported (const TensorInfo &input, const TensorInfo &output, const ArgMinMaxDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
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())
 
bool IsBatchToSpaceNdSupported (const TensorInfo &input, const TensorInfo &output, const BatchToSpaceNdDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsCastSupported (const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsComparisonSupported (const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, const ComparisonDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsConcatSupported (const std::vector< const TensorInfo *> inputs, const TensorInfo &output, const OriginsDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsConstantSupported (const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsConvertBf16ToFp32Supported (const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsConvertFp32ToBf16Supported (const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsConvertFp16ToFp32Supported (const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsConvertFp32ToFp16Supported (const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsConvolution2dSupported (const TensorInfo &input, const TensorInfo &output, const Convolution2dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsDebugSupported (const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsDepthToSpaceSupported (const TensorInfo &input, const TensorInfo &output, const DepthToSpaceDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsDepthwiseConvolutionSupported (const TensorInfo &input, const TensorInfo &output, const DepthwiseConvolution2dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsDequantizeSupported (const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
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())
 
bool IsDilatedDepthwiseConvolutionSupported (const TensorInfo &input, const TensorInfo &output, const DepthwiseConvolution2dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsDivisionSupported (const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsElementwiseUnarySupported (const TensorInfo &input, const TensorInfo &output, const ElementwiseUnaryDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsEqualSupported (const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsFakeQuantizationSupported (const TensorInfo &input, const FakeQuantizationDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsFillSupported (const TensorInfo &input, const TensorInfo &output, const FillDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsFloorSupported (const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsFullyConnectedSupported (const TensorInfo &input, const TensorInfo &output, const TensorInfo &weights, const TensorInfo &biases, const FullyConnectedDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsGatherSupported (const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsGatherSupported (const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, const GatherDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsGreaterSupported (const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &ouput, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsInputSupported (const TensorInfo &input, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsInstanceNormalizationSupported (const TensorInfo &input, const TensorInfo &output, const InstanceNormalizationDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsL2NormalizationSupported (const TensorInfo &input, const TensorInfo &output, const L2NormalizationDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsLogicalBinarySupported (const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, const LogicalBinaryDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsLogicalUnarySupported (const TensorInfo &input, const TensorInfo &output, const ElementwiseUnaryDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsLogSoftmaxSupported (const TensorInfo &input, const TensorInfo &output, const LogSoftmaxDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
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 &paramsInfo, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsMaximumSupported (const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsMeanSupported (const TensorInfo &input, const TensorInfo &output, const MeanDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsMemCopySupported (const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsMemImportSupported (const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsMergeSupported (const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsMergerSupported (const std::vector< const TensorInfo *> inputs, const TensorInfo &output, const OriginsDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsMinimumSupported (const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsMultiplicationSupported (const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsNormalizationSupported (const TensorInfo &input, const TensorInfo &output, const NormalizationDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsOutputSupported (const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsPadSupported (const TensorInfo &input, const TensorInfo &output, const PadDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsPermuteSupported (const TensorInfo &input, const TensorInfo &output, const PermuteDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsPooling2dSupported (const TensorInfo &input, const TensorInfo &output, const Pooling2dDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsPreCompiledSupported (const TensorInfo &input, const PreCompiledDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsPreluSupported (const TensorInfo &input, const TensorInfo &alpha, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsQuantizeSupported (const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
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 &paramsInfo, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsQuantizedLstmSupported (const TensorInfo &input, const TensorInfo &previousCellStateIn, const TensorInfo &previousOutputIn, const TensorInfo &cellStateOut, const TensorInfo &output, const QuantizedLstmInputParamsInfo &paramsInfo, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsRankSupported (const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsReduceSupported (const TensorInfo &input, const TensorInfo &output, const ReduceDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsReshapeSupported (const TensorInfo &input, const TensorInfo &output, const ReshapeDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsResizeBilinearSupported (const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsResizeSupported (const TensorInfo &input, const TensorInfo &output, const ResizeDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsRsqrtSupported (const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsShapeSupported (const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsSliceSupported (const TensorInfo &input, const TensorInfo &output, const SliceDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsSoftmaxSupported (const TensorInfo &input, const TensorInfo &output, const SoftmaxDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsSpaceToBatchNdSupported (const TensorInfo &input, const TensorInfo &output, const SpaceToBatchNdDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsSpaceToDepthSupported (const TensorInfo &input, const TensorInfo &output, const SpaceToDepthDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsSplitterSupported (const TensorInfo &input, const ViewsDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsSplitterSupported (const TensorInfo &input, const std::vector< std::reference_wrapper< TensorInfo >> &outputs, const ViewsDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsStackSupported (const std::vector< const TensorInfo *> &inputs, const TensorInfo &output, const StackDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsStandInSupported (const std::vector< const TensorInfo *> &inputs, const std::vector< const TensorInfo *> &outputs, const StandInDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsStridedSliceSupported (const TensorInfo &input, const TensorInfo &output, const StridedSliceDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsSubtractionSupported (const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsSwitchSupported (const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output0, const TensorInfo &output1, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsTransposeConvolution2dSupported (const TensorInfo &input, const TensorInfo &output, const TransposeConvolution2dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsTransposeSupported (const TensorInfo &input, const TensorInfo &output, const TransposeDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 
bool IsUnidirectionalSequenceLstmSupported (const TensorInfo &input, const TensorInfo &outputStateIn, const TensorInfo &cellStateIn, const TensorInfo &output, const Optional< TensorInfo > &hiddenStateOutput, const Optional< TensorInfo > &cellStateOutput, const LstmDescriptor &descriptor, const LstmInputParamsInfo &paramsInfo, Optional< std::string &> reasonIfUnsupported=EmptyOptional())
 

Detailed Description

Definition at line 20 of file BackendHelper.hpp.

Constructor & Destructor Documentation

◆ LayerSupportHandle() [1/2]

LayerSupportHandle ( std::shared_ptr< ILayerSupport layerSupport)
inlineexplicit

Definition at line 23 of file BackendHelper.hpp.

24  : m_LayerSupport(std::move(layerSupport)), m_BackendId(Compute::Undefined) {};

◆ LayerSupportHandle() [2/2]

LayerSupportHandle ( std::shared_ptr< ILayerSupport layerSupport,
const BackendId backendId 
)
inlineexplicit

Definition at line 26 of file BackendHelper.hpp.

References ARMNN_DEPRECATED_MSG, armnn::GetCapability(), armnn::GetILayerSupportByBackendId(), armnn::HasCapability(), LayerSupportHandle::IsAbsSupported(), LayerSupportHandle::IsActivationSupported(), LayerSupportHandle::IsAdditionSupported(), LayerSupportHandle::IsArgMinMaxSupported(), LayerSupportHandle::IsBackendRegistered(), LayerSupportHandle::IsBatchNormalizationSupported(), LayerSupportHandle::IsBatchToSpaceNdSupported(), armnn::IsCapabilitySupported(), LayerSupportHandle::IsCastSupported(), LayerSupportHandle::IsComparisonSupported(), LayerSupportHandle::IsConcatSupported(), LayerSupportHandle::IsConstantSupported(), LayerSupportHandle::IsConvertBf16ToFp32Supported(), LayerSupportHandle::IsConvertFp16ToFp32Supported(), LayerSupportHandle::IsConvertFp32ToBf16Supported(), LayerSupportHandle::IsConvertFp32ToFp16Supported(), LayerSupportHandle::IsConvolution2dSupported(), LayerSupportHandle::IsDebugSupported(), LayerSupportHandle::IsDepthToSpaceSupported(), LayerSupportHandle::IsDepthwiseConvolutionSupported(), LayerSupportHandle::IsDequantizeSupported(), LayerSupportHandle::IsDetectionPostProcessSupported(), LayerSupportHandle::IsDilatedDepthwiseConvolutionSupported(), LayerSupportHandle::IsDivisionSupported(), LayerSupportHandle::IsElementwiseUnarySupported(), LayerSupportHandle::IsEqualSupported(), LayerSupportHandle::IsFakeQuantizationSupported(), LayerSupportHandle::IsFillSupported(), LayerSupportHandle::IsFloorSupported(), LayerSupportHandle::IsFullyConnectedSupported(), LayerSupportHandle::IsGatherSupported(), LayerSupportHandle::IsGreaterSupported(), LayerSupportHandle::IsInputSupported(), LayerSupportHandle::IsInstanceNormalizationSupported(), LayerSupportHandle::IsL2NormalizationSupported(), LayerSupportHandle::IsLogicalBinarySupported(), LayerSupportHandle::IsLogicalUnarySupported(), LayerSupportHandle::IsLogSoftmaxSupported(), LayerSupportHandle::IsLstmSupported(), LayerSupportHandle::IsMaximumSupported(), LayerSupportHandle::IsMeanSupported(), LayerSupportHandle::IsMemCopySupported(), LayerSupportHandle::IsMemImportSupported(), LayerSupportHandle::IsMergerSupported(), LayerSupportHandle::IsMergeSupported(), LayerSupportHandle::IsMinimumSupported(), LayerSupportHandle::IsMultiplicationSupported(), LayerSupportHandle::IsNormalizationSupported(), LayerSupportHandle::IsOutputSupported(), LayerSupportHandle::IsPadSupported(), LayerSupportHandle::IsPermuteSupported(), LayerSupportHandle::IsPooling2dSupported(), LayerSupportHandle::IsPreCompiledSupported(), LayerSupportHandle::IsPreluSupported(), LayerSupportHandle::IsQLstmSupported(), LayerSupportHandle::IsQuantizedLstmSupported(), LayerSupportHandle::IsQuantizeSupported(), LayerSupportHandle::IsRankSupported(), LayerSupportHandle::IsReduceSupported(), LayerSupportHandle::IsReshapeSupported(), LayerSupportHandle::IsResizeBilinearSupported(), LayerSupportHandle::IsResizeSupported(), LayerSupportHandle::IsRsqrtSupported(), LayerSupportHandle::IsShapeSupported(), LayerSupportHandle::IsSliceSupported(), LayerSupportHandle::IsSoftmaxSupported(), LayerSupportHandle::IsSpaceToBatchNdSupported(), LayerSupportHandle::IsSpaceToDepthSupported(), LayerSupportHandle::IsSplitterSupported(), LayerSupportHandle::IsStackSupported(), LayerSupportHandle::IsStandInSupported(), LayerSupportHandle::IsStridedSliceSupported(), LayerSupportHandle::IsSubtractionSupported(), LayerSupportHandle::IsSwitchSupported(), LayerSupportHandle::IsTransposeConvolution2dSupported(), LayerSupportHandle::IsTransposeSupported(), and LayerSupportHandle::IsUnidirectionalSequenceLstmSupported().

27  : m_LayerSupport(std::move(layerSupport)), m_BackendId(backendId) {};

Member Function Documentation

◆ IsAbsSupported()

bool IsAbsSupported ( const TensorInfo input,
const TensorInfo output,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 140 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

143 {
144  // Call the IsXXXLayerSupport function of the specific backend.
145  return m_LayerSupport->IsAbsSupported(input, output, reasonIfUnsupported.value());
146 }

◆ IsActivationSupported()

bool IsActivationSupported ( const TensorInfo input,
const TensorInfo output,
const ActivationDescriptor descriptor,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 148 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

152 {
153  return m_LayerSupport->IsActivationSupported(input, output, descriptor, reasonIfUnsupported.value());
154 }

◆ IsAdditionSupported()

bool IsAdditionSupported ( const TensorInfo input0,
const TensorInfo input1,
const TensorInfo output,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 156 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

160 {
161  return m_LayerSupport->IsAdditionSupported(input0, input1, output, reasonIfUnsupported.value());
162 }

◆ IsArgMinMaxSupported()

bool IsArgMinMaxSupported ( const TensorInfo input,
const TensorInfo output,
const ArgMinMaxDescriptor descriptor,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 164 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

168 {
169  return m_LayerSupport->IsArgMinMaxSupported(input, output, descriptor, reasonIfUnsupported.value());
170 }

◆ IsBackendRegistered()

bool IsBackendRegistered ( ) const

Definition at line 129 of file BackendHelper.cpp.

Referenced by LayerSupportHandle::LayerSupportHandle().

130 {
131  if (m_LayerSupport)
132  {
133  return true;
134  }
135 
136  return false;
137 }

◆ IsBatchNormalizationSupported()

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() 
)

Definition at line 172 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

180 {
181  return m_LayerSupport->IsBatchNormalizationSupported(input,
182  output,
183  mean,
184  var,
185  beta,
186  gamma,
187  descriptor,
188  reasonIfUnsupported.value());
189 }

◆ IsBatchToSpaceNdSupported()

bool IsBatchToSpaceNdSupported ( const TensorInfo input,
const TensorInfo output,
const BatchToSpaceNdDescriptor descriptor,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 191 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

195 {
196  return m_LayerSupport->IsBatchToSpaceNdSupported(input,
197  output,
198  descriptor,
199  reasonIfUnsupported.value());
200 }

◆ IsCastSupported()

bool IsCastSupported ( const TensorInfo input,
const TensorInfo output,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 202 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

205 {
206  return m_LayerSupport->IsCastSupported(input, output, reasonIfUnsupported.value());
207 }

◆ IsComparisonSupported()

bool IsComparisonSupported ( const TensorInfo input0,
const TensorInfo input1,
const TensorInfo output,
const ComparisonDescriptor descriptor,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 209 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

214 {
215  return m_LayerSupport->IsComparisonSupported(input0, input1, output, descriptor, reasonIfUnsupported.value());
216 }

◆ IsConcatSupported()

bool IsConcatSupported ( const std::vector< const TensorInfo *>  inputs,
const TensorInfo output,
const OriginsDescriptor descriptor,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 218 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

222 {
223  return m_LayerSupport->IsConcatSupported(inputs, output, descriptor, reasonIfUnsupported.value());
224 }

◆ IsConstantSupported()

bool IsConstantSupported ( const TensorInfo output,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 226 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

228 {
229  return m_LayerSupport->IsConstantSupported(output, reasonIfUnsupported.value());
230 }

◆ IsConvertBf16ToFp32Supported()

bool IsConvertBf16ToFp32Supported ( const TensorInfo input,
const TensorInfo output,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 232 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

235 {
236  return m_LayerSupport->IsConvertBf16ToFp32Supported(input, output, reasonIfUnsupported.value());
237 }

◆ IsConvertFp16ToFp32Supported()

bool IsConvertFp16ToFp32Supported ( const TensorInfo input,
const TensorInfo output,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 246 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

249 {
250  return m_LayerSupport->IsConvertFp16ToFp32Supported(input, output, reasonIfUnsupported.value());
251 }

◆ IsConvertFp32ToBf16Supported()

bool IsConvertFp32ToBf16Supported ( const TensorInfo input,
const TensorInfo output,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 239 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

242 {
243  return m_LayerSupport->IsConvertFp32ToBf16Supported(input, output, reasonIfUnsupported.value());
244 }

◆ IsConvertFp32ToFp16Supported()

bool IsConvertFp32ToFp16Supported ( const TensorInfo input,
const TensorInfo output,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 253 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

256 {
257  return m_LayerSupport->IsConvertFp32ToFp16Supported(input, output, reasonIfUnsupported.value());
258 }

◆ IsConvolution2dSupported()

bool IsConvolution2dSupported ( const TensorInfo input,
const TensorInfo output,
const Convolution2dDescriptor descriptor,
const TensorInfo weights,
const Optional< TensorInfo > &  biases,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 260 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

266 {
267  return m_LayerSupport->IsConvolution2dSupported(input,
268  output,
269  descriptor,
270  weights,
271  biases,
272  reasonIfUnsupported.value());
273 }

◆ IsDebugSupported()

bool IsDebugSupported ( const TensorInfo input,
const TensorInfo output,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 275 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

278 {
279  return m_LayerSupport->IsDebugSupported(input, output, reasonIfUnsupported.value());
280 }

◆ IsDepthToSpaceSupported()

bool IsDepthToSpaceSupported ( const TensorInfo input,
const TensorInfo output,
const DepthToSpaceDescriptor descriptor,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 282 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

286 {
287  return m_LayerSupport->IsDepthToSpaceSupported(input, output, descriptor, reasonIfUnsupported.value());
288 }

◆ IsDepthwiseConvolutionSupported()

bool IsDepthwiseConvolutionSupported ( const TensorInfo input,
const TensorInfo output,
const DepthwiseConvolution2dDescriptor descriptor,
const TensorInfo weights,
const Optional< TensorInfo > &  biases,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 290 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

297 {
298  return m_LayerSupport->IsDepthwiseConvolutionSupported(input,
299  output,
300  descriptor,
301  weights,
302  biases,
303  reasonIfUnsupported.value());
304 }

◆ IsDequantizeSupported()

bool IsDequantizeSupported ( const TensorInfo input,
const TensorInfo output,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 306 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

309 {
310  return m_LayerSupport->IsDequantizeSupported(input, output, reasonIfUnsupported.value());
311 }

◆ IsDetectionPostProcessSupported()

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() 
)

Definition at line 313 of file BackendHelper.cpp.

Referenced by LayerSupportHandle::LayerSupportHandle().

322 {
323  return m_LayerSupport->IsDetectionPostProcessSupported(boxEncodings,
324  scores,
325  anchors,
326  detectionBoxes,
327  detectionClasses,
328  detectionScores,
329  numDetections,
330  descriptor,
331  reasonIfUnsupported);
332 }

◆ IsDilatedDepthwiseConvolutionSupported()

bool IsDilatedDepthwiseConvolutionSupported ( const TensorInfo input,
const TensorInfo output,
const DepthwiseConvolution2dDescriptor descriptor,
const TensorInfo weights,
const Optional< TensorInfo > &  biases,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 334 of file BackendHelper.cpp.

Referenced by LayerSupportHandle::LayerSupportHandle().

341 {
342  return m_LayerSupport->IsDilatedDepthwiseConvolutionSupported(input,
343  output,
344  descriptor,
345  weights,
346  biases,
347  reasonIfUnsupported);
348 }

◆ IsDivisionSupported()

bool IsDivisionSupported ( const TensorInfo input0,
const TensorInfo input1,
const TensorInfo output,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 350 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

354 {
355  return m_LayerSupport->IsDivisionSupported(input0, input1, output, reasonIfUnsupported.value());
356 }

◆ IsElementwiseUnarySupported()

bool IsElementwiseUnarySupported ( const TensorInfo input,
const TensorInfo output,
const ElementwiseUnaryDescriptor descriptor,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 358 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

362 {
363  return m_LayerSupport->IsElementwiseUnarySupported(input, output, descriptor, reasonIfUnsupported.value());
364 }

◆ IsEqualSupported()

bool IsEqualSupported ( const TensorInfo input0,
const TensorInfo input1,
const TensorInfo output,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 366 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

370 {
371  return m_LayerSupport->IsEqualSupported(input0, input1, output, reasonIfUnsupported.value());
372 }

◆ IsFakeQuantizationSupported()

bool IsFakeQuantizationSupported ( const TensorInfo input,
const FakeQuantizationDescriptor descriptor,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 374 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

377 {
378  return m_LayerSupport->IsFakeQuantizationSupported(input, descriptor, reasonIfUnsupported.value());
379 }

◆ IsFillSupported()

bool IsFillSupported ( const TensorInfo input,
const TensorInfo output,
const FillDescriptor descriptor,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 381 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

385 {
386  return m_LayerSupport->IsFillSupported(input, output, descriptor, reasonIfUnsupported.value());
387 }

◆ IsFloorSupported()

bool IsFloorSupported ( const TensorInfo input,
const TensorInfo output,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 389 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

392 {
393  return m_LayerSupport->IsFloorSupported(input, output, reasonIfUnsupported.value());
394 }

◆ IsFullyConnectedSupported()

bool IsFullyConnectedSupported ( const TensorInfo input,
const TensorInfo output,
const TensorInfo weights,
const TensorInfo biases,
const FullyConnectedDescriptor descriptor,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 396 of file BackendHelper.cpp.

References ARMNN_LOG, armnn::GetCapability(), TensorInfo::IsConstant(), BackendId::IsUndefined(), FullyConnectedDescriptor::m_BiasEnabled, FullyConnectedDescriptor::m_ConstantWeights, OptionalReferenceSwitch< std::is_reference< T >::value, T >::value(), and armnn::warning.

Referenced by LayerSupportHandle::LayerSupportHandle().

402 {
403  if(!m_BackendId.IsUndefined())
404  {
405  auto capability = GetCapability("ConstantTensorsAsInputs", m_BackendId);
406  if(!capability.has_value() || capability.value().GetValue().AsBool() == false)
407  {
408  if(!weights.IsConstant())
409  {
410  reasonIfUnsupported.value() =
411  "This backend might not support non constant weights. "
412  "If weights are constant make sure to set IsConstant when creating TensorInfo";
413  return false;
414  }
415  if(descriptor.m_BiasEnabled)
416  {
417  if(!biases.IsConstant())
418  {
419  reasonIfUnsupported.value() =
420  "This backend might not support non constant bias. "
421  "If bias are constant make sure to set IsConstant when creating TensorInfo";
422  return false;
423  }
424  }
425 
426  // At the first stage we will only print a warning. this is to give
427  // backend developers a chance to adopt and read weights from input slots.
428  ARMNN_LOG(warning) << "The backend makes use of a deprecated interface to read constant tensors. "
429  "If you are a backend developer please find more information in our "
430  "doxygen documentation on github https://github.com/ARM-software/armnn "
431  "under the keyword 'ConstTensorsAsInputs'.";
432  }
433 
434  if(!descriptor.m_ConstantWeights)
435  {
436  auto capability = GetCapability("NonConstWeights", m_BackendId);
437  if (capability.has_value() && capability.value().GetValue().AsBool() == true)
438  {
439  return true;
440  }
441  return false;
442  }
443  }
444 
445  return m_LayerSupport->IsFullyConnectedSupported(input,
446  output,
447  weights,
448  biases,
449  descriptor,
450  reasonIfUnsupported.value());
451 }
Optional< const BackendOptions::BackendOption > GetCapability(const std::string &backendCapabilityName, const BackendCapabilities &capabilities)
Returns a BackendCapability if the backend lists the capability The BackendCapability must then be in...
#define ARMNN_LOG(severity)
Definition: Logging.hpp:202
bool IsUndefined() const
Definition: BackendId.hpp:139

◆ IsGatherSupported() [1/2]

bool IsGatherSupported ( const TensorInfo input0,
const TensorInfo input1,
const TensorInfo output,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 453 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

457 {
458  return m_LayerSupport->IsGatherSupported(input0, input1, output, reasonIfUnsupported.value());
459 }

◆ IsGatherSupported() [2/2]

bool IsGatherSupported ( const TensorInfo input0,
const TensorInfo input1,
const TensorInfo output,
const GatherDescriptor descriptor,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 461 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

466 {
467  return m_LayerSupport->IsGatherSupported(input0, input1, output, descriptor, reasonIfUnsupported.value());
468 }

◆ IsGreaterSupported()

bool IsGreaterSupported ( const TensorInfo input0,
const TensorInfo input1,
const TensorInfo ouput,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 470 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

474 {
475  return m_LayerSupport->IsGreaterSupported(input0, input1, ouput, reasonIfUnsupported.value());
476 }

◆ IsInputSupported()

bool IsInputSupported ( const TensorInfo input,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 478 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

480 {
481  return m_LayerSupport->IsInputSupported(input, reasonIfUnsupported.value());
482 }

◆ IsInstanceNormalizationSupported()

bool IsInstanceNormalizationSupported ( const TensorInfo input,
const TensorInfo output,
const InstanceNormalizationDescriptor descriptor,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 484 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

489 {
490  return m_LayerSupport->IsInstanceNormalizationSupported(input, output, descriptor, reasonIfUnsupported.value());
491 }

◆ IsL2NormalizationSupported()

bool IsL2NormalizationSupported ( const TensorInfo input,
const TensorInfo output,
const L2NormalizationDescriptor descriptor,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 493 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

497 {
498  return m_LayerSupport->IsL2NormalizationSupported(input, output, descriptor, reasonIfUnsupported.value());
499 }

◆ IsLogicalBinarySupported()

bool IsLogicalBinarySupported ( const TensorInfo input0,
const TensorInfo input1,
const TensorInfo output,
const LogicalBinaryDescriptor descriptor,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 501 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

506 {
507  return m_LayerSupport->IsLogicalBinarySupported(input0,
508  input1,
509  output,
510  descriptor,
511  reasonIfUnsupported.value());
512 }

◆ IsLogicalUnarySupported()

bool IsLogicalUnarySupported ( const TensorInfo input,
const TensorInfo output,
const ElementwiseUnaryDescriptor descriptor,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 514 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

518 {
519  return m_LayerSupport->IsLogicalUnarySupported(input, output, descriptor, reasonIfUnsupported.value());
520 }

◆ IsLogSoftmaxSupported()

bool IsLogSoftmaxSupported ( const TensorInfo input,
const TensorInfo output,
const LogSoftmaxDescriptor descriptor,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 522 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

526 {
527  return m_LayerSupport->IsLogSoftmaxSupported(input, output, descriptor, reasonIfUnsupported.value());
528 }

◆ IsLstmSupported()

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 paramsInfo,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 530 of file BackendHelper.cpp.

Referenced by LayerSupportHandle::LayerSupportHandle().

540 {
541  return m_LayerSupport->IsLstmSupported(input,
542  outputStateIn,
543  cellStateIn,
544  scratchBuffer,
545  outputStateOut,
546  cellStateOut,
547  output,
548  descriptor,
549  paramsInfo,
550  reasonIfUnsupported);
551 }

◆ IsMaximumSupported()

bool IsMaximumSupported ( const TensorInfo input0,
const TensorInfo input1,
const TensorInfo output,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 553 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

557 {
558  return m_LayerSupport->IsMaximumSupported(input0, input1, output, reasonIfUnsupported.value());
559 }

◆ IsMeanSupported()

bool IsMeanSupported ( const TensorInfo input,
const TensorInfo output,
const MeanDescriptor descriptor,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 561 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

565 {
566  return m_LayerSupport->IsMeanSupported(input, output, descriptor, reasonIfUnsupported.value());
567 }

◆ IsMemCopySupported()

bool IsMemCopySupported ( const TensorInfo input,
const TensorInfo output,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 569 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

572 {
573  return m_LayerSupport->IsMemCopySupported(input, output, reasonIfUnsupported.value());
574 }

◆ IsMemImportSupported()

bool IsMemImportSupported ( const TensorInfo input,
const TensorInfo output,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 576 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

579 {
580  return m_LayerSupport->IsMemImportSupported(input, output, reasonIfUnsupported.value());
581 }

◆ IsMergerSupported()

bool IsMergerSupported ( const std::vector< const TensorInfo *>  inputs,
const TensorInfo output,
const OriginsDescriptor descriptor,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 591 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

595 {
596  return m_LayerSupport->IsMergerSupported(inputs, output, descriptor, reasonIfUnsupported.value());
597 }

◆ IsMergeSupported()

bool IsMergeSupported ( const TensorInfo input0,
const TensorInfo input1,
const TensorInfo output,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 583 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

587 {
588  return m_LayerSupport->IsMergeSupported(input0, input1, output, reasonIfUnsupported.value());
589 }

◆ IsMinimumSupported()

bool IsMinimumSupported ( const TensorInfo input0,
const TensorInfo input1,
const TensorInfo output,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 599 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

603 {
604  return m_LayerSupport->IsMinimumSupported(input0, input1, output, reasonIfUnsupported.value());
605 }

◆ IsMultiplicationSupported()

bool IsMultiplicationSupported ( const TensorInfo input0,
const TensorInfo input1,
const TensorInfo output,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 607 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

611 {
612  return m_LayerSupport->IsMultiplicationSupported(input0, input1, output, reasonIfUnsupported.value());
613 }

◆ IsNormalizationSupported()

bool IsNormalizationSupported ( const TensorInfo input,
const TensorInfo output,
const NormalizationDescriptor descriptor,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 615 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

619 {
620  return m_LayerSupport->IsNormalizationSupported(input, output, descriptor, reasonIfUnsupported.value());
621 }

◆ IsOutputSupported()

bool IsOutputSupported ( const TensorInfo output,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 623 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

625 {
626  return m_LayerSupport->IsOutputSupported(output, reasonIfUnsupported.value());
627 }

◆ IsPadSupported()

bool IsPadSupported ( const TensorInfo input,
const TensorInfo output,
const PadDescriptor descriptor,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 629 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

633 {
634  return m_LayerSupport->IsPadSupported(input, output, descriptor, reasonIfUnsupported.value());
635 }

◆ IsPermuteSupported()

bool IsPermuteSupported ( const TensorInfo input,
const TensorInfo output,
const PermuteDescriptor descriptor,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 637 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

641 {
642  return m_LayerSupport->IsPermuteSupported(input, output, descriptor, reasonIfUnsupported.value());
643 }

◆ IsPooling2dSupported()

bool IsPooling2dSupported ( const TensorInfo input,
const TensorInfo output,
const Pooling2dDescriptor descriptor,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 645 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

649 {
650  return m_LayerSupport->IsPooling2dSupported(input, output, descriptor, reasonIfUnsupported.value());
651 }

◆ IsPreCompiledSupported()

bool IsPreCompiledSupported ( const TensorInfo input,
const PreCompiledDescriptor descriptor,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 653 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

656 {
657  return m_LayerSupport->IsPreCompiledSupported(input, descriptor, reasonIfUnsupported.value());
658 }

◆ IsPreluSupported()

bool IsPreluSupported ( const TensorInfo input,
const TensorInfo alpha,
const TensorInfo output,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 660 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

664 {
665  return m_LayerSupport->IsPreluSupported(input, alpha, output, reasonIfUnsupported.value());
666 }

◆ IsQLstmSupported()

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 paramsInfo,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 675 of file BackendHelper.cpp.

Referenced by LayerSupportHandle::LayerSupportHandle().

684 {
685  return m_LayerSupport->IsQLstmSupported(input,
686  previousOutputIn,
687  previousCellStateIn,
688  outputStateOut,
689  cellStateOut,
690  output,
691  descriptor,
692  paramsInfo,
693  reasonIfUnsupported);
694 }

◆ IsQuantizedLstmSupported()

bool IsQuantizedLstmSupported ( const TensorInfo input,
const TensorInfo previousCellStateIn,
const TensorInfo previousOutputIn,
const TensorInfo cellStateOut,
const TensorInfo output,
const QuantizedLstmInputParamsInfo paramsInfo,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 696 of file BackendHelper.cpp.

Referenced by LayerSupportHandle::LayerSupportHandle().

703 {
704  return m_LayerSupport->IsQuantizedLstmSupported(input,
705  previousCellStateIn,
706  previousOutputIn,
707  cellStateOut,
708  output,
709  paramsInfo,
710  reasonIfUnsupported);
711 }

◆ IsQuantizeSupported()

bool IsQuantizeSupported ( const TensorInfo input,
const TensorInfo output,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 668 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

671 {
672  return m_LayerSupport->IsQuantizeSupported(input, output, reasonIfUnsupported.value());
673 }

◆ IsRankSupported()

bool IsRankSupported ( const TensorInfo input,
const TensorInfo output,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 713 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

716 {
717  return m_LayerSupport->IsRankSupported(input, output, reasonIfUnsupported.value());
718 }

◆ IsReduceSupported()

bool IsReduceSupported ( const TensorInfo input,
const TensorInfo output,
const ReduceDescriptor descriptor,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 720 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

724 {
725  return m_LayerSupport->IsReduceSupported(input, output, descriptor, reasonIfUnsupported.value());
726 }

◆ IsReshapeSupported()

bool IsReshapeSupported ( const TensorInfo input,
const TensorInfo output,
const ReshapeDescriptor descriptor,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 728 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

732 {
733  return m_LayerSupport->IsReshapeSupported(input, output, descriptor, reasonIfUnsupported.value());
734 }

◆ IsResizeBilinearSupported()

bool IsResizeBilinearSupported ( const TensorInfo input,
const TensorInfo output,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 736 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

739 {
740  return m_LayerSupport->IsResizeBilinearSupported(input, output, reasonIfUnsupported.value());
741 }

◆ IsResizeSupported()

bool IsResizeSupported ( const TensorInfo input,
const TensorInfo output,
const ResizeDescriptor descriptor,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 743 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

747 {
748  return m_LayerSupport->IsResizeSupported(input, output, descriptor, reasonIfUnsupported.value());
749 }

◆ IsRsqrtSupported()

bool IsRsqrtSupported ( const TensorInfo input,
const TensorInfo output,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 751 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

754 {
755  return m_LayerSupport->IsRsqrtSupported(input, output, reasonIfUnsupported.value());
756 }

◆ IsShapeSupported()

bool IsShapeSupported ( const TensorInfo input,
const TensorInfo output,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 758 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

761 {
762  return m_LayerSupport->IsShapeSupported(input, output, reasonIfUnsupported.value());
763 }

◆ IsSliceSupported()

bool IsSliceSupported ( const TensorInfo input,
const TensorInfo output,
const SliceDescriptor descriptor,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 765 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

769 {
770  return m_LayerSupport->IsSliceSupported(input, output, descriptor, reasonIfUnsupported.value());
771 }

◆ IsSoftmaxSupported()

bool IsSoftmaxSupported ( const TensorInfo input,
const TensorInfo output,
const SoftmaxDescriptor descriptor,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 773 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

777 {
778  return m_LayerSupport->IsSoftmaxSupported(input, output, descriptor, reasonIfUnsupported.value());
779 }

◆ IsSpaceToBatchNdSupported()

bool IsSpaceToBatchNdSupported ( const TensorInfo input,
const TensorInfo output,
const SpaceToBatchNdDescriptor descriptor,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 781 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

785 {
786  return m_LayerSupport->IsSpaceToBatchNdSupported(input, output, descriptor, reasonIfUnsupported.value());
787 }

◆ IsSpaceToDepthSupported()

bool IsSpaceToDepthSupported ( const TensorInfo input,
const TensorInfo output,
const SpaceToDepthDescriptor descriptor,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 789 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

793 {
794  return m_LayerSupport->IsSpaceToDepthSupported(input, output, descriptor, reasonIfUnsupported.value());
795 }

◆ IsSplitterSupported() [1/2]

bool IsSplitterSupported ( const TensorInfo input,
const ViewsDescriptor descriptor,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 797 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

800 {
801  return m_LayerSupport->IsSplitterSupported(input, descriptor, reasonIfUnsupported.value());
802 }

◆ IsSplitterSupported() [2/2]

bool IsSplitterSupported ( const TensorInfo input,
const std::vector< std::reference_wrapper< TensorInfo >> &  outputs,
const ViewsDescriptor descriptor,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 804 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

808 {
809  return m_LayerSupport->IsSplitterSupported(input, outputs, descriptor, reasonIfUnsupported.value());
810 }

◆ IsStackSupported()

bool IsStackSupported ( const std::vector< const TensorInfo *> &  inputs,
const TensorInfo output,
const StackDescriptor descriptor,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 812 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

816 {
817  return m_LayerSupport->IsStackSupported(inputs, output, descriptor, reasonIfUnsupported.value());
818 }

◆ IsStandInSupported()

bool IsStandInSupported ( const std::vector< const TensorInfo *> &  inputs,
const std::vector< const TensorInfo *> &  outputs,
const StandInDescriptor descriptor,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 820 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

824 {
825  return m_LayerSupport->IsStandInSupported(inputs, outputs, descriptor, reasonIfUnsupported.value());
826 }

◆ IsStridedSliceSupported()

bool IsStridedSliceSupported ( const TensorInfo input,
const TensorInfo output,
const StridedSliceDescriptor descriptor,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 829 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

833 {
834  return m_LayerSupport->IsStridedSliceSupported(input, output, descriptor, reasonIfUnsupported.value());
835 }

◆ IsSubtractionSupported()

bool IsSubtractionSupported ( const TensorInfo input0,
const TensorInfo input1,
const TensorInfo output,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 837 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

841 {
842  return m_LayerSupport->IsSubtractionSupported(input0, input1, output, reasonIfUnsupported.value());
843 }

◆ IsSwitchSupported()

bool IsSwitchSupported ( const TensorInfo input0,
const TensorInfo input1,
const TensorInfo output0,
const TensorInfo output1,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 845 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

850 {
851  return m_LayerSupport->IsSwitchSupported(input0, input1, output0, output1, reasonIfUnsupported.value());
852 }

◆ IsTransposeConvolution2dSupported()

bool IsTransposeConvolution2dSupported ( const TensorInfo input,
const TensorInfo output,
const TransposeConvolution2dDescriptor descriptor,
const TensorInfo weights,
const Optional< TensorInfo > &  biases,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 854 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

861 {
862  return m_LayerSupport->IsTransposeConvolution2dSupported(input,
863  output,
864  descriptor,
865  weights,
866  biases,
867  reasonIfUnsupported.value());
868 }

◆ IsTransposeSupported()

bool IsTransposeSupported ( const TensorInfo input,
const TensorInfo output,
const TransposeDescriptor descriptor,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 870 of file BackendHelper.cpp.

References OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Referenced by LayerSupportHandle::LayerSupportHandle().

874 {
875  return m_LayerSupport->IsTransposeSupported(input, output, descriptor, reasonIfUnsupported.value());
876 }

◆ IsUnidirectionalSequenceLstmSupported()

bool IsUnidirectionalSequenceLstmSupported ( const TensorInfo input,
const TensorInfo outputStateIn,
const TensorInfo cellStateIn,
const TensorInfo output,
const Optional< TensorInfo > &  hiddenStateOutput,
const Optional< TensorInfo > &  cellStateOutput,
const LstmDescriptor descriptor,
const LstmInputParamsInfo paramsInfo,
Optional< std::string &>  reasonIfUnsupported = EmptyOptional() 
)

Definition at line 878 of file BackendHelper.cpp.

Referenced by LayerSupportHandle::LayerSupportHandle().

887 {
888  return m_LayerSupport->IsUnidirectionalSequenceLstmSupported(input,
889  outputStateIn,
890  cellStateIn,
891  output,
892  hiddenStateOutput,
893  cellStateOutput,
894  descriptor,
895  paramsInfo,
896  reasonIfUnsupported);
897 }

The documentation for this class was generated from the following files: