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

Go to the source code of this file.

+ + + + +

+Functions

LayerTestResult< float, 2 > FakeQuantizationTest (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
 
+

Function Documentation

+ +

◆ FakeQuantizationTest()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
LayerTestResult<float, 2> FakeQuantizationTest (armnn::IWorkloadFactoryworkloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtrmemoryManager,
const armnn::ITensorHandleFactorytensorHandleFactory 
)
+
+ +

Definition at line 16 of file FakeQuantizationTestImpl.cpp.

+ +

References CopyDataFromITensorHandle(), CopyDataToITensorHandle(), IWorkloadFactory::CreateFakeQuantization(), ITensorHandleFactory::CreateTensorHandle(), armnn::Float32, armnn::IgnoreUnused(), FakeQuantizationDescriptor::m_Max, FakeQuantizationDescriptor::m_Min, QueueDescriptorWithParameters< LayerDescriptor >::m_Parameters, LayerTestResult< T, n >::output, and LayerTestResult< T, n >::outputExpected.

+
20 {
21  IgnoreUnused(memoryManager);
22  constexpr unsigned int width = 2;
23  constexpr unsigned int height = 3;
24 
25  const armnn::TensorInfo tensorInfo({height, width },
27 
28  auto input = MakeTensor<float, 2>(tensorInfo, std::vector<float>({
29  -10.0f, -5.0f,
30  0.0f, 5.0f,
31  10.0f, 10.0f
32  }));
33 
34  LayerTestResult<float, 2> ret(tensorInfo);
35 
36  std::unique_ptr<armnn::ITensorHandle> inputHandle = tensorHandleFactory.CreateTensorHandle(tensorInfo);
37  std::unique_ptr<armnn::ITensorHandle> outputHandle = tensorHandleFactory.CreateTensorHandle(tensorInfo);
38 
41 
42  AddInputToWorkload(data, info, tensorInfo, inputHandle.get());
43  AddOutputToWorkload(data, info, tensorInfo, outputHandle.get());
44 
45  float min = -10.f;
46  float max = 10.f;
47 
48  data.m_Parameters.m_Min = min;
49  data.m_Parameters.m_Max = max;
50 
51  armnn::PassthroughCpuTensorHandle refHandle(tensorInfo, &ret.outputExpected[0][0]);
53  armnn::WorkloadInfo refInfo = info;
54  SetWorkloadOutput(refData, refInfo, 0, tensorInfo, &refHandle);
55 
56  std::unique_ptr<armnn::IWorkload> workload = workloadFactory.CreateFakeQuantization(data, info);
57 
58  inputHandle->Allocate();
59  outputHandle->Allocate();
60 
61  CopyDataToITensorHandle(inputHandle.get(), &input[0][0]);
62 
63  workload->PostAllocationConfigure();
64  workload->Execute();
65 
66  CopyDataFromITensorHandle(&ret.output[0][0], outputHandle.get());
67 
68  ret.outputExpected = MakeTensor<float, 2>(tensorInfo, std::vector<float>({
69  0.0f, 63.0f,
70  128.0f, 191.0f,
71  255.0f, 255.0f
72  }));
73 
74  return ret;
75 }
+ +
virtual std::unique_ptr< IWorkload > CreateFakeQuantization(const FakeQuantizationQueueDescriptor &descriptor, const WorkloadInfo &info) const
+
void IgnoreUnused(Ts &&...)
+ + +
void CopyDataFromITensorHandle(void *memory, const armnn::ITensorHandle *tensorHandle)
+ + +
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)
+
+
+
+
+
+ + + + -- cgit v1.2.1