12 #include <common/include/Counter.hpp>
21 std::string ArmNN_Runtime(
"ArmNN_Runtime");
23 if (!profilingService.IsCategoryRegistered(ArmNN_Runtime))
25 profilingService.GetCounterRegistry().RegisterCategory(ArmNN_Runtime);
28 std::string networks(
"networks");
29 std::string networkLoads(
"Network loads");
31 if (!profilingService.IsCounterRegistered(networkLoads))
33 const arm::pipe::Counter* loadedNetworksCounter =
34 profilingService.GetCounterRegistry().RegisterCounter(armnn::profiling::BACKEND_ID.Get(),
35 arm::pipe::NETWORK_LOADS,
41 "The number of networks loaded at runtime",
43 if (!loadedNetworksCounter)
48 profilingService.InitializeCounterValue(loadedNetworksCounter->m_Uid);
51 std::string networkUnloads(
"Network unloads");
52 if (!profilingService.IsCounterRegistered(networkUnloads))
54 const arm::pipe::Counter* unloadedNetworksCounter =
55 profilingService.GetCounterRegistry().RegisterCounter(armnn::profiling::BACKEND_ID.Get(),
56 arm::pipe::NETWORK_UNLOADS,
62 "The number of networks unloaded at runtime",
65 profilingService.InitializeCounterValue(unloadedNetworksCounter->m_Uid);
67 std::string backends(
"backends");
69 std::string backendsRegistered(
"Backends registered");
70 if (!profilingService.IsCounterRegistered(backendsRegistered))
72 const arm::pipe::Counter* registeredBackendsCounter =
73 profilingService.GetCounterRegistry().RegisterCounter(armnn::profiling::BACKEND_ID.Get(),
74 arm::pipe::REGISTERED_BACKENDS,
80 "The number of registered backends",
83 profilingService.InitializeCounterValue(registeredBackendsCounter->m_Uid);
87 profilingService.SetCounterValue(arm::pipe::REGISTERED_BACKENDS,
static_cast<uint32_t
>(
91 std::string backendsUnregistered(
"Backends unregistered");
92 if (!profilingService.IsCounterRegistered(backendsUnregistered))
94 const arm::pipe::Counter* unregisteredBackendsCounter =
95 profilingService.GetCounterRegistry().RegisterCounter(armnn::profiling::BACKEND_ID.Get(),
96 arm::pipe::UNREGISTERED_BACKENDS,
101 backendsUnregistered,
102 "The number of unregistered backends",
105 profilingService.InitializeCounterValue(unregisteredBackendsCounter->m_Uid);
108 std::string inferences(
"inferences");
109 std::string inferencesRun(
"Inferences run");
110 if (!profilingService.IsCounterRegistered(inferencesRun))
112 const arm::pipe::Counter* inferencesRunCounter =
113 profilingService.GetCounterRegistry().RegisterCounter(armnn::profiling::BACKEND_ID.Get(),
114 arm::pipe::INFERENCES_RUN,
120 "The number of inferences run",
123 profilingService.InitializeCounterValue(inferencesRunCounter->m_Uid);