diff options
author | Jim Flynn <jim.flynn@arm.com> | 2020-07-14 09:50:59 +0100 |
---|---|---|
committer | Jim Flynn <jim.flynn@arm.com> | 2020-07-14 17:20:04 +0100 |
commit | f7713212f080771e0c6d53d939da59a9ea2e7da0 (patch) | |
tree | c176d4448ed36804b6bac3806d55c74f113e2256 /src/armnn/Runtime.cpp | |
parent | 6da6a45d09ac8d7ea956c09ba241c9e0840ecb25 (diff) | |
download | armnn-f7713212f080771e0c6d53d939da59a9ea2e7da0.tar.gz |
IVGCVSW-5101 Add a SOL/EOL and a process ID label to Network
Change-Id: I6261f46404a3aab5c069bca40586994d31d26fe8
Signed-off-by: Jim Flynn <jim.flynn@arm.com>
Diffstat (limited to 'src/armnn/Runtime.cpp')
-rw-r--r-- | src/armnn/Runtime.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/armnn/Runtime.cpp b/src/armnn/Runtime.cpp index 28e2df22ab..63f39c6529 100644 --- a/src/armnn/Runtime.cpp +++ b/src/armnn/Runtime.cpp @@ -6,6 +6,7 @@ #include <armnn/Version.hpp> #include <armnn/BackendRegistry.hpp> +#include <LabelsAndEventClasses.hpp> #include <armnn/Logging.hpp> #include <armnn/utility/Timer.hpp> @@ -117,9 +118,22 @@ Status Runtime::UnloadNetwork(NetworkId networkId) return Status::Failure; } + std::unique_ptr<profiling::TimelineUtilityMethods> timelineUtils = + profiling::TimelineUtilityMethods::GetTimelineUtils(m_ProfilingService); { std::lock_guard<std::mutex> lockGuard(m_Mutex); + // If timeline recording is on mark the Network end of life + if (timelineUtils) + { + auto search = m_LoadedNetworks.find(networkId); + if (search != m_LoadedNetworks.end()) + { + profiling::ProfilingGuid networkGuid = search->second->GetNetworkGuid(); + timelineUtils->RecordEvent(networkGuid, + profiling::LabelsAndEventClasses::ARMNN_PROFILING_EOL_EVENT_CLASS); + } + } if (m_LoadedNetworks.erase(networkId) == 0) { ARMNN_LOG(warning) << "WARNING: Runtime::UnloadNetwork(): " << networkId << " not found!"; |