diff options
author | Colm Donelan <Colm.Donelan@arm.com> | 2020-02-05 17:48:59 +0000 |
---|---|---|
committer | Colm Donelan <colm.donelan@arm.com> | 2020-02-07 09:28:35 +0000 |
commit | 1aff393b359b518925f66901439466f9bc14c49d (patch) | |
tree | 9d31aa1d3dabb4b637093f6fd1a9f1549621c653 /src/profiling/backends/BackendProfiling.cpp | |
parent | 3446057492907d0c7695605a5b9a961a78158d7e (diff) | |
download | armnn-1aff393b359b518925f66901439466f9bc14c49d.tar.gz |
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
Diffstat (limited to 'src/profiling/backends/BackendProfiling.cpp')
-rw-r--r-- | src/profiling/backends/BackendProfiling.cpp | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/profiling/backends/BackendProfiling.cpp b/src/profiling/backends/BackendProfiling.cpp new file mode 100644 index 0000000000..a49122a7a1 --- /dev/null +++ b/src/profiling/backends/BackendProfiling.cpp @@ -0,0 +1,48 @@ +// +// Copyright © 2020 Arm Ltd. All rights reserved. +// SPDX-License-Identifier: MIT +// + +#include "BackendProfiling.hpp" +#include "RegisterBackendCounters.hpp" + +namespace armnn +{ + +namespace profiling +{ + +std::unique_ptr<IRegisterBackendCounters> + BackendProfiling::GetCounterRegistrationInterface(uint16_t currentMaxGlobalCounterID) +{ + return std::make_unique<RegisterBackendCounters>(RegisterBackendCounters(currentMaxGlobalCounterID, m_backendId)); +} + +std::unique_ptr<ISendTimelinePacket> BackendProfiling::GetSendTimelinePacket() +{ + return m_ProfilingService.GetSendTimelinePacket(); +} + +IProfilingGuidGenerator& BackendProfiling::GetProfilingGuidGenerator() +{ + // The profiling service is our Guid Generator. + return m_ProfilingService; +} + +CounterStatus BackendProfiling::GetCounterStatus(uint16_t) +{ + return CounterStatus(); +} + +std::vector<CounterStatus> BackendProfiling::GetActiveCounters() +{ + return std::vector<CounterStatus>(); +} + +bool BackendProfiling::IsProfilingEnabled() const +{ + return m_ProfilingService.IsProfilingEnabled(); +} + +} // namespace profiling +} // namespace armnn |