From fd627ffaec8fd8801d980b4c91ee7c0607ab6aaf Mon Sep 17 00:00:00 2001 From: Jan Eilers Date: Thu, 25 Feb 2021 17:44:00 +0000 Subject: IVGCVSW-5687 Update Doxygen Docu * Update Doxygen Documentation for 21.02 release Signed-off-by: Jan Eilers Change-Id: I9ed2f9caab038836ea99d7b378d7899fe431a4e5 --- ...rmnn_1_1_fully_connected_queue_descriptor.xhtml | 296 +++++++++++++++++++++ 1 file changed, 296 insertions(+) create mode 100644 21.02/structarmnn_1_1_fully_connected_queue_descriptor.xhtml (limited to '21.02/structarmnn_1_1_fully_connected_queue_descriptor.xhtml') diff --git a/21.02/structarmnn_1_1_fully_connected_queue_descriptor.xhtml b/21.02/structarmnn_1_1_fully_connected_queue_descriptor.xhtml new file mode 100644 index 0000000000..0bbd11ecd7 --- /dev/null +++ b/21.02/structarmnn_1_1_fully_connected_queue_descriptor.xhtml @@ -0,0 +1,296 @@ + + + + + + + + + + + + + +ArmNN: FullyConnectedQueueDescriptor Struct Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  21.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
FullyConnectedQueueDescriptor Struct Reference
+
+
+ +

#include <WorkloadData.hpp>

+
+Inheritance diagram for FullyConnectedQueueDescriptor:
+
+
+ + +QueueDescriptorWithParameters< FullyConnectedDescriptor > +QueueDescriptor + +
+ + + + + + + + + + + + +

+Public Member Functions

 FullyConnectedQueueDescriptor ()
 
void Validate (const WorkloadInfo &workloadInfo) const
 
- Public Member Functions inherited from QueueDescriptor
void ValidateInputsOutputs (const std::string &descName, unsigned int numExpectedIn, unsigned int numExpectedOut) const
 
template<typename T >
const T * GetAdditionalInformation () const
 
+ + + + + + + + + + + + + + + +

+Public Attributes

const ConstCpuTensorHandlem_Weight
 
const ConstCpuTensorHandlem_Bias
 
- Public Attributes inherited from QueueDescriptorWithParameters< FullyConnectedDescriptor >
FullyConnectedDescriptor m_Parameters
 
- Public Attributes inherited from QueueDescriptor
std::vector< ITensorHandle * > m_Inputs
 
std::vector< ITensorHandle * > m_Outputs
 
void * m_AdditionalInfoObject
 
+ + + + + + + + + + + + + + + + + + + +

+Additional Inherited Members

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

Detailed Description

+
+

Definition at line 165 of file WorkloadData.hpp.

+

Constructor & Destructor Documentation

+ +

◆ FullyConnectedQueueDescriptor()

+ +
+
+ + + + + +
+ + + + + + + +
FullyConnectedQueueDescriptor ()
+
+inline
+
+ +

Definition at line 167 of file WorkloadData.hpp.

+
168  : m_Weight(nullptr)
169  , m_Bias(nullptr)
170  {
171  }
const ConstCpuTensorHandle * m_Weight
+
const ConstCpuTensorHandle * m_Bias
+
+
+
+

Member Function Documentation

+ +

◆ Validate()

+ +
+
+ + + + + + + + +
void Validate (const WorkloadInfoworkloadInfo) const
+
+ +

Definition at line 1021 of file WorkloadData.cpp.

+ +

References armnn::BFloat16, armnn::Float16, armnn::Float32, armnn::GetBiasDataType(), TensorInfo::GetDataType(), TensorInfo::GetNumDimensions(), WorkloadInfo::m_InputTensorInfos, WorkloadInfo::m_OutputTensorInfos, armnn::QAsymmS8, armnn::QAsymmU8, and armnn::QSymmS16.

+
1022 {
1023  const std::string descriptorName{"FullyConnectedQueueDescriptor"};
1024 
1025  ValidateNumInputs(workloadInfo, descriptorName, 1);
1026  ValidateNumOutputs(workloadInfo, descriptorName, 1);
1027 
1028  const TensorInfo& inputTensorInfo = workloadInfo.m_InputTensorInfos[0];
1029  const TensorInfo& outputTensorInfo = workloadInfo.m_OutputTensorInfos[0];
1030 
1031  ValidateTensorNumDimensions(outputTensorInfo, descriptorName, 2, "output");
1032 
1033  if (!(inputTensorInfo.GetNumDimensions() == 2 || inputTensorInfo.GetNumDimensions() == 4))
1034  {
1035  throw InvalidArgumentException(descriptorName + ": Input tensor must have 2 or 4 dimensions.");
1036  }
1037 
1038  ValidatePointer(m_Weight, descriptorName, "weight");
1039 
1040  const TensorInfo& weightTensorInfo = m_Weight->GetTensorInfo();
1041  ValidateTensorNumDimensions(weightTensorInfo, descriptorName, 2, "weight");
1042 
1044  {
1045  ValidatePointer(m_Bias, descriptorName, "bias");
1046 
1047  // Validates type and quantization values.
1048  const TensorInfo& biasTensorInfo = m_Bias->GetTensorInfo();
1049  ValidateBiasTensorQuantization(biasTensorInfo, inputTensorInfo, weightTensorInfo, descriptorName);
1050 
1051  ValidateTensorDataType(biasTensorInfo, GetBiasDataType(inputTensorInfo.GetDataType()), descriptorName, "bias");
1052  ValidateTensorNumDimensions(biasTensorInfo, descriptorName, 1, "bias");
1053  }
1054 
1055  // Check the supported data types
1056  std::vector<DataType> supportedTypes =
1057  {
1064  };
1065 
1066  ValidateDataTypes(inputTensorInfo, supportedTypes, descriptorName);
1067 
1068  // For FullyConnected, we allow to have BFloat16 input with Float32 output for optimization.
1069  if (inputTensorInfo.GetDataType() == DataType::BFloat16)
1070  {
1071  if (outputTensorInfo.GetDataType() != DataType::BFloat16 && outputTensorInfo.GetDataType() != DataType::Float32)
1072  {
1073  throw InvalidArgumentException(descriptorName + ": " + " Output tensor type must be BFloat16 or Float32 "
1074  "for BFloat16 input.");
1075  }
1076  }
1077  else
1078  {
1079  ValidateTensorDataTypesMatch(inputTensorInfo, outputTensorInfo, descriptorName, "input", "output");
1080  }
1081 }
const ConstCpuTensorHandle * m_Weight
+ + + + +
std::vector< TensorInfo > m_InputTensorInfos
+
DataType GetDataType() const
Definition: Tensor.hpp:194
+ +
bool m_BiasEnabled
Enable/disable bias.
+ +
std::vector< TensorInfo > m_OutputTensorInfos
+ + +
DataType GetBiasDataType(DataType inputDataType)
+ +
const ConstCpuTensorHandle * m_Bias
+
unsigned int GetNumDimensions() const
Definition: Tensor.hpp:191
+
const TensorInfo & GetTensorInfo() const
+
+
+
+

Member Data Documentation

+ +

◆ m_Bias

+ + + +

◆ m_Weight

+ +
+
+ + + + +
const ConstCpuTensorHandle* m_Weight
+
+
+
The documentation for this struct was generated from the following files: +
+
+ + + + -- cgit v1.2.1