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/_workload_test_utils_8hpp_source.xhtml | 141 +++++++++++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 21.02/_workload_test_utils_8hpp_source.xhtml (limited to '21.02/_workload_test_utils_8hpp_source.xhtml') diff --git a/21.02/_workload_test_utils_8hpp_source.xhtml b/21.02/_workload_test_utils_8hpp_source.xhtml new file mode 100644 index 0000000000..cf94166c50 --- /dev/null +++ b/21.02/_workload_test_utils_8hpp_source.xhtml @@ -0,0 +1,141 @@ + + + + + + + + + + + + + +ArmNN: src/backends/backendsCommon/test/WorkloadTestUtils.hpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  21.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
WorkloadTestUtils.hpp
+
+
+Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 #pragma once
6 
7 #include <armnn/Tensor.hpp>
8 
13 
14 namespace armnn
15 {
16 class ITensorHandle;
17 } // namespace armnn
18 
19 namespace
20 {
21 
22 template <typename QueueDescriptor>
23 void AddInputToWorkload(QueueDescriptor& descriptor,
24  armnn::WorkloadInfo& info,
25  const armnn::TensorInfo& tensorInfo,
26  armnn::ITensorHandle* tensorHandle)
27 {
28  descriptor.m_Inputs.push_back(tensorHandle);
29  info.m_InputTensorInfos.push_back(tensorInfo);
30 }
31 
32 template <typename QueueDescriptor>
33 void AddOutputToWorkload(QueueDescriptor& descriptor,
34  armnn::WorkloadInfo& info,
35  const armnn::TensorInfo& tensorInfo,
36  armnn::ITensorHandle* tensorHandle)
37 {
38  descriptor.m_Outputs.push_back(tensorHandle);
39  info.m_OutputTensorInfos.push_back(tensorInfo);
40 }
41 
42 template <typename QueueDescriptor>
43 void SetWorkloadInput(QueueDescriptor& descriptor,
44  armnn::WorkloadInfo& info,
45  unsigned int index,
46  const armnn::TensorInfo& tensorInfo,
47  armnn::ITensorHandle* tensorHandle)
48 {
49  descriptor.m_Inputs[index] = tensorHandle;
50  info.m_InputTensorInfos[index] = tensorInfo;
51 }
52 
53 template <typename QueueDescriptor>
54 void SetWorkloadOutput(QueueDescriptor& descriptor,
55  armnn::WorkloadInfo& info,
56  unsigned int index,
57  const armnn::TensorInfo& tensorInfo,
58  armnn::ITensorHandle* tensorHandle)
59 {
60  descriptor.m_Outputs[index] = tensorHandle;
61  info.m_OutputTensorInfos[index] = tensorInfo;
62 }
63 
64 inline void ExecuteWorkload(armnn::IWorkload& workload,
66  bool memoryManagementRequested = true)
67 {
68  const bool manageMemory = memoryManager && memoryManagementRequested;
69 
70  // Acquire working memory (if needed)
71  if (manageMemory)
72  {
73  memoryManager->Acquire();
74  }
75 
76  // Perform PostAllocationConfiguration
77  workload.PostAllocationConfigure();
78 
79  // Execute the workload
80  workload.Execute();
81 
82  // Release working memory (if needed)
83  if (manageMemory)
84  {
85  memoryManager->Release();
86  }
87 }
88 
90 {
91  if (!weightsType)
92  {
93  return weightsType;
94  }
95 
96  switch(weightsType.value())
97  {
101  return weightsType;
107  default:
108  ARMNN_ASSERT_MSG(false, "GetBiasTypeFromWeightsType(): Unsupported data type.");
109  }
110  return armnn::EmptyOptional();
111 }
112 
113 } // anonymous namespace
+
virtual void PostAllocationConfigure()=0
+ + + + + +
Copyright (c) 2021 ARM Limited and Contributors.
+ +
armnn::Optional< armnn::DataType > GetBiasTypeFromWeightsType(armnn::Optional< armnn::DataType > weightsType)
+
std::vector< TensorInfo > m_InputTensorInfos
+ +
#define ARMNN_ASSERT_MSG(COND, MSG)
Definition: Assert.hpp:15
+
std::shared_ptr< IMemoryManager > IMemoryManagerSharedPtr
+ + + +
std::vector< TensorInfo > m_OutputTensorInfos
+ +
Workload interface to enqueue a layer computation.
Definition: IWorkload.hpp:13
+
EmptyOptional is used to initialize the Optional class in case we want to have default value for an O...
Definition: Optional.hpp:32
+ + + + +
Contains information about inputs and outputs to a layer.
+ +
virtual void Execute() const =0
+
+
+ + + + -- cgit v1.2.1