ArmNN
 24.08
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 1329 of file WorkloadData.cpp.

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

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:398
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