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 --- include/armnn/backends/IBackendInternal.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/armnn/backends/IBackendInternal.hpp') diff --git a/include/armnn/backends/IBackendInternal.hpp b/include/armnn/backends/IBackendInternal.hpp index 3533aceb3c..29097b4ae7 100644 --- a/include/armnn/backends/IBackendInternal.hpp +++ b/include/armnn/backends/IBackendInternal.hpp @@ -14,6 +14,8 @@ #include #include "IBackendContext.hpp" +#include "armnn/backends/profiling/IBackendProfiling.hpp" +#include "armnn/backends/profiling/IBackendProfilingContext.hpp" #include "IMemoryManager.hpp" #include "ITensorHandleFactory.hpp" #include "OptimizationViews.hpp" @@ -77,6 +79,8 @@ public: using IWorkloadFactoryPtr = std::unique_ptr; using IBackendContextPtr = std::unique_ptr; + // This is the bridge between backend and backend profiling we'll keep it in the backend namespace. + using IBackendProfilingContextPtr = std::unique_ptr; using OptimizationPtr = std::unique_ptr; using Optimizations = std::vector; using ILayerSupportSharedPtr = std::shared_ptr; @@ -113,6 +117,10 @@ public: virtual IBackendContextPtr CreateBackendContext(const IRuntime::CreationOptions&) const; + // Context specifically used for profiling interaction from backends. + virtual IBackendProfilingContextPtr CreateBackendProfilingContext(const IRuntime::CreationOptions& creationOptions, + armnn::profiling::IBackendProfiling& backendProfiling) const; + virtual ILayerSupportSharedPtr GetLayerSupport() const = 0; virtual OptimizationViews OptimizeSubgraphView(const SubgraphView& subgraph) const; -- cgit v1.2.1