From ae050524109f1ce827962665436ef7430f2ac479 Mon Sep 17 00:00:00 2001 From: David Monahan Date: Wed, 22 Mar 2023 16:48:58 +0000 Subject: IVGCVSW-7255 Update Doxygen Documentation and publish on GitHub. * Updating Doxygen documentation for 23.02 release. Signed-off-by: David Monahan Change-Id: I545574ff7664b4595d2fe6a91a3c35d2ad55df82 --- 23.02/_ref_debug_workload_8cpp_source.xhtml | 134 +++++++++++++++++++++------- 1 file changed, 103 insertions(+), 31 deletions(-) (limited to '23.02/_ref_debug_workload_8cpp_source.xhtml') diff --git a/23.02/_ref_debug_workload_8cpp_source.xhtml b/23.02/_ref_debug_workload_8cpp_source.xhtml index eacd1dcba0..340fee6093 100644 --- a/23.02/_ref_debug_workload_8cpp_source.xhtml +++ b/23.02/_ref_debug_workload_8cpp_source.xhtml @@ -8,7 +8,7 @@ - + ArmNN: src/backends/reference/workloads/RefDebugWorkload.cpp Source File @@ -19,9 +19,6 @@ - @@ -30,7 +27,8 @@ extensions: ["tex2jax.js"], jax: ["input/TeX","output/HTML-CSS"], }); - + + @@ -51,18 +49,21 @@ - + +/* @license-end */
@@ -76,7 +77,9 @@ $(function() {
@@ -98,36 +101,105 @@ $(document).ready(function(){initNavTree('_ref_debug_workload_8cpp_source.xhtml'
RefDebugWorkload.cpp
-Go to the documentation of this file.
1 //
2 // Copyright © 2022 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #include "RefDebugWorkload.hpp"
7 #include "Debug.hpp"
8 #include "RefWorkloadUtils.hpp"
9 
10 #include <ResolveType.hpp>
11 
12 #include <cstring>
13 
14 namespace armnn
15 {
16 
17 template<armnn::DataType DataType>
19 {
20  Execute(m_Data.m_Inputs);
21 }
22 
23 template<armnn::DataType DataType>
25 {
26  WorkingMemDescriptor* workingMemDescriptor = static_cast<WorkingMemDescriptor*>(executionData.m_Data);
27  Execute(workingMemDescriptor->m_Inputs);
28 }
29 
30 template<armnn::DataType DataType>
31 void RefDebugWorkload<DataType>::Execute(std::vector<ITensorHandle*> inputs) const
32 {
33  using T = ResolveType<DataType>;
34 
35  ARMNN_SCOPED_PROFILING_EVENT(Compute::CpuRef, GetName() + "_Execute");
36 
37  const TensorInfo& inputInfo = GetTensorInfo(inputs[0]);
38 
39  const T* inputData = GetInputTensorData<T>(0, m_Data);
40  T* outputData = GetOutputTensorData<T>(0, m_Data);
41 
42  if (m_Callback)
43  {
44  m_Callback(m_Data.m_Guid, m_Data.m_SlotIndex, inputs[0]);
45  }
46  else
47  {
48  Debug(inputInfo, inputData, m_Data.m_Guid, m_Data.m_LayerName, m_Data.m_SlotIndex, m_Data.m_LayerOutputToFile);
49  }
50 
51  std::memcpy(outputData, inputData, inputInfo.GetNumElements()*sizeof(T));
52 }
53 
54 template<armnn::DataType DataType>
56 {
57  m_Callback = func;
58 }
59 
68 
69 } // namespace armnn
void Execute() const override
- -
CPU Execution: Reference C++ kernels.
- - -
typename ResolveTypeImpl< DT >::Type ResolveType
Definition: ResolveType.hpp:79
- - -
Copyright (c) 2021 ARM Limited and Contributors.
-
std::function< void(LayerGuid guid, unsigned int slotIndex, ITensorHandle *tensorHandle)> DebugCallbackFunction
Define the type of callback for the Debug layer to call.
Definition: Types.hpp:379
-
#define ARMNN_SCOPED_PROFILING_EVENT(backendId, name)
Definition: Profiling.hpp:220
- - - -
void Debug(const TensorInfo &inputInfo, const T *inputData, LayerGuid guid, const std::string &layerName, unsigned int slotIndex, bool outputsToFile)
Definition: Debug.cpp:97
- - -
void ExecuteAsync(ExecutionData &executionData) override
-
void RegisterDebugCallback(const DebugCallbackFunction &func) override
-
unsigned int GetNumElements() const
Definition: Tensor.hpp:196
-
const TensorInfo & GetTensorInfo(const ITensorHandle *tensorHandle)
float32 helpers
+Go to the documentation of this file.
1 //
+
2 // Copyright © 2022 Arm Ltd and Contributors. All rights reserved.
+
3 // SPDX-License-Identifier: MIT
+
4 //
+
5 
+
6 #include "RefDebugWorkload.hpp"
+
7 #include "Debug.hpp"
+
8 #include "RefWorkloadUtils.hpp"
+
9 
+
10 #include <ResolveType.hpp>
+
11 
+
12 #include <cstring>
+
13 
+
14 namespace armnn
+
15 {
+
16 
+
17 template<armnn::DataType DataType>
+ +
19 {
+
20  Execute(m_Data.m_Inputs);
+
21 }
+
22 
+
23 template<armnn::DataType DataType>
+ +
25 {
+
26  WorkingMemDescriptor* workingMemDescriptor = static_cast<WorkingMemDescriptor*>(executionData.m_Data);
+
27  Execute(workingMemDescriptor->m_Inputs);
+
28 }
+
29 
+
30 template<armnn::DataType DataType>
+
31 void RefDebugWorkload<DataType>::Execute(std::vector<ITensorHandle*> inputs) const
+
32 {
+
33  using T = ResolveType<DataType>;
+
34 
+
35  ARMNN_SCOPED_PROFILING_EVENT(Compute::CpuRef, GetName() + "_Execute");
+
36 
+
37  const TensorInfo& inputInfo = GetTensorInfo(inputs[0]);
+
38 
+
39  const T* inputData = GetInputTensorData<T>(0, m_Data);
+
40  T* outputData = GetOutputTensorData<T>(0, m_Data);
+
41 
+
42  if (m_Callback)
+
43  {
+
44  m_Callback(m_Data.m_Guid, m_Data.m_SlotIndex, inputs[0]);
+
45  }
+
46  else
+
47  {
+
48  Debug(inputInfo, inputData, m_Data.m_Guid, m_Data.m_LayerName, m_Data.m_SlotIndex, m_Data.m_LayerOutputToFile);
+
49  }
+
50 
+
51  std::memcpy(outputData, inputData, inputInfo.GetNumElements()*sizeof(T));
+
52 }
+
53 
+
54 template<armnn::DataType DataType>
+ +
56 {
+
57  m_Callback = func;
+
58 }
+
59 
+ + + + + + + + +
68 
+
69 } // namespace armnn
+
const TensorInfo & GetTensorInfo(const ITensorHandle *tensorHandle)
float32 helpers
+
void Execute() const override
+ +
typename ResolveTypeImpl< DT >::Type ResolveType
Definition: ResolveType.hpp:79
+ + +
std::function< void(LayerGuid guid, unsigned int slotIndex, ITensorHandle *tensorHandle)> DebugCallbackFunction
Define the type of callback for the Debug layer to call.
Definition: Types.hpp:379
+ +
Copyright (c) 2021 ARM Limited and Contributors.
+
void Debug(const TensorInfo &inputInfo, const T *inputData, LayerGuid guid, const std::string &layerName, unsigned int slotIndex, bool outputsToFile)
Definition: Debug.cpp:97
+ +
#define ARMNN_SCOPED_PROFILING_EVENT(backendId, name)
Definition: Profiling.hpp:220
+
unsigned int GetNumElements() const
Definition: Tensor.hpp:196
+ + + + +
void RegisterDebugCallback(const DebugCallbackFunction &func) override
+
void ExecuteAsync(ExecutionData &executionData) override
+
@ CpuRef
CPU Execution: Reference C++ kernels.
+ -- cgit v1.2.1