From 6f92c8e9f8bb38dcf5dccf8deeff5112ecd8e37c Mon Sep 17 00:00:00 2001 From: Nikhil Raj Date: Wed, 22 Nov 2023 11:41:15 +0000 Subject: Update Doxygen for 23.11 Signed-off-by: Nikhil Raj Change-Id: I47cd933f5002cb94a73aa97689d7b3d9c93cb849 --- ..._1_1_arm_n_n_profiling_service_initialiser.html | 280 +++++++++++++++++++++ 1 file changed, 280 insertions(+) create mode 100644 23.11/classarmnn_1_1_arm_n_n_profiling_service_initialiser.html (limited to '23.11/classarmnn_1_1_arm_n_n_profiling_service_initialiser.html') diff --git a/23.11/classarmnn_1_1_arm_n_n_profiling_service_initialiser.html b/23.11/classarmnn_1_1_arm_n_n_profiling_service_initialiser.html new file mode 100644 index 0000000000..5569f0cdc3 --- /dev/null +++ b/23.11/classarmnn_1_1_arm_n_n_profiling_service_initialiser.html @@ -0,0 +1,280 @@ + + + + + + + + +Arm NN: ArmNNProfilingServiceInitialiser Class Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  23.11 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
ArmNNProfilingServiceInitialiser Class Reference
+
+
+ +

#include <ArmNNProfilingServiceInitialiser.hpp>

+
+Inheritance diagram for ArmNNProfilingServiceInitialiser:
+
+
+
+
[legend]
+
+Collaboration diagram for ArmNNProfilingServiceInitialiser:
+
+
+
+
[legend]
+ + + + +

+Public Member Functions

void InitialiseProfilingService (arm::pipe::IProfilingService &profilingService) override
 
+

Detailed Description

+
+

Definition at line 14 of file ArmNNProfilingServiceInitialiser.hpp.

+

Member Function Documentation

+ +

◆ InitialiseProfilingService()

+ +
+
+ + + + + +
+ + + + + + + + +
void InitialiseProfilingService (arm::pipe::IProfilingService & profilingService)
+
+override
+
+ +

Definition at line 17 of file ArmNNProfilingServiceInitialiser.cpp.

+
18 {
+
19  uint16_t ZERO = 0;
+
20  double ONE = 1.0;
+
21  std::string ArmNN_Runtime("ArmNN_Runtime");
+
22  // Register a category for the basic runtime counters
+
23  if (!profilingService.IsCategoryRegistered(ArmNN_Runtime))
+
24  {
+
25  profilingService.GetCounterRegistry().RegisterCategory(ArmNN_Runtime);
+
26  }
+
27 
+
28  std::string networks("networks");
+
29  std::string networkLoads("Network loads");
+
30  // Register a counter for the number of Network loads
+
31  if (!profilingService.IsCounterRegistered(networkLoads))
+
32  {
+
33  const arm::pipe::Counter* loadedNetworksCounter =
+
34  profilingService.GetCounterRegistry().RegisterCounter(armnn::profiling::BACKEND_ID.Get(),
+
35  arm::pipe::NETWORK_LOADS,
+
36  ArmNN_Runtime,
+
37  ZERO,
+
38  ZERO,
+
39  ONE,
+
40  networkLoads,
+
41  "The number of networks loaded at runtime",
+
42  networks);
+
43  ARMNN_ASSERT(loadedNetworksCounter);
+
44  profilingService.InitializeCounterValue(loadedNetworksCounter->m_Uid);
+
45  }
+
46  // Register a counter for the number of unloaded networks
+
47  std::string networkUnloads("Network unloads");
+
48  if (!profilingService.IsCounterRegistered(networkUnloads))
+
49  {
+
50  const arm::pipe::Counter* unloadedNetworksCounter =
+
51  profilingService.GetCounterRegistry().RegisterCounter(armnn::profiling::BACKEND_ID.Get(),
+
52  arm::pipe::NETWORK_UNLOADS,
+
53  ArmNN_Runtime,
+
54  ZERO,
+
55  ZERO,
+
56  ONE,
+
57  networkUnloads,
+
58  "The number of networks unloaded at runtime",
+
59  networks);
+
60  ARMNN_ASSERT(unloadedNetworksCounter);
+
61  profilingService.InitializeCounterValue(unloadedNetworksCounter->m_Uid);
+
62  }
+
63  std::string backends("backends");
+
64  // Register a counter for the number of registered backends
+
65  std::string backendsRegistered("Backends registered");
+
66  if (!profilingService.IsCounterRegistered(backendsRegistered))
+
67  {
+
68  const arm::pipe::Counter* registeredBackendsCounter =
+
69  profilingService.GetCounterRegistry().RegisterCounter(armnn::profiling::BACKEND_ID.Get(),
+
70  arm::pipe::REGISTERED_BACKENDS,
+
71  ArmNN_Runtime,
+
72  ZERO,
+
73  ZERO,
+
74  ONE,
+
75  backendsRegistered,
+
76  "The number of registered backends",
+
77  backends);
+
78  ARMNN_ASSERT(registeredBackendsCounter);
+
79  profilingService.InitializeCounterValue(registeredBackendsCounter->m_Uid);
+
80 
+
81  // Due to backends being registered before the profiling service becomes active,
+
82  // we need to set the counter to the correct value here
+
83  profilingService.SetCounterValue(arm::pipe::REGISTERED_BACKENDS, static_cast<uint32_t>(
+ +
85  }
+
86  // Register a counter for the number of registered backends
+
87  std::string backendsUnregistered("Backends unregistered");
+
88  if (!profilingService.IsCounterRegistered(backendsUnregistered))
+
89  {
+
90  const arm::pipe::Counter* unregisteredBackendsCounter =
+
91  profilingService.GetCounterRegistry().RegisterCounter(armnn::profiling::BACKEND_ID.Get(),
+
92  arm::pipe::UNREGISTERED_BACKENDS,
+
93  ArmNN_Runtime,
+
94  ZERO,
+
95  ZERO,
+
96  ONE,
+
97  backendsUnregistered,
+
98  "The number of unregistered backends",
+
99  backends);
+
100  ARMNN_ASSERT(unregisteredBackendsCounter);
+
101  profilingService.InitializeCounterValue(unregisteredBackendsCounter->m_Uid);
+
102  }
+
103  // Register a counter for the number of inferences run
+
104  std::string inferences("inferences");
+
105  std::string inferencesRun("Inferences run");
+
106  if (!profilingService.IsCounterRegistered(inferencesRun))
+
107  {
+
108  const arm::pipe::Counter* inferencesRunCounter =
+
109  profilingService.GetCounterRegistry().RegisterCounter(armnn::profiling::BACKEND_ID.Get(),
+
110  arm::pipe::INFERENCES_RUN,
+
111  ArmNN_Runtime,
+
112  ZERO,
+
113  ZERO,
+
114  ONE,
+
115  inferencesRun,
+
116  "The number of inferences run",
+
117  inferences);
+
118  ARMNN_ASSERT(inferencesRunCounter);
+
119  profilingService.InitializeCounterValue(inferencesRunCounter->m_Uid);
+
120  }
+
121 }
+
+

References ARMNN_ASSERT, and armnn::BackendRegistryInstance().

+ +

Referenced by RuntimeImpl::InitialiseProfilingService().

+ +
+
+
The documentation for this class was generated from the following files: +
+
+
#define ARMNN_ASSERT(COND)
Definition: Assert.hpp:14
+
BackendRegistry & BackendRegistryInstance()
+ + + + -- cgit v1.2.1