diff options
author | Keith Davis <keith.davis@arm.com> | 2019-12-02 15:12:19 +0000 |
---|---|---|
committer | Keith Davis <keith.davis@arm.com> | 2019-12-13 16:21:12 +0000 |
commit | e394bd99f1a55e099445823b7a951f0faa84d439 (patch) | |
tree | ced6e6d4a2932bda64c1f4c5e280b82d87b77929 /src/profiling/ProfilingUtils.cpp | |
parent | 60a20fb62c992c4c6369bb7f532957f3e151f3d8 (diff) | |
download | armnn-e394bd99f1a55e099445823b7a951f0faa84d439.tar.gz |
IVGCVSW-4178 Add code to increment the 3 ArmNN counters
* Increment at Runtime.cpp | BackendRegistry.cpp | LoadedNetwork.cpp
* Update unit tests
* UID generation is now handled by backends
Signed-off-by: Keith Davis <keith.davis@arm.com>
Change-Id: Ifa53763409078c14839675206d8b260cdc36a8df
Diffstat (limited to 'src/profiling/ProfilingUtils.cpp')
-rw-r--r-- | src/profiling/ProfilingUtils.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/profiling/ProfilingUtils.cpp b/src/profiling/ProfilingUtils.cpp index 8a7d9147cc..0125f0db4b 100644 --- a/src/profiling/ProfilingUtils.cpp +++ b/src/profiling/ProfilingUtils.cpp @@ -6,7 +6,6 @@ #include "ProfilingUtils.hpp" #include <armnn/Version.hpp> -#include <armnn/Conversion.hpp> #include <WallClockTimer.hpp> @@ -72,20 +71,17 @@ uint16_t GetNextUid(bool peekOnly) } } -std::vector<uint16_t> GetNextCounterUids(uint16_t cores) +std::vector<uint16_t> GetNextCounterUids(uint16_t firstUid, uint16_t cores) { - // The UID used for counters only. The first valid UID is 0 - static uint16_t counterUid = 0; - // Check that it is possible to generate the next counter UID without causing an overflow (throws in case of error) - ThrowIfCantGenerateNextUid(counterUid, cores); + ThrowIfCantGenerateNextUid(firstUid, cores); // Get the next counter UIDs size_t counterUidsSize = cores == 0 ? 1 : cores; std::vector<uint16_t> counterUids(counterUidsSize, 0); for (size_t i = 0; i < counterUidsSize; i++) { - counterUids[i] = counterUid++; + counterUids[i] = firstUid++; } return counterUids; } |