diff options
author | Colm Donelan <Colm.Donelan@arm.com> | 2020-01-29 15:22:43 +0000 |
---|---|---|
committer | Colm Donelan <Colm.Donelan@arm.com> | 2020-01-29 16:23:48 +0000 |
commit | e49755b914a2c8f6f8b836adfcc61bf8f9a5b3a3 (patch) | |
tree | 98ad93e75c783e6552fdeda6206a84937181bb27 /include/armnn/backends/IBackendInternal.hpp | |
parent | 1426a3f52854d0d9457109c5f806bffde037bd34 (diff) | |
download | armnn-e49755b914a2c8f6f8b836adfcc61bf8f9a5b3a3.tar.gz |
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 <Colm.Donelan@arm.com>
Change-Id: I6e7438fcb126ad7a073a226862dc44836c9998b7
Diffstat (limited to 'include/armnn/backends/IBackendInternal.hpp')
-rw-r--r-- | include/armnn/backends/IBackendInternal.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
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 <optimizations/Optimization.hpp> #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<IWorkloadFactory>; using IBackendContextPtr = std::unique_ptr<IBackendContext>; + // This is the bridge between backend and backend profiling we'll keep it in the backend namespace. + using IBackendProfilingContextPtr = std::unique_ptr<armnn::profiling::IBackendProfilingContext>; using OptimizationPtr = std::unique_ptr<Optimization>; using Optimizations = std::vector<OptimizationPtr>; using ILayerSupportSharedPtr = std::shared_ptr<ILayerSupport>; @@ -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; |