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 --- 21.02/_elementwise_unary_test_impl_8hpp.xhtml | 365 ++++++++++++++++++++++++++ 1 file changed, 365 insertions(+) create mode 100644 21.02/_elementwise_unary_test_impl_8hpp.xhtml (limited to '21.02/_elementwise_unary_test_impl_8hpp.xhtml') diff --git a/21.02/_elementwise_unary_test_impl_8hpp.xhtml b/21.02/_elementwise_unary_test_impl_8hpp.xhtml new file mode 100644 index 0000000000..24452948ca --- /dev/null +++ b/21.02/_elementwise_unary_test_impl_8hpp.xhtml @@ -0,0 +1,365 @@ + + + + + + + + + + + + + +ArmNN: src/backends/backendsCommon/test/layerTests/ElementwiseUnaryTestImpl.hpp File Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  21.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
ElementwiseUnaryTestImpl.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + +

+Functions

std::unique_ptr< armnn::IWorkloadCreateWorkload (const armnn::IWorkloadFactory &workloadFactory, const armnn::WorkloadInfo &info, const armnn::ElementwiseUnaryQueueDescriptor &descriptor)
 
template<std::size_t NumDims, armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>>
LayerTestResult< T, NumDims > ElementwiseUnaryTestHelper (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, armnn::UnaryOperation op, const unsigned int shape[NumDims], std::vector< float > values, float quantScale, int quantOffset, const unsigned int outShape[NumDims], std::vector< float > outValues, const armnn::ITensorHandleFactory &tensorHandleFactory, float outQuantScale, int outQuantOffset)
 
template<std::size_t NumDims, armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>>
LayerTestResult< T, NumDims > ElementwiseUnaryTestHelper (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, armnn::UnaryOperation op, const unsigned int shape[NumDims], std::vector< float > values, const unsigned int outShape[NumDims], std::vector< float > outValues, const armnn::ITensorHandleFactory &tensorHandleFactory, float quantScale=1.0f, int quantOffset=0)
 
+

Function Documentation

+ +

◆ CreateWorkload()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
std::unique_ptr<armnn::IWorkload> CreateWorkload (const armnn::IWorkloadFactoryworkloadFactory,
const armnn::WorkloadInfoinfo,
const armnn::ElementwiseUnaryQueueDescriptordescriptor 
)
+
+ +

Definition at line 8 of file ElementwiseUnaryTestImpl.cpp.

+ +

References IWorkloadFactory::CreateElementwiseUnary().

+ +

Referenced by ElementwiseUnaryTestHelper().

+
12 {
13  return workloadFactory.CreateElementwiseUnary(descriptor, info);
14 }
virtual std::unique_ptr< IWorkload > CreateElementwiseUnary(const ElementwiseUnaryQueueDescriptor &descriptor, const WorkloadInfo &Info) const
+
+
+
+ +

◆ ElementwiseUnaryTestHelper() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
LayerTestResult<T, NumDims> ElementwiseUnaryTestHelper (armnn::IWorkloadFactoryworkloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtrmemoryManager,
armnn::UnaryOperation op,
const unsigned int shape[NumDims],
std::vector< float > values,
float quantScale,
int quantOffset,
const unsigned int outShape[NumDims],
std::vector< float > outValues,
const armnn::ITensorHandleFactorytensorHandleFactory,
float outQuantScale,
int outQuantOffset 
)
+
+ +

Definition at line 35 of file ElementwiseUnaryTestImpl.hpp.

+ +

References CopyDataFromITensorHandle(), CopyDataToITensorHandle(), ITensorHandleFactory::CreateTensorHandle(), CreateWorkload(), QueueDescriptorWithParameters< LayerDescriptor >::m_Parameters, LayerTestResult< T, n >::output, LayerTestResult< T, n >::outputExpected, and TensorInfo::SetQuantizationScale().

+
48 {
49  armnn::TensorInfo inputTensorInfo{NumDims, shape, ArmnnType};
50  armnn::TensorInfo outputTensorInfo{NumDims, outShape, ArmnnType};
51 
52  inputTensorInfo.SetQuantizationScale(quantScale);
53  inputTensorInfo.SetQuantizationOffset(quantOffset);
54 
55  outputTensorInfo.SetQuantizationScale(outQuantScale);
56  outputTensorInfo.SetQuantizationOffset(outQuantOffset);
57 
58  auto input = MakeTensor<T, NumDims>(inputTensorInfo, ConvertToDataType<ArmnnType>(values, inputTensorInfo));
59 
60  LayerTestResult<T, NumDims> ret(outputTensorInfo);
61 
62  std::unique_ptr<armnn::ITensorHandle> inputHandle = tensorHandleFactory.CreateTensorHandle(inputTensorInfo);
63  std::unique_ptr<armnn::ITensorHandle> outputHandle = tensorHandleFactory.CreateTensorHandle(outputTensorInfo);
64 
67  qDesc.m_Parameters = desc;
69  AddInputToWorkload(qDesc, info, inputTensorInfo, inputHandle.get());
70  AddOutputToWorkload(qDesc, info, outputTensorInfo, outputHandle.get());
71  auto workload = CreateWorkload(workloadFactory, info, qDesc);
72 
73  inputHandle->Allocate();
74  outputHandle->Allocate();
75 
76  CopyDataToITensorHandle(inputHandle.get(), input.origin());
77 
78  workload->PostAllocationConfigure();
79  ExecuteWorkload(*workload, memoryManager);
80 
81  CopyDataFromITensorHandle(ret.output.origin(), outputHandle.get());
82 
83  ret.outputExpected = MakeTensor<T, NumDims>(outputTensorInfo, ConvertToDataType<ArmnnType>(outValues,
84  inputTensorInfo));
85  return ret;
86 }
+ +
void SetQuantizationScale(float scale)
Definition: Tensor.cpp:464
+
std::unique_ptr< armnn::IWorkload > CreateWorkload(const armnn::IWorkloadFactory &workloadFactory, const armnn::WorkloadInfo &info, const armnn::ElementwiseUnaryQueueDescriptor &descriptor)
+
void CopyDataFromITensorHandle(void *memory, const armnn::ITensorHandle *tensorHandle)
+
A ElementwiseUnaryDescriptor for the ElementwiseUnaryLayer.
Definition: Descriptors.hpp:98
+ +
Contains information about inputs and outputs to a layer.
+ +
virtual std::unique_ptr< ITensorHandle > CreateTensorHandle(const TensorInfo &tensorInfo) const =0
+ +
void CopyDataToITensorHandle(armnn::ITensorHandle *tensorHandle, const void *memory)
+
+
+
+ +

◆ ElementwiseUnaryTestHelper() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
LayerTestResult<T, NumDims> ElementwiseUnaryTestHelper (armnn::IWorkloadFactoryworkloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtrmemoryManager,
armnn::UnaryOperation op,
const unsigned int shape[NumDims],
std::vector< float > values,
const unsigned int outShape[NumDims],
std::vector< float > outValues,
const armnn::ITensorHandleFactorytensorHandleFactory,
float quantScale = 1.0f,
int quantOffset = 0 
)
+
+ +

Definition at line 91 of file ElementwiseUnaryTestImpl.hpp.

+
102 {
103  return ElementwiseUnaryTestHelper<NumDims, ArmnnType>(
104  workloadFactory,
105  memoryManager,
106  op,
107  shape,
108  values,
109  quantScale,
110  quantOffset,
111  outShape,
112  outValues,
113  tensorHandleFactory,
114  quantScale,
115  quantOffset);
116 }
+
+
+
+
+ + + + -- cgit v1.2.1