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

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

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