ArmNN
 24.02
TransposeConvolution2dQueueDescriptor Struct Reference

#include <WorkloadData.hpp>

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

Public Member Functions

 TransposeConvolution2dQueueDescriptor ()
 
void Validate (const WorkloadInfo &workloadInfo) const
 
- Public Member Functions inherited from QueueDescriptorWithParameters< TransposeConvolution2dDescriptor >
virtual ~QueueDescriptorWithParameters ()=default
 
- Public Member Functions inherited from QueueDescriptor
virtual ~QueueDescriptor ()=default
 
void ValidateTensorNumDimensions (const TensorInfo &tensor, std::string const &descName, unsigned int numDimensions, std::string const &tensorName) const
 
void ValidateTensorNumDimNumElem (const TensorInfo &tensorInfo, unsigned int numDimension, unsigned int numElements, std::string const &tensorName) const
 
void ValidateInputsOutputs (const std::string &descName, unsigned int numExpectedIn, unsigned int numExpectedOut) const
 
template<typename T >
const T * GetAdditionalInformation () const
 

Public Attributes

const ConstTensorHandlem_Weight
 
const ConstTensorHandlem_Bias
 
- Public Attributes inherited from QueueDescriptorWithParameters< TransposeConvolution2dDescriptor >
TransposeConvolution2dDescriptor m_Parameters
 
- Public Attributes inherited from QueueDescriptor
std::vector< ITensorHandle * > m_Inputs
 
std::vector< ITensorHandle * > m_Outputs
 
void * m_AdditionalInfoObject
 
bool m_AllowExpandedDims = false
 

Additional Inherited Members

- Protected Member Functions inherited from QueueDescriptorWithParameters< TransposeConvolution2dDescriptor >
 QueueDescriptorWithParameters ()=default
 
 QueueDescriptorWithParameters (QueueDescriptorWithParameters const &)=default
 
QueueDescriptorWithParametersoperator= (QueueDescriptorWithParameters const &)=default
 
- Protected Member Functions inherited from QueueDescriptor
 QueueDescriptor ()
 
 QueueDescriptor (QueueDescriptor const &)=default
 
QueueDescriptoroperator= (QueueDescriptor const &)=default
 

Detailed Description

Definition at line 544 of file WorkloadData.hpp.

Constructor & Destructor Documentation

◆ TransposeConvolution2dQueueDescriptor()

Definition at line 546 of file WorkloadData.hpp.

546  :
547  m_Weight(nullptr),
548  m_Bias(nullptr)
549  {}

Member Function Documentation

◆ Validate()

void Validate ( const WorkloadInfo workloadInfo) const

Definition at line 3052 of file WorkloadData.cpp.

3053 {
3054  const std::string descriptorName{"TransposeConvolution2dQueueDescriptor"};
3055 
3056  ValidateNumInputs(workloadInfo, descriptorName, 1);
3057  ValidateNumOutputs(workloadInfo, descriptorName, 1);
3058 
3059  const TensorInfo& inputTensorInfo = workloadInfo.m_InputTensorInfos[0];
3060  const TensorInfo& outputTensorInfo = workloadInfo.m_OutputTensorInfos[0];
3061 
3062  ValidateTensorNumDimensions(inputTensorInfo, descriptorName, 4, "input");
3063  ValidateTensorNumDimensions(outputTensorInfo, descriptorName, 4, "output");
3064 
3065  ValidatePointer(m_Weight, descriptorName, "weight");
3066 
3067  const TensorInfo& weightTensorInfo = m_Weight->GetTensorInfo();
3068  ValidateTensorNumDimensions(weightTensorInfo, descriptorName, 4, "weight");
3069 
3070  ValidateWeightDataType(inputTensorInfo, weightTensorInfo, descriptorName);
3071 
3072  Optional<TensorInfo> optionalBiasTensorInfo;
3074  {
3075  ValidatePointer(m_Bias, descriptorName, "bias");
3076 
3077  optionalBiasTensorInfo = MakeOptional<TensorInfo>(m_Bias->GetTensorInfo());
3078  const TensorInfo& biasTensorInfo = optionalBiasTensorInfo.value();
3079 
3080  ValidateTensorDataType(biasTensorInfo, GetBiasDataType(inputTensorInfo.GetDataType()), descriptorName, "bias");
3081  ValidateBiasTensorQuantization(biasTensorInfo, weightTensorInfo, descriptorName);
3082  }
3083 
3084  ValidatePerAxisQuantization(inputTensorInfo,
3085  outputTensorInfo,
3086  weightTensorInfo,
3087  optionalBiasTensorInfo,
3088  descriptorName);
3089 
3090  std::vector<DataType> supportedTypes =
3091  {
3098  };
3099 
3100  ValidateDataTypes(inputTensorInfo, supportedTypes, descriptorName);
3101  ValidateTensorDataTypesMatch(inputTensorInfo, outputTensorInfo, descriptorName, "input", "output");
3102 }

References armnn::BFloat16, armnn::Float16, armnn::Float32, armnn::GetBiasDataType(), TensorInfo::GetDataType(), ConstTensorHandle::GetTensorInfo(), TransposeConvolution2dQueueDescriptor::m_Bias, TransposeConvolution2dDescriptor::m_BiasEnabled, WorkloadInfo::m_InputTensorInfos, WorkloadInfo::m_OutputTensorInfos, QueueDescriptorWithParameters< TransposeConvolution2dDescriptor >::m_Parameters, TransposeConvolution2dQueueDescriptor::m_Weight, armnn::QAsymmS8, armnn::QAsymmU8, armnn::QSymmS16, QueueDescriptor::ValidateTensorNumDimensions(), and OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().

Member Data Documentation

◆ m_Bias

◆ m_Weight


The documentation for this struct was generated from the following files:
armnn::Optional
Definition: Optional.hpp:270
armnn::TensorInfo
Definition: Tensor.hpp:152
armnn::TransposeConvolution2dQueueDescriptor::m_Weight
const ConstTensorHandle * m_Weight
Definition: WorkloadData.hpp:551
armnn::DataType::Float32
@ Float32
armnn::DataType::QAsymmU8
@ QAsymmU8
armnn::ConstTensorHandle::GetTensorInfo
const TensorInfo & GetTensorInfo() const
Definition: TensorHandle.hpp:40
armnn::DataType::QSymmS16
@ QSymmS16
armnn::DataType::BFloat16
@ BFloat16
armnn::DataType::Float16
@ Float16
armnn::WorkloadInfo::m_OutputTensorInfos
std::vector< TensorInfo > m_OutputTensorInfos
Definition: WorkloadInfo.hpp:19
armnn::QueueDescriptorWithParameters< TransposeConvolution2dDescriptor >::m_Parameters
TransposeConvolution2dDescriptor m_Parameters
Definition: WorkloadData.hpp:66
armnn::TransposeConvolution2dQueueDescriptor::m_Bias
const ConstTensorHandle * m_Bias
Definition: WorkloadData.hpp:552
armnn::TensorInfo::GetDataType
DataType GetDataType() const
Definition: Tensor.hpp:200
armnn::DataType::QAsymmS8
@ QAsymmS8
armnn::GetBiasDataType
DataType GetBiasDataType(DataType inputDataType)
Definition: WorkloadData.cpp:28
armnn::WorkloadInfo::m_InputTensorInfos
std::vector< TensorInfo > m_InputTensorInfos
Definition: WorkloadInfo.hpp:18
armnn::QueueDescriptor::ValidateTensorNumDimensions
void ValidateTensorNumDimensions(const TensorInfo &tensor, std::string const &descName, unsigned int numDimensions, std::string const &tensorName) const
Definition: WorkloadData.cpp:397
armnn::TransposeConvolution2dDescriptor::m_BiasEnabled
bool m_BiasEnabled
Enable/disable bias.
Definition: Descriptors.hpp:1481
armnn::OptionalReferenceSwitch< std::is_reference< T >::value, T >::value
const T & value() const
Definition: Optional.hpp:146