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 <Colm.Donelan@arm.com>
Change-Id: I975eaa2093ae91fa623835f65f9e5b25eb65117a
diff --git a/include/armnn/backends/IBackendInternal.hpp b/include/armnn/backends/IBackendInternal.hpp
index 6c919ee..6ad9bba 100644
--- a/include/armnn/backends/IBackendInternal.hpp
+++ b/include/armnn/backends/IBackendInternal.hpp
@@ -80,7 +80,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 IBackendProfilingContextPtr = std::shared_ptr<armnn::profiling::IBackendProfilingContext>;
+ using IBackendProfilingPtr = std::unique_ptr<armnn::profiling::IBackendProfiling>;
using OptimizationPtr = std::unique_ptr<Optimization>;
using Optimizations = std::vector<OptimizationPtr>;
using ILayerSupportSharedPtr = std::shared_ptr<ILayerSupport>;
@@ -126,7 +127,7 @@
/// Create context specifically used for profiling interaction from backends.
virtual IBackendProfilingContextPtr CreateBackendProfilingContext(const IRuntime::CreationOptions& creationOptions,
- armnn::profiling::IBackendProfiling& backendProfiling) const;
+ IBackendProfilingPtr& backendProfiling);
virtual ILayerSupportSharedPtr GetLayerSupport() const = 0;