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
diff --git a/include/armnn/backends/IBackendInternal.hpp b/include/armnn/backends/IBackendInternal.hpp
index 3533ace..29097b4 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 @@
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 @@
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;