ArmNN
 24.02
BatchNormalizationQueueDescriptor Struct Reference

#include <WorkloadData.hpp>

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

Public Member Functions

 BatchNormalizationQueueDescriptor ()
 
void Validate (const WorkloadInfo &workloadInfo) const
 
- Public Member Functions inherited from QueueDescriptorWithParameters< BatchNormalizationDescriptor >
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_Mean
 
const ConstTensorHandlem_Variance
 
const ConstTensorHandlem_Beta
 
const ConstTensorHandlem_Gamma
 
- Public Attributes inherited from QueueDescriptorWithParameters< BatchNormalizationDescriptor >
BatchNormalizationDescriptor 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< BatchNormalizationDescriptor >
 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 311 of file WorkloadData.hpp.

Constructor & Destructor Documentation

◆ BatchNormalizationQueueDescriptor()

Definition at line 313 of file WorkloadData.hpp.

314  : m_Mean(nullptr)
315  , m_Variance(nullptr)
316  , m_Beta(nullptr)
317  , m_Gamma(nullptr)
318  {
319  }

Member Function Documentation

◆ Validate()

void Validate ( const WorkloadInfo workloadInfo) const

Definition at line 1203 of file WorkloadData.cpp.

1204 {
1205  const std::string descriptorName{"BatchNormalizationQueueDescriptor"};
1206 
1207  ValidateNumInputs(workloadInfo, descriptorName, 1);
1208  ValidateNumOutputs(workloadInfo, descriptorName, 1);
1209 
1210  const TensorInfo& inputTensorInfo = workloadInfo.m_InputTensorInfos[0];
1211  const TensorInfo& outputTensorInfo = workloadInfo.m_OutputTensorInfos[0];
1212 
1213  std::vector<DataType> supportedTypes =
1214  {
1221  };
1222 
1223  ValidateDataTypes(inputTensorInfo, supportedTypes, descriptorName);
1224  ValidateDataTypes(outputTensorInfo, supportedTypes, descriptorName);
1225 
1226  ValidateTensorDataTypesMatch(inputTensorInfo, outputTensorInfo, descriptorName, "input", "output");
1227  ValidateTensorShapesMatch(inputTensorInfo, outputTensorInfo, descriptorName, "input", "output");
1228 
1229  ValidatePointer(m_Mean, descriptorName, "mean");
1230  ValidatePointer(m_Variance, descriptorName, "variance");
1231  ValidatePointer(m_Beta, descriptorName, "beta");
1232  ValidatePointer(m_Gamma, descriptorName, "gamma");
1233 
1234  const TensorInfo& mean = m_Mean->GetTensorInfo();
1235  const TensorInfo& variance = m_Variance->GetTensorInfo();
1236  const TensorInfo& beta = m_Beta->GetTensorInfo();
1237  const TensorInfo& gamma = m_Gamma->GetTensorInfo();
1238 
1239  ValidateTensorNumDimensions(mean, descriptorName, 1, "mean");
1240  ValidateTensorNumDimensions(variance, descriptorName, 1, "variance");
1241  ValidateTensorNumDimensions(beta, descriptorName, 1, "beta");
1242  ValidateTensorNumDimensions(gamma, descriptorName, 1, "gamma");
1243 
1244  ValidateTensorShapesMatch(mean, variance, descriptorName, "mean", "variance");
1245  ValidateTensorShapesMatch(mean, beta, descriptorName, "mean", "beta");
1246  ValidateTensorShapesMatch(mean, gamma, descriptorName, "mean", "gamma");
1247 }

References armnn::BFloat16, armnn::Float16, armnn::Float32, ConstTensorHandle::GetTensorInfo(), BatchNormalizationQueueDescriptor::m_Beta, BatchNormalizationQueueDescriptor::m_Gamma, WorkloadInfo::m_InputTensorInfos, BatchNormalizationQueueDescriptor::m_Mean, WorkloadInfo::m_OutputTensorInfos, BatchNormalizationQueueDescriptor::m_Variance, armnn::QAsymmS8, armnn::QAsymmU8, armnn::QSymmS16, and QueueDescriptor::ValidateTensorNumDimensions().

Member Data Documentation

◆ m_Beta

◆ m_Gamma

◆ m_Mean

◆ m_Variance


The documentation for this struct was generated from the following files:
armnn::BatchNormalizationQueueDescriptor::m_Gamma
const ConstTensorHandle * m_Gamma
Definition: WorkloadData.hpp:324
armnn::BatchNormalizationQueueDescriptor::m_Variance
const ConstTensorHandle * m_Variance
Definition: WorkloadData.hpp:322
armnn::TensorInfo
Definition: Tensor.hpp:152
armnn::DataType::Float32
@ Float32
armnn::BatchNormalizationQueueDescriptor::m_Mean
const ConstTensorHandle * m_Mean
Definition: WorkloadData.hpp:321
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::BatchNormalizationQueueDescriptor::m_Beta
const ConstTensorHandle * m_Beta
Definition: WorkloadData.hpp:323
armnn::DataType::QAsymmS8
@ QAsymmS8
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