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",
44 profilingService.InitializeCounterValue(loadedNetworksCounter->m_Uid);
47 std::string networkUnloads(
"Network unloads");
48 if (!profilingService.IsCounterRegistered(networkUnloads))
50 const arm::pipe::Counter* unloadedNetworksCounter =
51 profilingService.GetCounterRegistry().RegisterCounter(armnn::profiling::BACKEND_ID.Get(),
52 arm::pipe::NETWORK_UNLOADS,
58 "The number of networks unloaded at runtime",
61 profilingService.InitializeCounterValue(unloadedNetworksCounter->m_Uid);
63 std::string backends(
"backends");
65 std::string backendsRegistered(
"Backends registered");
66 if (!profilingService.IsCounterRegistered(backendsRegistered))
68 const arm::pipe::Counter* registeredBackendsCounter =
69 profilingService.GetCounterRegistry().RegisterCounter(armnn::profiling::BACKEND_ID.Get(),
70 arm::pipe::REGISTERED_BACKENDS,
76 "The number of registered backends",
79 profilingService.InitializeCounterValue(registeredBackendsCounter->m_Uid);
83 profilingService.SetCounterValue(arm::pipe::REGISTERED_BACKENDS,
static_cast<uint32_t
>(
87 std::string backendsUnregistered(
"Backends unregistered");
88 if (!profilingService.IsCounterRegistered(backendsUnregistered))
90 const arm::pipe::Counter* unregisteredBackendsCounter =
91 profilingService.GetCounterRegistry().RegisterCounter(armnn::profiling::BACKEND_ID.Get(),
92 arm::pipe::UNREGISTERED_BACKENDS,
98 "The number of unregistered backends",
101 profilingService.InitializeCounterValue(unregisteredBackendsCounter->m_Uid);
104 std::string inferences(
"inferences");
105 std::string inferencesRun(
"Inferences run");
106 if (!profilingService.IsCounterRegistered(inferencesRun))
108 const arm::pipe::Counter* inferencesRunCounter =
109 profilingService.GetCounterRegistry().RegisterCounter(armnn::profiling::BACKEND_ID.Get(),
110 arm::pipe::INFERENCES_RUN,
116 "The number of inferences run",
119 profilingService.InitializeCounterValue(inferencesRunCounter->m_Uid);