aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/CounterDirectory.cpp
diff options
context:
space:
mode:
authorKeith Davis <keith.davis@arm.com>2019-12-02 15:12:19 +0000
committerKeith Davis <keith.davis@arm.com>2019-12-13 16:21:12 +0000
commite394bd99f1a55e099445823b7a951f0faa84d439 (patch)
treeced6e6d4a2932bda64c1f4c5e280b82d87b77929 /src/profiling/CounterDirectory.cpp
parent60a20fb62c992c4c6369bb7f532957f3e151f3d8 (diff)
downloadarmnn-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/CounterDirectory.cpp')
-rw-r--r--src/profiling/CounterDirectory.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/profiling/CounterDirectory.cpp b/src/profiling/CounterDirectory.cpp
index 979b8046be..5a69e1c802 100644
--- a/src/profiling/CounterDirectory.cpp
+++ b/src/profiling/CounterDirectory.cpp
@@ -272,7 +272,9 @@ const CounterSet* CounterDirectory::RegisterCounterSet(const std::string& counte
return counterSetPtr;
}
-const Counter* CounterDirectory::RegisterCounter(const std::string& parentCategoryName,
+const Counter* CounterDirectory::RegisterCounter(const BackendId& backendId,
+ const uint16_t uid,
+ const std::string& parentCategoryName,
uint16_t counterClass,
uint16_t interpolation,
double multiplier,
@@ -379,7 +381,7 @@ const Counter* CounterDirectory::RegisterCounter(const std::string& parentCatego
uint16_t deviceCores = GetNumberOfCores(numberOfCores, deviceUidValue, parentCategory);
// Get the counter UIDs and calculate the max counter UID
- std::vector<uint16_t> counterUids = GetNextCounterUids(deviceCores);
+ std::vector<uint16_t> counterUids = GetNextCounterUids(uid, deviceCores);
BOOST_ASSERT(!counterUids.empty());
uint16_t maxCounterUid = deviceCores <= 1 ? counterUids.front() : counterUids.back();
@@ -387,7 +389,8 @@ const Counter* CounterDirectory::RegisterCounter(const std::string& parentCatego
const std::string unitsValue = units.has_value() ? units.value() : "";
// Create the counter
- CounterPtr counter = std::make_shared<Counter>(counterUids.front(),
+ CounterPtr counter = std::make_shared<Counter>(armnn::profiling::BACKEND_ID,
+ counterUids.front(),
maxCounterUid,
counterClass,
interpolation,