ArmNN
 25.02
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ClLayerSupport Class Reference

#include <ClLayerSupport.hpp>

Inheritance diagram for ClLayerSupport:
[legend]
Collaboration diagram for ClLayerSupport:
[legend]

Public Member Functions

 ClLayerSupport (const IBackendInternal::IBackendSpecificModelContextPtr &modelContextPtr)
 
 ClLayerSupport ()
 
 ~ClLayerSupport ()
 
bool IsLayerSupported (const LayerType &type, const std::vector< TensorInfo > &infos, const BaseDescriptor &descriptor, const Optional< LstmInputParamsInfo > &lstmParamsInfo, const Optional< QuantizedLstmInputParamsInfo > &quantizedLstmParamsInfo, Optional< std::string & > reasonIfUnsupported) const
 Default implementation of the ILayerSupport interface, Backends should implement this as a switch statement for each of their LayerTypes calling their specific backend implementation of IsXXXLayerSupported. More...
 
bool IsActivationSupported (const TensorInfo &input, const TensorInfo &output, const ActivationDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsAdditionSupported (const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsArgMinMaxSupported (const TensorInfo &input, const TensorInfo &output, const ArgMinMaxDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsBatchMatMulSupported (const TensorInfo &inputX, const TensorInfo &inputY, const TensorInfo &output, const BatchMatMulDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
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
 
bool IsBatchToSpaceNdSupported (const TensorInfo &input, const TensorInfo &output, const BatchToSpaceNdDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsCastSupported (const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsChannelShuffleSupported (const TensorInfo &input, const TensorInfo &output, const ChannelShuffleDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsComparisonSupported (const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &ouput, const ComparisonDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsConcatSupported (const std::vector< const TensorInfo * > inputs, const TensorInfo &output, const OriginsDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsConstantSupported (const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsConvertFp16ToFp32Supported (const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsConvertFp32ToFp16Supported (const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsConvolution2dSupported (const TensorInfo &input, const TensorInfo &output, const Convolution2dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsConvolution3dSupported (const TensorInfo &input, const TensorInfo &output, const Convolution3dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsDequantizeSupported (const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsDepthToSpaceSupported (const TensorInfo &input, const TensorInfo &output, const DepthToSpaceDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsDepthwiseConvolutionSupported (const TensorInfo &input, const TensorInfo &output, const DepthwiseConvolution2dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsDilatedDepthwiseConvolutionSupported (const TensorInfo &input, const TensorInfo &output, const DepthwiseConvolution2dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, Optional< std::string & > reason=EmptyOptional()) const
 
bool IsDivisionSupported (const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsElementwiseUnarySupported (const TensorInfo &input, const TensorInfo &output, const ElementwiseUnaryDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsFillSupported (const TensorInfo &input, const TensorInfo &output, const FillDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsFloorSupported (const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsFullyConnectedSupported (const TensorInfo &input, const TensorInfo &output, const TensorInfo &weights, const TensorInfo &biases, const FullyConnectedDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsGatherNdSupported (const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported) const
 
bool IsGatherSupported (const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, const GatherDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported) const
 
bool IsInputSupported (const TensorInfo &input, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsInstanceNormalizationSupported (const TensorInfo &input, const TensorInfo &output, const InstanceNormalizationDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsL2NormalizationSupported (const TensorInfo &input, const TensorInfo &output, const L2NormalizationDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsLogicalBinarySupported (const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, const LogicalBinaryDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported) const
 
bool IsLogSoftmaxSupported (const TensorInfo &input, const TensorInfo &output, const LogSoftmaxDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
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()) const
 
bool IsMaximumSupported (const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsMeanSupported (const TensorInfo &input, const TensorInfo &output, const MeanDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsMinimumSupported (const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsMultiplicationSupported (const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsNormalizationSupported (const TensorInfo &input, const TensorInfo &output, const NormalizationDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsOutputSupported (const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsPadSupported (const TensorInfo &input, const TensorInfo &output, const PadDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsPermuteSupported (const TensorInfo &input, const TensorInfo &output, const PermuteDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsPooling2dSupported (const TensorInfo &input, const TensorInfo &output, const Pooling2dDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsPooling3dSupported (const TensorInfo &input, const TensorInfo &output, const Pooling3dDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsPreluSupported (const TensorInfo &input, const TensorInfo &alpha, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
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()) const
 
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()) const
 
bool IsQuantizeSupported (const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsReduceSupported (const TensorInfo &input, const TensorInfo &output, const ReduceDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsReshapeSupported (const TensorInfo &input, const TensorInfo &output, const ReshapeDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsResizeSupported (const TensorInfo &input, const TensorInfo &output, const ResizeDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsReverseV2Supported (const TensorInfo &input, const TensorInfo &axis, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported) const
 
bool IsScatterNdSupported (const TensorInfo &input, const TensorInfo &indices, const TensorInfo &updates, const TensorInfo &output, const ScatterNdDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsSliceSupported (const TensorInfo &input, const TensorInfo &output, const SliceDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsSoftmaxSupported (const TensorInfo &input, const TensorInfo &output, const SoftmaxDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsSpaceToBatchNdSupported (const TensorInfo &input, const TensorInfo &output, const SpaceToBatchNdDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsSpaceToDepthSupported (const TensorInfo &input, const TensorInfo &output, const SpaceToDepthDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsSplitterSupported (const TensorInfo &input, const std::vector< std::reference_wrapper< TensorInfo >> &outputs, const ViewsDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsStackSupported (const std::vector< const TensorInfo * > &inputs, const TensorInfo &output, const StackDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsStridedSliceSupported (const TensorInfo &input, const TensorInfo &output, const StridedSliceDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsSubtractionSupported (const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsTransposeConvolution2dSupported (const TensorInfo &input, const TensorInfo &output, const TransposeConvolution2dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsTileSupported (const TensorInfo &input, const TensorInfo &output, const TileDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsTransposeSupported (const TensorInfo &input, const TensorInfo &output, const TransposeDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsUnidirectionalSequenceLstmSupported (const TensorInfo &input, const TensorInfo &outputStateIn, const TensorInfo &cellStateIn, const TensorInfo &outputStateOut, const TensorInfo &cellStateOut, const TensorInfo &output, const UnidirectionalSequenceLstmDescriptor &descriptor, const LstmInputParamsInfo &paramsInfo, Optional< std::string & > reasonIfUnsupported) const
 
- Public Member Functions inherited from LayerSupportBase
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
 
bool IsMemCopySupported (const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsMemImportSupported (const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsMergeSupported (const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
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()) const
 
bool IsShapeSupported (const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 
bool IsStandInSupported (const std::vector< const TensorInfo * > &inputs, const std::vector< const TensorInfo * > &outputs, const StandInDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
 

Additional Inherited Members

- Protected Member Functions inherited from ILayerSupport
 ILayerSupport ()
 
virtual ~ILayerSupport ()
 

Detailed Description

Definition at line 14 of file ClLayerSupport.hpp.

Constructor & Destructor Documentation

◆ ClLayerSupport() [1/2]

Definition at line 180 of file ClLayerSupport.cpp.

181  : m_ModelContextPtr(modelContextPtr)
182 {
183 }

◆ ClLayerSupport() [2/2]

Definition at line 185 of file ClLayerSupport.cpp.

186  : m_ModelContextPtr(nullptr)
187 {
188 }

◆ ~ClLayerSupport()

~ClLayerSupport ( )
inline

Definition at line 19 of file ClLayerSupport.hpp.

19 {}

Member Function Documentation

◆ IsActivationSupported()

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

Definition at line 713 of file ClLayerSupport.cpp.

717 {
719  reasonIfUnsupported,
720  input,
721  output,
722  descriptor);
723 }
#define FORWARD_WORKLOAD_VALIDATE_FUNC(func, reasonIfUnsupported,...)
arm_compute::Status ClActivationWorkloadValidate(const TensorInfo &input, const TensorInfo &output, const ActivationDescriptor &descriptor)

References armnn::ClActivationWorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsAdditionSupported()

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

Definition at line 725 of file ClLayerSupport.cpp.

729 {
731  reasonIfUnsupported,
732  input0,
733  input1,
734  output,
735  nullptr);
736 }
arm_compute::Status ClAdditionValidate(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, const ActivationDescriptor *activationDescriptor)

References armnn::ClAdditionValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsArgMinMaxSupported()

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

Definition at line 738 of file ClLayerSupport.cpp.

742 {
743 
745  reasonIfUnsupported,
746  input,
747  output,
748  descriptor);
749 }
arm_compute::Status ClArgMinMaxWorkloadValidate(const TensorInfo &input, const TensorInfo &output, const ArgMinMaxDescriptor &descriptor)

References armnn::ClArgMinMaxWorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsBatchMatMulSupported()

bool IsBatchMatMulSupported ( const TensorInfo inputX,
const TensorInfo inputY,
const TensorInfo output,
const BatchMatMulDescriptor descriptor,
Optional< std::string & >  reasonIfUnsupported = EmptyOptional() 
) const

Definition at line 751 of file ClLayerSupport.cpp.

756 {
758  reasonIfUnsupported,
759  inputX,
760  inputY,
761  output,
762  descriptor,
763  nullptr);
764 }
arm_compute::Status ClBatchMatMulValidate(const TensorInfo &inputInfoX, const TensorInfo &inputInfoY, const TensorInfo &outputInfo, const BatchMatMulDescriptor &descriptor, const ActivationDescriptor *activationDescriptor)

References armnn::ClBatchMatMulValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

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

Definition at line 766 of file ClLayerSupport.cpp.

774 {
776  reasonIfUnsupported,
777  input,
778  output,
779  mean,
780  var,
781  beta,
782  gamma,
783  descriptor,
784  nullptr);
785 }
arm_compute::Status ClBatchNormalizationValidate(const TensorInfo &input, const TensorInfo &output, const TensorInfo &mean, const TensorInfo &var, const TensorInfo &beta, const TensorInfo &gamma, const BatchNormalizationDescriptor &descriptor, const ActivationDescriptor *activationDescriptor)

References armnn::ClBatchNormalizationValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsBatchToSpaceNdSupported()

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

Definition at line 787 of file ClLayerSupport.cpp.

791 {
793  reasonIfUnsupported,
794  input,
795  output,
796  descriptor);
797 }
arm_compute::Status ClBatchToSpaceNdWorkloadValidate(const TensorInfo &input, const TensorInfo &output, const BatchToSpaceNdDescriptor &descriptor)

References armnn::ClBatchToSpaceNdWorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsCastSupported()

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

Definition at line 799 of file ClLayerSupport.cpp.

802 {
804  reasonIfUnsupported,
805  input,
806  output);
807 }
arm_compute::Status ClCastValidate(const TensorInfo &input, const TensorInfo &output)

References armnn::ClCastValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsChannelShuffleSupported()

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

Definition at line 809 of file ClLayerSupport.cpp.

813 {
815  reasonIfUnsupported,
816  input,
817  output,
818  descriptor);
819 }
arm_compute::Status ClChannelShuffleValidate(const TensorInfo &input, const TensorInfo &output, const ChannelShuffleDescriptor &descriptor)

References armnn::ClChannelShuffleValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsComparisonSupported()

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

Definition at line 821 of file ClLayerSupport.cpp.

826 {
828  reasonIfUnsupported,
829  input0,
830  input1,
831  output,
832  descriptor);
833 }
arm_compute::Status ClComparisonWorkloadValidate(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, const ComparisonDescriptor &descriptor)

References armnn::ClComparisonWorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsConcatSupported()

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

Definition at line 835 of file ClLayerSupport.cpp.

839 {
840  if (descriptor.GetNumDimensions() <= descriptor.GetConcatAxis())
841  {
842  SetValueChecked(reasonIfUnsupported, "Cl Concat: Concat axis > Number of dimensions.");
843  return false;
844  }
845 
846  unsigned int concatInnerAxis = (descriptor.GetNumDimensions() - descriptor.GetConcatAxis()) - 1;
847  if(concatInnerAxis < 3) // Width, height, or channels
848  {
850  reasonIfUnsupported,
851  inputs,
852  output,
853  descriptor);
854  }
855  else if (concatInnerAxis == 3)
856  {
857  // We rely on the sub-tensor optimization to handle the batch dimension for 4D tensors. If we can't use
858  // sub-tensors for this then we can't support it. Here is where we check that the sub-tensors will work.
859  for (auto& input : inputs)
860  {
861  if (input && !output.IsTypeSpaceMatch(*input)) // Cannot use sub-tensors if the types are not same space
862  {
863  SetValueChecked(reasonIfUnsupported, "Cl Concat: Types and quantization parameters must match.");
864  return false;
865  }
866  }
867  return true; // Sub-tensors support concat along batch
868  }
869  else // > 4 dimensions not supported.
870  {
871  SetValueChecked(reasonIfUnsupported, "Cl Concat: Maximum of 4 dimensions supported.");
872  return false;
873  }
874 }
arm_compute::Status ClConcatWorkloadValidate(const std::vector< const TensorInfo * > &inputs, const TensorInfo &output, const OriginsDescriptor &descriptor)
void SetValueChecked(Optional< T & > optionalRef, V &&val)

References armnn::ClConcatWorkloadValidate(), FORWARD_WORKLOAD_VALIDATE_FUNC, OriginsDescriptor::GetConcatAxis(), OriginsDescriptor::GetNumDimensions(), TensorInfo::IsTypeSpaceMatch(), and armnn::SetValueChecked().

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsConstantSupported()

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

Definition at line 876 of file ClLayerSupport.cpp.

878 {
880  reasonIfUnsupported,
881  output);
882 }
arm_compute::Status ClConstantWorkloadValidate(const TensorInfo &output)

References armnn::ClConstantWorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsConvertFp16ToFp32Supported()

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

Definition at line 884 of file ClLayerSupport.cpp.

887 {
889  reasonIfUnsupported,
890  input,
891  output);
892 }
arm_compute::Status ClConvertFp16ToFp32WorkloadValidate(const TensorInfo &input, const TensorInfo &output)

References armnn::ClConvertFp16ToFp32WorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsConvertFp32ToFp16Supported()

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

Definition at line 894 of file ClLayerSupport.cpp.

897 {
899  reasonIfUnsupported,
900  input,
901  output);
902 }
arm_compute::Status ClConvertFp32ToFp16WorkloadValidate(const TensorInfo &input, const TensorInfo &output)

References armnn::ClConvertFp32ToFp16WorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsConvolution2dSupported()

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

Definition at line 904 of file ClLayerSupport.cpp.

910 {
911  bool isFastMathEnabled = false;
912 #if defined(ARMCOMPUTECL_ENABLED)
913  if (m_ModelContextPtr)
914  {
915  if (m_ModelContextPtr.get() != nullptr)
916  {
917  auto modelOptions = dynamic_cast<ClBackendModelContext*>(m_ModelContextPtr.get());
918  if (modelOptions)
919  {
920  isFastMathEnabled = modelOptions->IsFastMathEnabled();
921  }
922  }
923  }
924 #endif
925 
927  reasonIfUnsupported,
928  input,
929  output,
930  descriptor,
931  weights,
932  biases,
933  isFastMathEnabled,
934  nullptr);
935 }
arm_compute::Status ClConvolution2dWorkloadValidate(const TensorInfo &input, const TensorInfo &output, const Convolution2dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, bool isFastMathEnabled, const ActivationDescriptor *activationDescriptor)

References armnn::ClConvolution2dWorkloadValidate(), FORWARD_WORKLOAD_VALIDATE_FUNC, and ClBackendModelContext::IsFastMathEnabled().

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsConvolution3dSupported()

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

Definition at line 937 of file ClLayerSupport.cpp.

943 {
944  bool isFastMathEnabled = false;
945 #if defined(ARMCOMPUTECL_ENABLED)
946  if (m_ModelContextPtr)
947 {
948  if (m_ModelContextPtr.get() != nullptr)
949  {
950  auto modelOptions = dynamic_cast<ClBackendModelContext*>(m_ModelContextPtr.get());
951  if (modelOptions)
952  {
953  isFastMathEnabled = modelOptions->IsFastMathEnabled();
954  }
955  }
956 }
957 #endif
958 
960  reasonIfUnsupported,
961  input,
962  output,
963  descriptor,
964  weights,
965  biases,
966  isFastMathEnabled,
967  nullptr);
968 }
arm_compute::Status ClConvolution3dWorkloadValidate(const TensorInfo &input, const TensorInfo &output, const Convolution3dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, bool isFastMathEnabled, const ActivationDescriptor *activationDescriptor)

References armnn::ClConvolution3dWorkloadValidate(), FORWARD_WORKLOAD_VALIDATE_FUNC, and ClBackendModelContext::IsFastMathEnabled().

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsDepthToSpaceSupported()

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

Definition at line 980 of file ClLayerSupport.cpp.

984 {
986  reasonIfUnsupported,
987  input,
988  output,
989  descriptor);
990 }
arm_compute::Status ClDepthToSpaceWorkloadValidate(const TensorInfo &input, const TensorInfo &output, const DepthToSpaceDescriptor &descriptor)

References armnn::ClDepthToSpaceWorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsDepthwiseConvolutionSupported()

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

Definition at line 992 of file ClLayerSupport.cpp.

998 {
1000  reasonIfUnsupported,
1001  input,
1002  output,
1003  descriptor,
1004  weights,
1005  biases,
1006  nullptr);
1007 }
arm_compute::Status ClDepthwiseConvolutionWorkloadValidate(const TensorInfo &input, const TensorInfo &output, const DepthwiseConvolution2dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, const ActivationDescriptor *activationDescriptor)

References armnn::ClDepthwiseConvolutionWorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsDequantizeSupported()

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

Definition at line 970 of file ClLayerSupport.cpp.

973 {
975  reasonIfUnsupported,
976  input,
977  output);
978 }
arm_compute::Status ClDequantizeWorkloadValidate(const TensorInfo &input, const TensorInfo &output)

References armnn::ClDequantizeWorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsDilatedDepthwiseConvolutionSupported()

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

Definition at line 1009 of file ClLayerSupport.cpp.

1015 {
1017  reasonIfUnsupported,
1018  input,
1019  output,
1020  descriptor,
1021  weights,
1022  biases,
1023  nullptr);
1024 }

References armnn::ClDepthwiseConvolutionWorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

◆ IsDivisionSupported()

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

Definition at line 1027 of file ClLayerSupport.cpp.

1031 {
1033  reasonIfUnsupported,
1034  input0,
1035  input1,
1036  output,
1037  nullptr);
1038 }
arm_compute::Status ClDivisionWorkloadValidate(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, const ActivationDescriptor *activationDescriptor)

References armnn::ClDivisionWorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsElementwiseUnarySupported()

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

Definition at line 1040 of file ClLayerSupport.cpp.

1044 {
1045  switch(descriptor.m_Operation)
1046  {
1047  case UnaryOperation::Abs:
1049  reasonIfUnsupported,
1050  input,
1051  output);
1052  case UnaryOperation::Exp:
1054  reasonIfUnsupported,
1055  input,
1056  output);
1057  case UnaryOperation::Log:
1059  reasonIfUnsupported,
1060  input,
1061  output);
1064  reasonIfUnsupported,
1065  input,
1066  output);
1067  case UnaryOperation::Neg:
1069  reasonIfUnsupported,
1070  input,
1071  output);
1072  case UnaryOperation::Rsqrt:
1074  reasonIfUnsupported,
1075  input,
1076  output);
1077  case UnaryOperation::Sin:
1079  reasonIfUnsupported,
1080  input,
1081  output);
1082  case UnaryOperation::Sqrt:
1084  reasonIfUnsupported,
1085  input,
1086  output);
1087  default:
1088  return false;
1089  }
1090 }
arm_compute::Status ClAbsWorkloadValidate(const TensorInfo &input, const TensorInfo &output)
arm_compute::Status ClSqrtWorkloadValidate(const TensorInfo &input, const TensorInfo &output)
arm_compute::Status ClRsqrtWorkloadValidate(const TensorInfo &input, const TensorInfo &output)
arm_compute::Status ClLogWorkloadValidate(const TensorInfo &input, const TensorInfo &output)
arm_compute::Status ClNegWorkloadValidate(const TensorInfo &input, const TensorInfo &output)
arm_compute::Status ClExpWorkloadValidate(const TensorInfo &input, const TensorInfo &output)
arm_compute::Status ClSinWorkloadValidate(const TensorInfo &input, const TensorInfo &output)
arm_compute::Status ClLogicalNotWorkloadValidate(const TensorInfo &input, const TensorInfo &output)

References armnn::Abs, armnn::ClAbsWorkloadValidate(), armnn::ClExpWorkloadValidate(), armnn::ClLogicalNotWorkloadValidate(), armnn::ClLogWorkloadValidate(), armnn::ClNegWorkloadValidate(), armnn::ClRsqrtWorkloadValidate(), armnn::ClSinWorkloadValidate(), armnn::ClSqrtWorkloadValidate(), armnn::Exp, FORWARD_WORKLOAD_VALIDATE_FUNC, armnn::Log, armnn::LogicalNot, ElementwiseUnaryDescriptor::m_Operation, armnn::Neg, armnn::Rsqrt, armnn::Sin, and armnn::Sqrt.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsFillSupported()

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

Definition at line 1092 of file ClLayerSupport.cpp.

1096 {
1097  armnn::IgnoreUnused(input);
1098  armnn::IgnoreUnused(output);
1099  armnn::IgnoreUnused(descriptor);
1100 
1101  return IsClBackendSupported(reasonIfUnsupported);
1102 }
void IgnoreUnused(Ts &&...)

References armnn::IgnoreUnused().

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsFloorSupported()

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

Definition at line 1104 of file ClLayerSupport.cpp.

1107 {
1109  reasonIfUnsupported,
1110  input,
1111  output);
1112 }
arm_compute::Status ClFloorWorkloadValidate(const TensorInfo &input, const TensorInfo &output)

References armnn::ClFloorWorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsFullyConnectedSupported()

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

Definition at line 1114 of file ClLayerSupport.cpp.

1120 {
1122  reasonIfUnsupported,
1123  input,
1124  output,
1125  weights,
1126  biases,
1127  descriptor,
1128  nullptr);
1129 }
arm_compute::Status ClFullyConnectedWorkloadValidate(const TensorInfo &input, const TensorInfo &output, const TensorInfo &weights, const Optional< TensorInfo > &biases, const FullyConnectedDescriptor &descriptor, const ActivationDescriptor *activationDescriptor)

References armnn::ClFullyConnectedWorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsGatherNdSupported()

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

Definition at line 1145 of file ClLayerSupport.cpp.

1149 {
1151  reasonIfUnsupported,
1152  input0,
1153  input1,
1154  output);
1155 }
arm_compute::Status ClGatherNdWorkloadValidate(const TensorInfo &paramsInfo, const TensorInfo &indicesInfo, const TensorInfo &outputInfo)

References armnn::ClGatherNdWorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsGatherSupported()

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

Definition at line 1131 of file ClLayerSupport.cpp.

1136 {
1138  reasonIfUnsupported,
1139  input0,
1140  input1,
1141  output,
1142  descriptor);
1143 }
arm_compute::Status ClGatherWorkloadValidate(const TensorInfo &input, const TensorInfo &indices, const TensorInfo &output, const GatherDescriptor &descriptor)

References armnn::ClGatherWorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsInputSupported()

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

Definition at line 1157 of file ClLayerSupport.cpp.

1159 {
1160  return IsClBackendSupported(reasonIfUnsupported, input);
1161 }

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsInstanceNormalizationSupported()

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

Definition at line 1163 of file ClLayerSupport.cpp.

1167 {
1169  reasonIfUnsupported,
1170  input,
1171  output,
1172  descriptor);
1173 }
arm_compute::Status ClInstanceNormalizationWorkloadValidate(const TensorInfo &input, const TensorInfo &output, const InstanceNormalizationDescriptor &descriptor)

References armnn::ClInstanceNormalizationWorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsL2NormalizationSupported()

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

Definition at line 1175 of file ClLayerSupport.cpp.

1179 {
1181  reasonIfUnsupported,
1182  input,
1183  output,
1184  descriptor);
1185 }
arm_compute::Status ClL2NormalizationWorkloadValidate(const TensorInfo &input, const TensorInfo &output, const L2NormalizationDescriptor &descriptor)

References armnn::ClL2NormalizationWorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsLayerSupported()

bool IsLayerSupported ( const LayerType type,
const std::vector< TensorInfo > &  infos,
const BaseDescriptor descriptor,
const Optional< LstmInputParamsInfo > &  lstmParamsInfo,
const Optional< QuantizedLstmInputParamsInfo > &  quantizedLstmParamsInfo,
Optional< std::string & >  reasonIfUnsupported 
) const
virtual

Default implementation of the ILayerSupport interface, Backends should implement this as a switch statement for each of their LayerTypes calling their specific backend implementation of IsXXXLayerSupported.

Reimplemented from LayerSupportBase.

Definition at line 190 of file ClLayerSupport.cpp.

196 {
197  switch (type)
198  {
200  return IsActivationSupported(infos[0],
201  infos[1],
202  *(PolymorphicDowncast<const ActivationDescriptor*>(&descriptor)),
203  reasonIfUnsupported);
204  case LayerType::Addition:
206  return IsAdditionSupported(infos[0], infos[1], infos[2], reasonIfUnsupported);
209  return IsArgMinMaxSupported(infos[0],
210  infos[1],
211  *(PolymorphicDowncast<const ArgMinMaxDescriptor*>(&descriptor)),
212  reasonIfUnsupported);
214  return IsBatchMatMulSupported(infos[0],
215  infos[1],
216  infos[2],
217  *(PolymorphicDowncast<const BatchMatMulDescriptor*>(&descriptor)),
218  reasonIfUnsupported);
220  return IsBatchNormalizationSupported(infos[0],
221  infos[1],
222  infos[2],
223  infos[3],
224  infos[4],
225  infos[5],
226  *(PolymorphicDowncast<const BatchNormalizationDescriptor*>
227  (&descriptor)),
228  reasonIfUnsupported);
230  return IsBatchToSpaceNdSupported(infos[0],
231  infos[1],
232  *(PolymorphicDowncast<const BatchToSpaceNdDescriptor*>(&descriptor)),
233  reasonIfUnsupported);
234  case LayerType::Cast:
235  return IsCastSupported(infos[0], infos[1], reasonIfUnsupported);
237  return IsChannelShuffleSupported(infos[0],
238  infos[1],
239  *(PolymorphicDowncast<const ChannelShuffleDescriptor*>(&descriptor)),
240  reasonIfUnsupported);
242  return IsComparisonSupported(infos[0],
243  infos[1],
244  infos[2],
245  *(PolymorphicDowncast<const ComparisonDescriptor*>(&descriptor)),
246  reasonIfUnsupported);
247  case LayerType::Concat:
248  {
249  std::vector<const TensorInfo*> inputInfos;
250  for (uint32_t i = 0; i < (infos.size() - 1); i++)
251  {
252  inputInfos.push_back(&infos[i]);
253  }
254  return IsConcatSupported(inputInfos,
255  infos[infos.size() - 1],
256  *(PolymorphicDowncast<const OriginsDescriptor*>(&descriptor)),
257  reasonIfUnsupported);
258  }
259  case LayerType::Constant:
260  return IsConstantSupported(infos[0], reasonIfUnsupported);
262  return IsConvertFp16ToFp32Supported(infos[0], infos[1], reasonIfUnsupported);
264  return IsConvertFp32ToFp16Supported(infos[0], infos[1], reasonIfUnsupported);
266  {
267  if (infos.size() != 4)
268  {
269  throw InvalidArgumentException("Invalid number of Convolution2d TensorInfos. "
270  "TensorInfos should be of format: {input, output, weights, biases}.");
271  }
272 
273  auto desc = *(PolymorphicDowncast<const Convolution2dDescriptor*>(&descriptor));
274  if (infos[3] == TensorInfo())
275  {
276  return IsConvolution2dSupported(infos[0],
277  infos[1],
278  desc,
279  infos[2],
280  EmptyOptional(),
281  reasonIfUnsupported);
282  }
283  else
284  {
285  return IsConvolution2dSupported(infos[0],
286  infos[1],
287  desc,
288  infos[2],
289  infos[3],
290  reasonIfUnsupported);
291  }
292  }
294  {
295  if (infos.size() != 4)
296  {
297  throw InvalidArgumentException("Invalid number of Convolution3d TensorInfos. "
298  "TensorInfos should be of format: {input, output, weights, biases}.");
299  }
300 
301  auto desc = *(PolymorphicDowncast<const Convolution3dDescriptor*>(&descriptor));
302  if (infos[3] == TensorInfo())
303  {
304  return IsConvolution3dSupported(infos[0],
305  infos[1],
306  desc,
307  infos[2],
308  EmptyOptional(),
309  reasonIfUnsupported);
310  }
311  else
312  {
313  return IsConvolution3dSupported(infos[0],
314  infos[1],
315  desc,
316  infos[2],
317  infos[3],
318  reasonIfUnsupported);
319  }
320  }
322  return IsDepthToSpaceSupported(infos[0],
323  infos[1],
324  *(PolymorphicDowncast<const DepthToSpaceDescriptor*>(&descriptor)),
325  reasonIfUnsupported);
327  {
328  if (infos.size() != 4)
329  {
330  throw InvalidArgumentException("Invalid number of DepthwiseConvolution2d TensorInfos. "
331  "TensorInfos should be of format: {input, output, weights, biases}.");
332  }
333 
334  auto desc = *(PolymorphicDowncast<const DepthwiseConvolution2dDescriptor*>(&descriptor));
335  if (infos[3] == TensorInfo())
336  {
337  return IsDepthwiseConvolutionSupported(infos[0],
338  infos[1],
339  desc,
340  infos[2],
341  EmptyOptional(),
342  reasonIfUnsupported);
343  }
344  else
345  {
346  return IsDepthwiseConvolutionSupported(infos[0],
347  infos[1],
348  desc,
349  infos[2],
350  infos[3],
351  reasonIfUnsupported);
352  }
353  }
355  return IsDequantizeSupported(infos[0], infos[1], reasonIfUnsupported);
356  case LayerType::Division:
358  return IsDivisionSupported(infos[0], infos[1], infos[2], reasonIfUnsupported);
361  {
362  auto desc = *(PolymorphicDowncast<const ElementwiseBinaryDescriptor *>(&descriptor));
363 
364  switch (desc.m_Operation)
365  {
368  reasonIfUnsupported,
369  infos[0],
370  infos[1],
371  infos[2],
372  nullptr);
375  reasonIfUnsupported,
376  infos[0],
377  infos[1],
378  infos[2],
379  nullptr);
382  reasonIfUnsupported,
383  infos[0],
384  infos[1],
385  infos[2],
386  nullptr);
389  reasonIfUnsupported,
390  infos[0],
391  infos[1],
392  infos[2]);
395  reasonIfUnsupported,
396  infos[0],
397  infos[1],
398  infos[2]);
401  reasonIfUnsupported,
402  infos[0],
403  infos[1],
404  infos[2],
405  nullptr);
409  reasonIfUnsupported,
410  infos[0],
411  infos[1],
412  infos[2],
413  desc,
414  nullptr);
417  reasonIfUnsupported,
418  infos[0],
419  infos[1],
420  infos[2],
421  nullptr);
422  default:
423  return false;
424  }
425  }
427  return IsElementwiseUnarySupported(infos[0],
428  infos[1],
429  *(PolymorphicDowncast<const ElementwiseUnaryDescriptor*>(&descriptor)),
430  reasonIfUnsupported);
431  case LayerType::Fill:
432  return IsFillSupported(infos[0],
433  infos[1],
434  *(PolymorphicDowncast<const FillDescriptor*>(&descriptor)),
435  reasonIfUnsupported);
436  case LayerType::Floor:
437  return IsFloorSupported(infos[0], infos[1], reasonIfUnsupported);
439  return IsFullyConnectedSupported(infos[0],
440  infos[1],
441  infos[2],
442  infos[3],
443  *(PolymorphicDowncast<const FullyConnectedDescriptor*>(&descriptor)),
444  reasonIfUnsupported);
445  case LayerType::Gather:
446  return IsGatherSupported(infos[0],
447  infos[1],
448  infos[2],
449  *(PolymorphicDowncast<const GatherDescriptor*>(&descriptor)),
450  reasonIfUnsupported);
451  case LayerType::GatherNd:
452  return IsGatherNdSupported(infos[0],
453  infos[1],
454  infos[2],
455  reasonIfUnsupported);
456  case LayerType::Input:
457  return IsInputSupported(infos[0], reasonIfUnsupported);
459  return IsInstanceNormalizationSupported(infos[0],
460  infos[1],
461  *(PolymorphicDowncast<const InstanceNormalizationDescriptor*>
462  (&descriptor)),
463  reasonIfUnsupported);
465  return IsL2NormalizationSupported(infos[0],
466  infos[1],
467  *(PolymorphicDowncast<const L2NormalizationDescriptor*>(&descriptor)),
468  reasonIfUnsupported);
470  return IsLogicalBinarySupported(infos[0],
471  infos[1],
472  infos[2],
473  *(PolymorphicDowncast<const LogicalBinaryDescriptor*>(&descriptor)),
474  reasonIfUnsupported);
476  return IsLogSoftmaxSupported(infos[0],
477  infos[1],
478  *(PolymorphicDowncast<const LogSoftmaxDescriptor*>(&descriptor)),
479  reasonIfUnsupported);
480  case LayerType::Lstm:
481  return IsLstmSupported(infos[0],
482  infos[1],
483  infos[2],
484  infos[3],
485  infos[4],
486  infos[5],
487  infos[6],
488  *(PolymorphicDowncast<const LstmDescriptor*>(&descriptor)),
489  lstmParamsInfo.value(),
490  reasonIfUnsupported);
491  case LayerType::Map:
492  return true;
493  case LayerType::MemCopy:
494  return LayerSupportBase::IsMemCopySupported(infos[0], infos[1], reasonIfUnsupported);
496  return LayerSupportBase::IsMemImportSupported(infos[0], infos[1], reasonIfUnsupported);
497  case LayerType::Merge:
498  return LayerSupportBase::IsMergeSupported(infos[0],
499  infos[1],
500  infos[2],
501  reasonIfUnsupported);
502  case LayerType::Maximum:
504  return IsMaximumSupported(infos[0], infos[1], infos[2], reasonIfUnsupported);
506  case LayerType::Mean:
507  return IsMeanSupported(infos[0],
508  infos[1],
509  *(PolymorphicDowncast<const MeanDescriptor*>(&descriptor)),
510  reasonIfUnsupported);
511  case LayerType::Minimum:
513  return IsMinimumSupported(infos[0], infos[1], infos[2], reasonIfUnsupported);
517  return IsMultiplicationSupported(infos[0], infos[1], infos[2], reasonIfUnsupported);
520  return IsNormalizationSupported(infos[0],
521  infos[1],
522  *(PolymorphicDowncast<const NormalizationDescriptor*>(&descriptor)),
523  reasonIfUnsupported);
524  case LayerType::Output:
525  return IsOutputSupported(infos[0], reasonIfUnsupported);
526  case LayerType::Pad:
527  return IsPadSupported(infos[0],
528  infos[1],
529  *(PolymorphicDowncast<const PadDescriptor*>(&descriptor)),
530  reasonIfUnsupported);
531  case LayerType::Permute:
532  return IsPermuteSupported(infos[0],
533  infos[1],
534  *(PolymorphicDowncast<const PermuteDescriptor*>(&descriptor)),
535  reasonIfUnsupported);
537  return IsPooling2dSupported(infos[0],
538  infos[1],
539  *(PolymorphicDowncast<const Pooling2dDescriptor*>(&descriptor)),
540  reasonIfUnsupported);
542  return IsPooling3dSupported(infos[0],
543  infos[1],
544  *(PolymorphicDowncast<const Pooling3dDescriptor*>(&descriptor)),
545  reasonIfUnsupported);
546  case LayerType::Prelu:
547  return IsPreluSupported(infos[0], infos[1], infos[2], reasonIfUnsupported);
548  case LayerType::QLstm:
549  return IsQLstmSupported(infos[0],
550  infos[1],
551  infos[2],
552  infos[3],
553  infos[4],
554  infos[5],
555  *(PolymorphicDowncast<const QLstmDescriptor*>(&descriptor)),
556  lstmParamsInfo.value(),
557  reasonIfUnsupported);
558  case LayerType::Quantize:
559  return IsQuantizeSupported(infos[0], infos[1], reasonIfUnsupported);
561  return IsQuantizedLstmSupported(infos[0],
562  infos[1],
563  infos[2],
564  infos[3],
565  infos[4],
566  quantizedLstmParamsInfo.value(),
567  reasonIfUnsupported);
568  case LayerType::Rank:
569  return true;
570  case LayerType::Reduce:
571  return IsReduceSupported(infos[0],
572  infos[1],
573  *(PolymorphicDowncast<const ReduceDescriptor*>(&descriptor)),
574  reasonIfUnsupported);
575  case LayerType::Reshape:
576  return IsReshapeSupported(infos[0],
577  infos[1],
578  *(PolymorphicDowncast<const ReshapeDescriptor*>(&descriptor)),
579  reasonIfUnsupported);
580  case LayerType::Resize:
581  return IsResizeSupported(infos[0],
582  infos[1],
583  *(PolymorphicDowncast<const ResizeDescriptor*>(&descriptor)),
584  reasonIfUnsupported);
586  return IsReverseV2Supported(infos[0],
587  infos[1],
588  infos[2],
589  reasonIfUnsupported);
591  return IsScatterNdSupported(infos[0], // input/shape
592  infos[1], // indices
593  infos[2], // updates
594  infos[3], // output
595  *(PolymorphicDowncast<const ScatterNdDescriptor*>(&descriptor)),
596  reasonIfUnsupported);
597  case LayerType::Shape:
598  return LayerSupportBase::IsShapeSupported(infos[0],
599  infos[1],
600  reasonIfUnsupported);
601  case LayerType::Slice:
602  return IsSliceSupported(infos[0],
603  infos[1],
604  *(PolymorphicDowncast<const SliceDescriptor*>(&descriptor)),
605  reasonIfUnsupported);
606  case LayerType::Softmax:
607  return IsSoftmaxSupported(infos[0],
608  infos[1],
609  *(PolymorphicDowncast<const SoftmaxDescriptor*>(&descriptor)),
610  reasonIfUnsupported);
612  return IsSpaceToBatchNdSupported(infos[0],
613  infos[1],
614  *(PolymorphicDowncast<const SpaceToBatchNdDescriptor*>(&descriptor)),
615  reasonIfUnsupported);
617  return IsSpaceToDepthSupported(infos[0],
618  infos[1],
619  *(PolymorphicDowncast<const SpaceToDepthDescriptor*>(&descriptor)),
620  reasonIfUnsupported);
621  case LayerType::Splitter:
622  {
623  std::vector<TensorInfo> outputInfos;
624  for (uint32_t i = 1; i < infos.size(); i++)
625  {
626  outputInfos.push_back(infos[i]);
627  }
628  return IsSplitterSupported(infos[0],
629  {outputInfos.begin(), outputInfos.end()},
630  *(PolymorphicDowncast<const ViewsDescriptor*>(&descriptor)),
631  reasonIfUnsupported);
632  }
633  case LayerType::Stack:
634  {
635  std::vector<const TensorInfo*> inputInfos;
636  for (uint32_t i = 0; i < infos.size() - 1; i++)
637  {
638  inputInfos.push_back(&infos[i]);
639  }
640  return IsStackSupported(inputInfos,
641  infos[infos.size() - 1],
642  *(PolymorphicDowncast<const StackDescriptor*>(&descriptor)),
643  reasonIfUnsupported);
644  }
646  return IsStridedSliceSupported(infos[0],
647  infos[1],
648  *(PolymorphicDowncast<const StridedSliceDescriptor*>(&descriptor)),
649  reasonIfUnsupported);
652  return IsSubtractionSupported(infos[0], infos[1], infos[2], reasonIfUnsupported);
654  case LayerType::Tile:
655  return IsTileSupported(infos[0],
656  infos[1],
657  *(PolymorphicDowncast<const TileDescriptor*>(&descriptor)),
658  reasonIfUnsupported);
660  return IsTransposeSupported(infos[0],
661  infos[1],
662  *(PolymorphicDowncast<const TransposeDescriptor*>(&descriptor)),
663  reasonIfUnsupported);
665  {
666  if (infos.size() != 4)
667  {
668  throw InvalidArgumentException("Invalid number of TransposeConvolution2d TensorInfos. "
669  "TensorInfos should be of format: {input, output, weights, biases}.");
670  }
671 
672  auto desc = *(PolymorphicDowncast<const TransposeConvolution2dDescriptor*>(&descriptor));
673  if (infos[3] == TensorInfo())
674  {
675  return IsTransposeConvolution2dSupported(infos[0],
676  infos[1],
677  desc,
678  infos[2],
679  EmptyOptional(),
680  reasonIfUnsupported);
681  }
682  else
683  {
684  return IsTransposeConvolution2dSupported(infos[0],
685  infos[1],
686  desc,
687  infos[2],
688  infos[3],
689  reasonIfUnsupported);
690  }
691  }
694  infos[1],
695  infos[2],
696  infos[3],
697  infos[4],
698  infos[5],
699  *(PolymorphicDowncast<const
700  UnidirectionalSequenceLstmDescriptor*>(&descriptor)),
701  lstmParamsInfo.value(),
702  reasonIfUnsupported);
703  case LayerType::Unmap:
704  return true;
705  default:
706  // layers not supported in cl by default:
707  // debug, detectionpostprocess, fakequantization,
708  // precompiled, standin, switch, pooling3d, fused
709  return false;
710  }
711 }
#define ARMNN_NO_DEPRECATE_WARN_BEGIN
Definition: Deprecated.hpp:33
#define ARMNN_NO_DEPRECATE_WARN_END
Definition: Deprecated.hpp:34
bool IsMeanSupported(const TensorInfo &input, const TensorInfo &output, const MeanDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsMultiplicationSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
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()) const
bool IsConvolution2dSupported(const TensorInfo &input, const TensorInfo &output, const Convolution2dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsTransposeConvolution2dSupported(const TensorInfo &input, const TensorInfo &output, const TransposeConvolution2dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsTransposeSupported(const TensorInfo &input, const TensorInfo &output, const TransposeDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsStridedSliceSupported(const TensorInfo &input, const TensorInfo &output, const StridedSliceDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsBatchMatMulSupported(const TensorInfo &inputX, const TensorInfo &inputY, const TensorInfo &output, const BatchMatMulDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsDequantizeSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsTileSupported(const TensorInfo &input, const TensorInfo &output, const TileDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsSliceSupported(const TensorInfo &input, const TensorInfo &output, const SliceDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsArgMinMaxSupported(const TensorInfo &input, const TensorInfo &output, const ArgMinMaxDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsConstantSupported(const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsMaximumSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsOutputSupported(const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsCastSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsConvolution3dSupported(const TensorInfo &input, const TensorInfo &output, const Convolution3dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsPermuteSupported(const TensorInfo &input, const TensorInfo &output, const PermuteDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsPooling2dSupported(const TensorInfo &input, const TensorInfo &output, const Pooling2dDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsConvertFp32ToFp16Supported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsPadSupported(const TensorInfo &input, const TensorInfo &output, const PadDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsPooling3dSupported(const TensorInfo &input, const TensorInfo &output, const Pooling3dDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsMinimumSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsFullyConnectedSupported(const TensorInfo &input, const TensorInfo &output, const TensorInfo &weights, const TensorInfo &biases, const FullyConnectedDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsSubtractionSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsElementwiseUnarySupported(const TensorInfo &input, const TensorInfo &output, const ElementwiseUnaryDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsQuantizeSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsDepthToSpaceSupported(const TensorInfo &input, const TensorInfo &output, const DepthToSpaceDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsLogicalBinarySupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, const LogicalBinaryDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported) const
bool IsResizeSupported(const TensorInfo &input, const TensorInfo &output, const ResizeDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsUnidirectionalSequenceLstmSupported(const TensorInfo &input, const TensorInfo &outputStateIn, const TensorInfo &cellStateIn, const TensorInfo &outputStateOut, const TensorInfo &cellStateOut, const TensorInfo &output, const UnidirectionalSequenceLstmDescriptor &descriptor, const LstmInputParamsInfo &paramsInfo, Optional< std::string & > reasonIfUnsupported) const
bool IsDepthwiseConvolutionSupported(const TensorInfo &input, const TensorInfo &output, const DepthwiseConvolution2dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsInputSupported(const TensorInfo &input, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsActivationSupported(const TensorInfo &input, const TensorInfo &output, const ActivationDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsInstanceNormalizationSupported(const TensorInfo &input, const TensorInfo &output, const InstanceNormalizationDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsPreluSupported(const TensorInfo &input, const TensorInfo &alpha, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsSplitterSupported(const TensorInfo &input, const std::vector< std::reference_wrapper< TensorInfo >> &outputs, const ViewsDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsReduceSupported(const TensorInfo &input, const TensorInfo &output, const ReduceDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsDivisionSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
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()) const
bool IsConvertFp16ToFp32Supported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsConcatSupported(const std::vector< const TensorInfo * > inputs, const TensorInfo &output, const OriginsDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsSoftmaxSupported(const TensorInfo &input, const TensorInfo &output, const SoftmaxDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsSpaceToDepthSupported(const TensorInfo &input, const TensorInfo &output, const SpaceToDepthDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsStackSupported(const std::vector< const TensorInfo * > &inputs, const TensorInfo &output, const StackDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsComparisonSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &ouput, const ComparisonDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsChannelShuffleSupported(const TensorInfo &input, const TensorInfo &output, const ChannelShuffleDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsScatterNdSupported(const TensorInfo &input, const TensorInfo &indices, const TensorInfo &updates, const TensorInfo &output, const ScatterNdDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsFloorSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsL2NormalizationSupported(const TensorInfo &input, const TensorInfo &output, const L2NormalizationDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsGatherNdSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported) const
bool IsFillSupported(const TensorInfo &input, const TensorInfo &output, const FillDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
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()) const
bool IsGatherSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, const GatherDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported) const
bool IsReverseV2Supported(const TensorInfo &input, const TensorInfo &axis, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported) const
bool IsBatchToSpaceNdSupported(const TensorInfo &input, const TensorInfo &output, const BatchToSpaceNdDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsReshapeSupported(const TensorInfo &input, const TensorInfo &output, const ReshapeDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsSpaceToBatchNdSupported(const TensorInfo &input, const TensorInfo &output, const SpaceToBatchNdDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
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
bool IsNormalizationSupported(const TensorInfo &input, const TensorInfo &output, const NormalizationDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsAdditionSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsLogSoftmaxSupported(const TensorInfo &input, const TensorInfo &output, const LogSoftmaxDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsMemImportSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsMergeSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsShapeSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsMemCopySupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
arm_compute::Status ClElementwiseBinaryValidate(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, const ElementwiseBinaryDescriptor &descriptor, const ActivationDescriptor *activationDescriptor)
arm_compute::Status ClMaximumWorkloadValidate(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output)
arm_compute::Status ClMinimumWorkloadValidate(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output)
arm_compute::Status ClMultiplicationWorkloadValidate(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, const ActivationDescriptor *activationDescriptor)
DestType PolymorphicDowncast(SourceType *value)
Polymorphic downcast for build in pointers only.
arm_compute::Status ClFloorDivWorkloadValidate(const TensorInfo &input0Info, const TensorInfo &input1Info, const TensorInfo &outputInfo, const ActivationDescriptor *activationDescriptor)
LstmDescriptor UnidirectionalSequenceLstmDescriptor
arm_compute::Status ClSubtractionValidate(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, const ActivationDescriptor *activationDescriptor)

References armnn::Activation, armnn::Add, armnn::Addition, armnn::ArgMinMax, ARMNN_NO_DEPRECATE_WARN_BEGIN, ARMNN_NO_DEPRECATE_WARN_END, armnn::BatchMatMul, armnn::BatchNormalization, armnn::BatchToSpaceNd, armnn::Cast, armnn::ChannelShuffle, armnn::ClAdditionValidate(), armnn::ClDivisionWorkloadValidate(), armnn::ClElementwiseBinaryValidate(), armnn::ClFloorDivWorkloadValidate(), armnn::ClMaximumWorkloadValidate(), armnn::ClMinimumWorkloadValidate(), armnn::ClMultiplicationWorkloadValidate(), armnn::ClSubtractionValidate(), armnn::Comparison, armnn::Concat, armnn::Constant, armnn::ConvertFp16ToFp32, armnn::ConvertFp32ToFp16, armnn::Convolution2d, armnn::Convolution3d, armnn::DepthToSpace, armnn::DepthwiseConvolution2d, armnn::Dequantize, armnn::Div, armnn::Division, armnn::ElementwiseBinary, armnn::ElementwiseUnary, armnn::Fill, armnn::Floor, armnn::FloorDiv, FORWARD_WORKLOAD_VALIDATE_FUNC, armnn::FullyConnected, armnn::Gather, armnn::GatherNd, armnn::Input, armnn::InstanceNormalization, ClLayerSupport::IsActivationSupported(), ClLayerSupport::IsAdditionSupported(), ClLayerSupport::IsArgMinMaxSupported(), ClLayerSupport::IsBatchMatMulSupported(), ClLayerSupport::IsBatchNormalizationSupported(), ClLayerSupport::IsBatchToSpaceNdSupported(), ClLayerSupport::IsCastSupported(), ClLayerSupport::IsChannelShuffleSupported(), ClLayerSupport::IsComparisonSupported(), ClLayerSupport::IsConcatSupported(), ClLayerSupport::IsConstantSupported(), ClLayerSupport::IsConvertFp16ToFp32Supported(), ClLayerSupport::IsConvertFp32ToFp16Supported(), ClLayerSupport::IsConvolution2dSupported(), ClLayerSupport::IsConvolution3dSupported(), ClLayerSupport::IsDepthToSpaceSupported(), ClLayerSupport::IsDepthwiseConvolutionSupported(), ClLayerSupport::IsDequantizeSupported(), ClLayerSupport::IsDivisionSupported(), ClLayerSupport::IsElementwiseUnarySupported(), ClLayerSupport::IsFillSupported(), ClLayerSupport::IsFloorSupported(), ClLayerSupport::IsFullyConnectedSupported(), ClLayerSupport::IsGatherNdSupported(), ClLayerSupport::IsGatherSupported(), ClLayerSupport::IsInputSupported(), ClLayerSupport::IsInstanceNormalizationSupported(), ClLayerSupport::IsL2NormalizationSupported(), ClLayerSupport::IsLogicalBinarySupported(), ClLayerSupport::IsLogSoftmaxSupported(), ClLayerSupport::IsLstmSupported(), ClLayerSupport::IsMaximumSupported(), ClLayerSupport::IsMeanSupported(), LayerSupportBase::IsMemCopySupported(), LayerSupportBase::IsMemImportSupported(), LayerSupportBase::IsMergeSupported(), ClLayerSupport::IsMinimumSupported(), ClLayerSupport::IsMultiplicationSupported(), ClLayerSupport::IsNormalizationSupported(), ClLayerSupport::IsOutputSupported(), ClLayerSupport::IsPadSupported(), ClLayerSupport::IsPermuteSupported(), ClLayerSupport::IsPooling2dSupported(), ClLayerSupport::IsPooling3dSupported(), ClLayerSupport::IsPreluSupported(), ClLayerSupport::IsQLstmSupported(), ClLayerSupport::IsQuantizedLstmSupported(), ClLayerSupport::IsQuantizeSupported(), ClLayerSupport::IsReduceSupported(), ClLayerSupport::IsReshapeSupported(), ClLayerSupport::IsResizeSupported(), ClLayerSupport::IsReverseV2Supported(), ClLayerSupport::IsScatterNdSupported(), LayerSupportBase::IsShapeSupported(), ClLayerSupport::IsSliceSupported(), ClLayerSupport::IsSoftmaxSupported(), ClLayerSupport::IsSpaceToBatchNdSupported(), ClLayerSupport::IsSpaceToDepthSupported(), ClLayerSupport::IsSplitterSupported(), ClLayerSupport::IsStackSupported(), ClLayerSupport::IsStridedSliceSupported(), ClLayerSupport::IsSubtractionSupported(), ClLayerSupport::IsTileSupported(), ClLayerSupport::IsTransposeConvolution2dSupported(), ClLayerSupport::IsTransposeSupported(), ClLayerSupport::IsUnidirectionalSequenceLstmSupported(), armnn::L2Normalization, armnn::LogicalBinary, armnn::LogSoftmax, armnn::Lstm, armnn::Map, armnn::Maximum, armnn::Mean, armnn::MemCopy, armnn::MemImport, armnn::Merge, armnn::Minimum, armnn::Mul, armnn::Multiplication, armnn::Normalization, armnn::Output, armnn::Pad, armnn::Permute, armnn::PolymorphicDowncast(), armnn::Pooling2d, armnn::Pooling3d, armnn::Power, armnn::Prelu, armnn::QLstm, armnn::Quantize, armnn::QuantizedLstm, armnn::Rank, armnn::Reduce, armnn::Reshape, armnn::Resize, armnn::ReverseV2, armnn::ScatterNd, armnn::Shape, armnn::Slice, armnn::Softmax, armnn::SpaceToBatchNd, armnn::SpaceToDepth, armnn::Splitter, armnn::SqDiff, armnn::Stack, armnn::StridedSlice, armnn::Sub, armnn::Subtraction, armnn::Tile, armnn::Transpose, armnn::TransposeConvolution2d, armnn::UnidirectionalSequenceLstm, armnn::Unmap, and OptionalReferenceSwitch< IsReference, T >::value().

◆ IsLogicalBinarySupported()

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

Definition at line 1187 of file ClLayerSupport.cpp.

1192 {
1193  IgnoreUnused(output);
1194 
1195  switch(descriptor.m_Operation)
1196  {
1199  reasonIfUnsupported,
1200  input0,
1201  input1,
1202  output);
1205  reasonIfUnsupported,
1206  input0,
1207  input1,
1208  output);
1209  default:
1210  return false;
1211  }
1212 }
arm_compute::Status ClLogicalAndWorkloadValidate(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output)
arm_compute::Status ClLogicalOrWorkloadValidate(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output)

References armnn::ClLogicalAndWorkloadValidate(), armnn::ClLogicalOrWorkloadValidate(), FORWARD_WORKLOAD_VALIDATE_FUNC, armnn::IgnoreUnused(), armnn::LogicalAnd, armnn::LogicalOr, and LogicalBinaryDescriptor::m_Operation.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsLogSoftmaxSupported()

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

Definition at line 1215 of file ClLayerSupport.cpp.

1219 {
1221  reasonIfUnsupported,
1222  input,
1223  output,
1224  descriptor);
1225 }
arm_compute::Status ClLogSoftmaxWorkloadValidate(const TensorInfo &input, const TensorInfo &output, const LogSoftmaxDescriptor &descriptor)

References armnn::ClLogSoftmaxWorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

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

Definition at line 1227 of file ClLayerSupport.cpp.

1237 {
1239  reasonIfUnsupported,
1240  input,
1241  outputStateIn,
1242  cellStateIn,
1243  scratchBuffer,
1244  outputStateOut,
1245  cellStateOut,
1246  output,
1247  descriptor,
1248  paramsInfo);
1249 }
arm_compute::Status ClLstmFloatWorkloadValidate(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)

References armnn::ClLstmFloatWorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsMaximumSupported()

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

Definition at line 1251 of file ClLayerSupport.cpp.

1255 {
1257  reasonIfUnsupported,
1258  input0,
1259  input1,
1260  output);
1261 }

References armnn::ClMaximumWorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsMeanSupported()

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

Definition at line 1263 of file ClLayerSupport.cpp.

1267 {
1269  reasonIfUnsupported,
1270  input,
1271  output,
1272  descriptor);
1273 }
arm_compute::Status ClMeanValidate(const TensorInfo &input, const TensorInfo &output, const MeanDescriptor &descriptor)

References armnn::ClMeanValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsMinimumSupported()

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

Definition at line 1275 of file ClLayerSupport.cpp.

1279 {
1281  reasonIfUnsupported,
1282  input0,
1283  input1,
1284  output);
1285 }

References armnn::ClMinimumWorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsMultiplicationSupported()

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

Definition at line 1287 of file ClLayerSupport.cpp.

1291 {
1293  reasonIfUnsupported,
1294  input0,
1295  input1,
1296  output,
1297  nullptr);
1298 }

References armnn::ClMultiplicationWorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsNormalizationSupported()

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

Definition at line 1300 of file ClLayerSupport.cpp.

1304 {
1305  FORWARD_WORKLOAD_VALIDATE_FUNC(ClNormalizationWorkloadValidate, reasonIfUnsupported, input, output, descriptor);
1306 }
arm_compute::Status ClNormalizationWorkloadValidate(const TensorInfo &input, const TensorInfo &output, const NormalizationDescriptor &descriptor)

References armnn::ClNormalizationWorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsOutputSupported()

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

Definition at line 1308 of file ClLayerSupport.cpp.

1310 {
1311  return IsClBackendSupported(reasonIfUnsupported, output);
1312 }

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsPadSupported()

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

Definition at line 1314 of file ClLayerSupport.cpp.

1318 {
1320  reasonIfUnsupported,
1321  input,
1322  output,
1323  descriptor);
1324 }
arm_compute::Status ClPadValidate(const TensorInfo &input, const TensorInfo &output, const PadDescriptor &descriptor)

References armnn::ClPadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsPermuteSupported()

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

Definition at line 1326 of file ClLayerSupport.cpp.

1330 {
1331  FORWARD_WORKLOAD_VALIDATE_FUNC(ClPermuteWorkloadValidate, reasonIfUnsupported, input, output, descriptor);
1332 }
arm_compute::Status ClPermuteWorkloadValidate(const TensorInfo &input, const TensorInfo &output, const PermuteDescriptor &descriptor)

References armnn::ClPermuteWorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsPooling2dSupported()

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

Definition at line 1334 of file ClLayerSupport.cpp.

1338 {
1339  FORWARD_WORKLOAD_VALIDATE_FUNC(ClPooling2dWorkloadValidate, reasonIfUnsupported, input, output, descriptor);
1340 }
arm_compute::Status ClPooling2dWorkloadValidate(const TensorInfo &input, const TensorInfo &output, const Pooling2dDescriptor &descriptor)

References armnn::ClPooling2dWorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsPooling3dSupported()

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

Definition at line 1342 of file ClLayerSupport.cpp.

1346 {
1347  FORWARD_WORKLOAD_VALIDATE_FUNC(ClPooling3dWorkloadValidate, reasonIfUnsupported, input, output, descriptor);
1348 }
arm_compute::Status ClPooling3dWorkloadValidate(const TensorInfo &input, const TensorInfo &output, const Pooling3dDescriptor &descriptor)

References armnn::ClPooling3dWorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsPreluSupported()

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

Definition at line 1350 of file ClLayerSupport.cpp.

1354 {
1355  FORWARD_WORKLOAD_VALIDATE_FUNC(ClPreluWorkloadValidate, reasonIfUnsupported, input, alpha, output);
1356 }
arm_compute::Status ClPreluWorkloadValidate(const TensorInfo &input, const TensorInfo &alpha, const TensorInfo &output)

References armnn::ClPreluWorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

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

Definition at line 1358 of file ClLayerSupport.cpp.

1367 {
1368  if (input.GetDataType() == armnn::DataType::QAsymmS8 &&
1369  previousOutputIn.GetDataType() == armnn::DataType::QAsymmS8 &&
1370  previousCellStateIn.GetDataType() == armnn::DataType::QSymmS16 &&
1371  outputStateOut.GetDataType() == armnn::DataType::QAsymmS8 &&
1372  cellStateOut.GetDataType() == armnn::DataType::QSymmS16 &&
1373  output.GetDataType() == armnn::DataType::QAsymmS8)
1374  {
1376  reasonIfUnsupported,
1377  input,
1378  previousCellStateIn,
1379  previousOutputIn,
1380  cellStateOut,
1381  outputStateOut,
1382  output,
1383  descriptor,
1384  paramsInfo);
1385  }
1386  else
1387  {
1388  return false;
1389  }
1390 }
arm_compute::Status ClQLstmWorkloadValidate(const TensorInfo &input, const TensorInfo &cellStateIn, const TensorInfo &outputStateIn, const TensorInfo &cellStateOut, const TensorInfo &outputStateOut, const TensorInfo &output, const QLstmDescriptor &descriptor, const LstmInputParamsInfo &paramsInfo)

References armnn::ClQLstmWorkloadValidate(), FORWARD_WORKLOAD_VALIDATE_FUNC, TensorInfo::GetDataType(), armnn::QAsymmS8, and armnn::QSymmS16.

Referenced by ClLayerSupport::IsLayerSupported().

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

Definition at line 1392 of file ClLayerSupport.cpp.

1399 {
1401  reasonIfUnsupported,
1402  input,
1403  previousCellStateIn,
1404  previousOutputIn,
1405  cellStateOut,
1406  output,
1407  paramsInfo);
1408 }
arm_compute::Status ClQuantizedLstmWorkloadValidate(const TensorInfo &input, const TensorInfo &previousCellStateIn, const TensorInfo &previousOutputIn, const TensorInfo &cellStateOut, const TensorInfo &output, const QuantizedLstmInputParamsInfo &paramsInfo)

References armnn::ClQuantizedLstmWorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsQuantizeSupported()

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

Definition at line 1410 of file ClLayerSupport.cpp.

1413 {
1415  reasonIfUnsupported,
1416  input,
1417  output);
1418 }
arm_compute::Status ClQuantizeWorkloadValidate(const TensorInfo &input, const TensorInfo &output)

References armnn::ClQuantizeWorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsReduceSupported()

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

Definition at line 1420 of file ClLayerSupport.cpp.

1424 {
1426  reasonIfUnsupported,
1427  input,
1428  output,
1429  descriptor);
1430 }
arm_compute::Status ClReduceWorkloadValidate(const TensorInfo &input, const TensorInfo &output, const ReduceDescriptor &descriptor)

References armnn::ClReduceWorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsReshapeSupported()

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

Definition at line 1432 of file ClLayerSupport.cpp.

1436 {
1437  IgnoreUnused(descriptor);
1438  FORWARD_WORKLOAD_VALIDATE_FUNC(ClReshapeWorkloadValidate, reasonIfUnsupported, input, output);
1439 }
arm_compute::Status ClReshapeWorkloadValidate(const TensorInfo &input, const TensorInfo &output)

References armnn::ClReshapeWorkloadValidate(), FORWARD_WORKLOAD_VALIDATE_FUNC, and armnn::IgnoreUnused().

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsResizeSupported()

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

Definition at line 1441 of file ClLayerSupport.cpp.

1445 {
1446  FORWARD_WORKLOAD_VALIDATE_FUNC(ClResizeWorkloadValidate, reasonIfUnsupported, input, output, descriptor);
1447 }
arm_compute::Status ClResizeWorkloadValidate(const TensorInfo &input, const TensorInfo &output, const ResizeDescriptor &descriptor)

References armnn::ClResizeWorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsReverseV2Supported()

bool IsReverseV2Supported ( const TensorInfo input,
const TensorInfo axis,
const TensorInfo output,
Optional< std::string & >  reasonIfUnsupported 
) const

Definition at line 1449 of file ClLayerSupport.cpp.

1453 {
1455  reasonIfUnsupported,
1456  input,
1457  axis,
1458  output);
1459 }
arm_compute::Status ClReverseV2WorkloadValidate(const TensorInfo &input, const TensorInfo &axis, const TensorInfo &output)

References armnn::ClReverseV2WorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsScatterNdSupported()

bool IsScatterNdSupported ( const TensorInfo input,
const TensorInfo indices,
const TensorInfo updates,
const TensorInfo output,
const ScatterNdDescriptor descriptor,
Optional< std::string & >  reasonIfUnsupported = EmptyOptional() 
) const

Definition at line 1461 of file ClLayerSupport.cpp.

1467 {
1469  reasonIfUnsupported,
1470  input,
1471  indices,
1472  updates,
1473  output,
1474  descriptor);
1475 }
arm_compute::Status ClScatterNdWorkloadValidate(const TensorInfo &inputInfo, const TensorInfo &indicesInfo, const TensorInfo &updatesInfo, const TensorInfo &outputInfo, const ScatterNdDescriptor &descriptor)

References armnn::ClScatterNdWorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsSliceSupported()

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

Definition at line 1477 of file ClLayerSupport.cpp.

1481 {
1482  FORWARD_WORKLOAD_VALIDATE_FUNC(ClSliceWorkloadValidate, reasonIfUnsupported, input, output, descriptor);
1483 }
arm_compute::Status ClSliceWorkloadValidate(const TensorInfo &input, const TensorInfo &output, const SliceDescriptor &descriptor)

References armnn::ClSliceWorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsSoftmaxSupported()

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

Definition at line 1485 of file ClLayerSupport.cpp.

1489 {
1490  FORWARD_WORKLOAD_VALIDATE_FUNC(ClSoftmaxWorkloadValidate, reasonIfUnsupported, input, output, descriptor);
1491 }
arm_compute::Status ClSoftmaxWorkloadValidate(const TensorInfo &input, const TensorInfo &output, const SoftmaxDescriptor &descriptor)

References armnn::ClSoftmaxWorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsSpaceToBatchNdSupported()

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

Definition at line 1493 of file ClLayerSupport.cpp.

1497 {
1499  reasonIfUnsupported,
1500  input,
1501  output,
1502  descriptor);
1503 }
arm_compute::Status ClSpaceToBatchNdWorkloadValidate(const TensorInfo &input, const TensorInfo &output, const SpaceToBatchNdDescriptor &descriptor)

References armnn::ClSpaceToBatchNdWorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsSpaceToDepthSupported()

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

Definition at line 1505 of file ClLayerSupport.cpp.

1509 {
1511  reasonIfUnsupported,
1512  input,
1513  output,
1514  descriptor);
1515 }
arm_compute::Status ClSpaceToDepthWorkloadValidate(const TensorInfo &input, const TensorInfo &output, const SpaceToDepthDescriptor &descriptor)

References armnn::ClSpaceToDepthWorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsSplitterSupported()

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

Definition at line 1517 of file ClLayerSupport.cpp.

1521 {
1522 #if defined(ARMCOMPUTECL_ENABLED)
1523  // Split along the last dimension, cannot use sub-tensors
1524  // as width and height of the sub-tensors do not match
1525  // the width and height of the parent tensor
1526  // in case of input with more than 2D.
1527  std::set<unsigned int> splitAxis = ComputeSplitAxis(descriptor, input.GetShape());
1528  if (descriptor.GetNumDimensions() > 2 && splitAxis.size() == 1 &&
1529  *splitAxis.begin() == descriptor.GetNumDimensions() - 1 )
1530  {
1532  reasonIfUnsupported,
1533  input,
1534  outputs,
1535  *splitAxis.begin());
1536  }
1537 #endif
1538  IgnoreUnused(descriptor);
1539  for (auto output : outputs)
1540  {
1541  if (!input.IsTypeSpaceMatch(output)) // Cannot use sub-tensors if the types are not same space
1542  {
1543  SetValueChecked(reasonIfUnsupported, "Cl Splitter: Types and quantization parameters must match.");
1544  return false;
1545  }
1546  }
1547  return true;
1548 }
std::set< unsigned int > ComputeSplitAxis(const armnn::SplitterDescriptor &desc, const TensorShape &input)
Calculates the axis values for split operation.
arm_compute::Status ClSplitterWorkloadValidate(const TensorInfo &input, const std::vector< std::reference_wrapper< TensorInfo >> &outputs, unsigned int splitAxis)

References armnn::ClSplitterWorkloadValidate(), armnn::ComputeSplitAxis(), FORWARD_WORKLOAD_VALIDATE_FUNC, ViewsDescriptor::GetNumDimensions(), TensorInfo::GetShape(), armnn::IgnoreUnused(), TensorInfo::IsTypeSpaceMatch(), and armnn::SetValueChecked().

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsStackSupported()

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

Definition at line 1550 of file ClLayerSupport.cpp.

1554 {
1556  reasonIfUnsupported,
1557  inputs,
1558  output,
1559  descriptor);
1560 }
arm_compute::Status ClStackWorkloadValidate(const std::vector< const TensorInfo * > &inputs, const TensorInfo &output, const StackDescriptor &descriptor)

References armnn::ClStackWorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsStridedSliceSupported()

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

Definition at line 1562 of file ClLayerSupport.cpp.

1566 {
1568  reasonIfUnsupported,
1569  input,
1570  output,
1571  descriptor);
1572 }
arm_compute::Status ClStridedSliceWorkloadValidate(const TensorInfo &input, const TensorInfo &output, const StridedSliceDescriptor &descriptor)

References armnn::ClStridedSliceWorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsSubtractionSupported()

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

Definition at line 1574 of file ClLayerSupport.cpp.

1578 {
1580  reasonIfUnsupported,
1581  input0,
1582  input1,
1583  output,
1584  nullptr);
1585 }

References armnn::ClSubtractionValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsTileSupported()

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

Definition at line 1587 of file ClLayerSupport.cpp.

1591 {
1593  reasonIfUnsupported,
1594  input,
1595  output,
1596  descriptor);
1597 }
arm_compute::Status ClTileWorkloadValidate(const TensorInfo &input, const TensorInfo &output, const TileDescriptor &descriptor)

References armnn::ClTileWorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsTransposeConvolution2dSupported()

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

Definition at line 1599 of file ClLayerSupport.cpp.

1605 {
1607  reasonIfUnsupported,
1608  input,
1609  output,
1610  descriptor,
1611  weights,
1612  biases);
1613 }
arm_compute::Status ClTransposeConvolution2dWorkloadValidate(const TensorInfo &input, const TensorInfo &output, const TransposeConvolution2dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases)

References armnn::ClTransposeConvolution2dWorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsTransposeSupported()

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

Definition at line 1615 of file ClLayerSupport.cpp.

1619 {
1620  FORWARD_WORKLOAD_VALIDATE_FUNC(ClTransposeWorkloadValidate, reasonIfUnsupported, input, output, descriptor);
1621 }
arm_compute::Status ClTransposeWorkloadValidate(const TensorInfo &input, const TensorInfo &output, const TransposeDescriptor &descriptor)

References armnn::ClTransposeWorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().

◆ IsUnidirectionalSequenceLstmSupported()

bool IsUnidirectionalSequenceLstmSupported ( const TensorInfo input,
const TensorInfo outputStateIn,
const TensorInfo cellStateIn,
const TensorInfo outputStateOut,
const TensorInfo cellStateOut,
const TensorInfo output,
const UnidirectionalSequenceLstmDescriptor descriptor,
const LstmInputParamsInfo paramsInfo,
Optional< std::string & >  reasonIfUnsupported 
) const

Definition at line 1623 of file ClLayerSupport.cpp.

1632 {
1634  reasonIfUnsupported,
1635  input,
1636  outputStateIn,
1637  cellStateIn,
1638  outputStateOut,
1639  cellStateOut,
1640  output,
1641  descriptor,
1642  paramsInfo);
1643 }
arm_compute::Status ClUnidirectionalSequenceLstmFloatWorkloadValidate(const TensorInfo &input, const TensorInfo &outputStateIn, const TensorInfo &cellStateIn, const TensorInfo &outputStateOut, const TensorInfo &cellStateOut, const TensorInfo &output, const UnidirectionalSequenceLstmDescriptor &descriptor, const LstmInputParamsInfo &paramsInfo)

References armnn::ClUnidirectionalSequenceLstmFloatWorkloadValidate(), and FORWARD_WORKLOAD_VALIDATE_FUNC.

Referenced by ClLayerSupport::IsLayerSupported().


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