From 1aff393b359b518925f66901439466f9bc14c49d Mon Sep 17 00:00:00 2001 From: Colm Donelan Date: Wed, 5 Feb 2020 17:48:59 +0000 Subject: IVGCVSW-4317 Implement the Profiling Context Initialisation * Call CreateBackendProfilingContext on each backend from Runtime passing an instance of the BackendProfiling interface. * Modify the signature of CreateBackendProfilingContext to remove const and return a shared_ptr to BackendProfilingContext * Add concrete BackendProfiling class. * Store BackendProfilingContexts in Profiling service. Signed-off-by: Colm Donelan Change-Id: I975eaa2093ae91fa623835f65f9e5b25eb65117a --- .../armnn/backends/profiling/IBackendProfiling.hpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'include/armnn/backends/profiling/IBackendProfiling.hpp') diff --git a/include/armnn/backends/profiling/IBackendProfiling.hpp b/include/armnn/backends/profiling/IBackendProfiling.hpp index 4c463a8128..d3c52996f4 100644 --- a/include/armnn/backends/profiling/IBackendProfiling.hpp +++ b/include/armnn/backends/profiling/IBackendProfiling.hpp @@ -68,27 +68,25 @@ public: class IBackendProfiling { -protected: - IBackendProfiling(const IRuntime::CreationOptions&) - {} - public: virtual ~IBackendProfiling() {} - IRegisterBackendCounters& GetCounterRegistrationInterface(uint16_t currentMaxGlobalCounterID); + virtual std::unique_ptr + GetCounterRegistrationInterface(uint16_t currentMaxGlobalCounterID) = 0; + + virtual std::unique_ptr GetSendTimelinePacket() = 0; - ISendTimelinePacket& GetSendTimelinePacket(); + virtual IProfilingGuidGenerator& GetProfilingGuidGenerator() = 0; - IProfilingGuidGenerator& GetProfilingGuidGenerator(); + virtual void ReportCounters(const std::vector& counterValues) = 0; - void ReportCounters(const std::vector& counterValues); + virtual CounterStatus GetCounterStatus(uint16_t backendCounterId) = 0; - CounterStatus GetCounterStatus(uint16_t backendCounterId); + virtual std::vector GetActiveCounters() = 0; - std::vector GetActiveCounters(); + virtual bool IsProfilingEnabled() const = 0; - bool IsProfilingEnabled() const; }; } // namespace profiling } // namespace armnn \ No newline at end of file -- cgit v1.2.1