ArmNN
 24.02
Convolution3dQueueDescriptor Struct Reference

#include <WorkloadData.hpp>

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

Public Member Functions

void Validate (const WorkloadInfo &workloadInfo) const
 
- Public Member Functions inherited from QueueDescriptorWithParameters< Convolution3dDescriptor >
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
 

Additional Inherited Members

- Public Attributes inherited from QueueDescriptorWithParameters< Convolution3dDescriptor >
Convolution3dDescriptor m_Parameters
 
- Public Attributes inherited from QueueDescriptor
std::vector< ITensorHandle * > m_Inputs
 
std::vector< ITensorHandle * > m_Outputs
 
void * m_AdditionalInfoObject
 
bool m_AllowExpandedDims = false
 
- Protected Member Functions inherited from QueueDescriptorWithParameters< Convolution3dDescriptor >
 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 216 of file WorkloadData.hpp.

Member Function Documentation

◆ Validate()

void Validate ( const WorkloadInfo workloadInfo) const

Definition at line 1326 of file WorkloadData.cpp.

1327 {
1328  const std::string descriptorName{"Convolution3dQueueDescriptor"};
1329 
1330  uint32_t numInputs = 2;
1332  {
1333  numInputs = 3;
1334  }
1335  ValidateNumInputs(workloadInfo, descriptorName, numInputs);
1336  ValidateNumOutputs(workloadInfo, descriptorName, 1);
1337 
1338  const TensorInfo& inputTensorInfo = workloadInfo.m_InputTensorInfos[0];
1339  const TensorInfo& outputTensorInfo = workloadInfo.m_OutputTensorInfos[0];
1340 
1341  ValidateTensorNumDimensions(inputTensorInfo, descriptorName, 5, "input");
1342  ValidateTensorNumDimensions(outputTensorInfo, descriptorName, 5, "output");
1343 
1344  const TensorInfo& weightTensorInfo = workloadInfo.m_InputTensorInfos[1];
1345  ValidateTensorNumDimensions(weightTensorInfo, descriptorName, 5, "weight");
1346 
1347  ValidateWeightDataType(inputTensorInfo, weightTensorInfo, descriptorName);
1348 
1349  Optional<TensorInfo> optionalBiasTensorInfo;
1351  {
1352  optionalBiasTensorInfo = MakeOptional<TensorInfo>(workloadInfo.m_InputTensorInfos[2]);
1353  const TensorInfo& biasTensorInfo = optionalBiasTensorInfo.value();
1354 
1355  ValidateTensorDataType(biasTensorInfo, GetBiasDataType(inputTensorInfo.GetDataType()), descriptorName, "bias");
1356  ValidateBiasTensorQuantization(biasTensorInfo, weightTensorInfo, descriptorName);
1357  }
1358 
1360  {
1362  fmt::format("{}: strideX (provided {}), strideY (provided {}) or strideZ (provided {})"
1363  "cannot be either negative or 0.",
1365  }
1366 
1367  ValidatePerAxisQuantization(inputTensorInfo,
1368  outputTensorInfo,
1369  weightTensorInfo,
1370  optionalBiasTensorInfo,
1371  descriptorName);
1372 
1373  std::vector<DataType> supportedTypes =
1374  {
1382  };
1383 
1384  ValidateDataTypes(inputTensorInfo, supportedTypes, descriptorName);
1385  ValidateTensorDataTypesMatch(inputTensorInfo, outputTensorInfo, descriptorName, "input", "output");
1386 }

References armnn::BFloat16, armnn::Float16, armnn::Float32, armnn::GetBiasDataType(), TensorInfo::GetDataType(), Convolution3dDescriptor::m_BiasEnabled, WorkloadInfo::m_InputTensorInfos, WorkloadInfo::m_OutputTensorInfos, QueueDescriptorWithParameters< Convolution3dDescriptor >::m_Parameters, Convolution3dDescriptor::m_StrideX, Convolution3dDescriptor::m_StrideY, Convolution3dDescriptor::m_StrideZ, armnn::QAsymmS8, armnn::QAsymmU8, armnn::QSymmS16, armnn::QSymmS8, QueueDescriptor::ValidateTensorNumDimensions(), and OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().


The documentation for this struct was generated from the following files:
armnn::Optional
Definition: Optional.hpp:270
armnn::TensorInfo
Definition: Tensor.hpp:152
armnn::DataType::Float32
@ Float32
armnn::DataType::QAsymmU8
@ QAsymmU8
armnn::DataType::QSymmS8
@ QSymmS8
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< Convolution3dDescriptor >::m_Parameters
Convolution3dDescriptor m_Parameters
Definition: WorkloadData.hpp:66
armnn::InvalidArgumentException
Definition: Exceptions.hpp:80
armnn::Convolution3dDescriptor::m_StrideY
uint32_t m_StrideY
Stride value when proceeding through input for the height dimension.
Definition: Descriptors.hpp:643
armnn::Convolution3dDescriptor::m_StrideX
uint32_t m_StrideX
Stride value when proceeding through input for the width dimension.
Definition: Descriptors.hpp:641
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::Convolution3dDescriptor::m_BiasEnabled
bool m_BiasEnabled
Enable/disable bias.
Definition: Descriptors.hpp:653
armnn::Convolution3dDescriptor::m_StrideZ
uint32_t m_StrideZ
Stride value when proceeding through input for the depth dimension.
Definition: Descriptors.hpp:645
armnn::OptionalReferenceSwitch< std::is_reference< T >::value, T >::value
const T & value() const
Definition: Optional.hpp:146