From e49755b914a2c8f6f8b836adfcc61bf8f9a5b3a3 Mon Sep 17 00:00:00 2001 From: Colm Donelan Date: Wed, 29 Jan 2020 15:22:43 +0000 Subject: IVGCVSW-4316 First draft of IBackendProfiling and IBackendProfilingContext * Introduce two new backend profiling interfaces IBackendProfiling and IBackendProfilingContext. * Add a mechanism to pull a context from a backend through IBackendInternal * Update CL, Neon and Ref backends to return an empty profiling backend. Signed-off-by: Colm Donelan Change-Id: I6e7438fcb126ad7a073a226862dc44836c9998b7 --- .../profiling/IBackendProfilingContext.hpp | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 include/armnn/backends/profiling/IBackendProfilingContext.hpp (limited to 'include/armnn/backends/profiling/IBackendProfilingContext.hpp') diff --git a/include/armnn/backends/profiling/IBackendProfilingContext.hpp b/include/armnn/backends/profiling/IBackendProfilingContext.hpp new file mode 100644 index 0000000000..d5d918322e --- /dev/null +++ b/include/armnn/backends/profiling/IBackendProfilingContext.hpp @@ -0,0 +1,32 @@ +// +// Copyright © 2020 Arm Ltd. All rights reserved. +// SPDX-License-Identifier: MIT +// +#pragma once + +#include +#include + +namespace armnn +{ +namespace profiling +{ + +class IBackendProfilingContext +{ +protected: + IBackendProfilingContext(const IRuntime::CreationOptions&) + {} + +public: + virtual ~IBackendProfilingContext() + {} + virtual uint16_t RegisterCounters(uint16_t currentMaxGlobalCounterID); + virtual void ActivateCounters(uint32_t capturePeriod, const std::vector& counterIds); + virtual std::vector ReportCounterValues(); + virtual void EnableProfiling(bool flag); +}; + +using IBackendProfilingContextUniquePtr = std::unique_ptr; +} // namespace profiling +} // namespace armnn \ No newline at end of file -- cgit v1.2.1