aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/ProfilingService.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/profiling/ProfilingService.hpp')
-rw-r--r--src/profiling/ProfilingService.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/profiling/ProfilingService.hpp b/src/profiling/ProfilingService.hpp
index e510589caa..4438952853 100644
--- a/src/profiling/ProfilingService.hpp
+++ b/src/profiling/ProfilingService.hpp
@@ -22,6 +22,7 @@
#include "SendCounterPacket.hpp"
#include "SendTimelinePacket.hpp"
#include "TimelinePacketWriterFactory.hpp"
+#include <armnn/backends/profiling/IBackendProfilingContext.hpp>
namespace armnn
{
@@ -63,6 +64,13 @@ public:
// Disconnects the profiling service from the external server
void Disconnect();
+ // Store a profiling context returned from a backend that support profiling.
+ void AddBackendProfilingContext(const BackendId backendId,
+ std::shared_ptr<armnn::profiling::IBackendProfilingContext> profilingContext)
+ {
+ m_BackendProfilingContexts.emplace(backendId, std::move(profilingContext));
+ }
+
const ICounterDirectory& GetCounterDirectory() const;
ICounterRegistry& GetCounterRegistry();
ProfilingState GetCurrentState() const;
@@ -132,6 +140,8 @@ private:
PerJobCounterSelectionCommandHandler m_PerJobCounterSelectionCommandHandler;
ProfilingGuidGenerator m_GuidGenerator;
TimelinePacketWriterFactory m_TimelinePacketWriterFactory;
+ std::unordered_map<BackendId,
+ std::shared_ptr<armnn::profiling::IBackendProfilingContext>> m_BackendProfilingContexts;
protected:
// Default constructor/destructor kept protected for testing