diff options
Diffstat (limited to 'include/armnn')
-rw-r--r-- | include/armnn/backends/IBackendInternal.hpp | 5 | ||||
-rw-r--r-- | include/armnn/backends/profiling/IBackendProfiling.hpp | 20 | ||||
-rw-r--r-- | include/armnn/backends/profiling/IBackendProfilingContext.hpp | 1 |
3 files changed, 13 insertions, 13 deletions
diff --git a/include/armnn/backends/IBackendInternal.hpp b/include/armnn/backends/IBackendInternal.hpp index 6c919ee5d4..6ad9bba546 100644 --- a/include/armnn/backends/IBackendInternal.hpp +++ b/include/armnn/backends/IBackendInternal.hpp @@ -80,7 +80,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 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 @@ public: /// 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; diff --git a/include/armnn/backends/profiling/IBackendProfiling.hpp b/include/armnn/backends/profiling/IBackendProfiling.hpp index 4c463a8128..d3c52996f4 100644 --- a/include/armnn/backends/profiling/IBackendProfiling.hpp +++ b/include/armnn/backends/profiling/IBackendProfiling.hpp @@ -68,27 +68,25 @@ public: class IBackendProfiling { -protected: - IBackendProfiling(const IRuntime::CreationOptions&) - {} - public: virtual ~IBackendProfiling() {} - IRegisterBackendCounters& GetCounterRegistrationInterface(uint16_t currentMaxGlobalCounterID); + virtual std::unique_ptr<IRegisterBackendCounters> + GetCounterRegistrationInterface(uint16_t currentMaxGlobalCounterID) = 0; + + virtual std::unique_ptr<ISendTimelinePacket> GetSendTimelinePacket() = 0; - ISendTimelinePacket& GetSendTimelinePacket(); + virtual IProfilingGuidGenerator& GetProfilingGuidGenerator() = 0; - IProfilingGuidGenerator& GetProfilingGuidGenerator(); + virtual void ReportCounters(const std::vector<Timestamp>& counterValues) = 0; - void ReportCounters(const std::vector<Timestamp>& counterValues); + virtual CounterStatus GetCounterStatus(uint16_t backendCounterId) = 0; - CounterStatus GetCounterStatus(uint16_t backendCounterId); + virtual std::vector<CounterStatus> GetActiveCounters() = 0; - std::vector<CounterStatus> GetActiveCounters(); + virtual bool IsProfilingEnabled() const = 0; - bool IsProfilingEnabled() const; }; } // namespace profiling } // namespace armnn
\ No newline at end of file diff --git a/include/armnn/backends/profiling/IBackendProfilingContext.hpp b/include/armnn/backends/profiling/IBackendProfilingContext.hpp index d5d918322e..33c8bba91b 100644 --- a/include/armnn/backends/profiling/IBackendProfilingContext.hpp +++ b/include/armnn/backends/profiling/IBackendProfilingContext.hpp @@ -4,6 +4,7 @@ // #pragma once +#include "IBackendProfiling.hpp" #include <armnn/IRuntime.hpp> #include <vector> |