blob: e0e0f58e7d3bc168f18063899c93b0bd5cead587 [file] [log] [blame]
Colm Donelan1aff3932020-02-05 17:48:59 +00001//
2// Copyright © 2020 Arm Ltd. All rights reserved.
3// SPDX-License-Identifier: MIT
4//
5
James Conroy2dcd3fe2020-02-06 18:34:52 +00006#pragma once
7
8#include "ProfilingService.hpp"
Colm Donelan1aff3932020-02-05 17:48:59 +00009#include <armnn/backends/profiling/IBackendProfiling.hpp>
10
11namespace armnn
12{
13
14namespace profiling
15{
16
17class BackendProfiling : public IBackendProfiling
18{
19public:
James Conroy2dcd3fe2020-02-06 18:34:52 +000020 BackendProfiling(const IRuntime::CreationOptions& options,
21 ProfilingService& profilingService,
22 const BackendId& backendId)
23 : m_Options(options),
24 m_ProfilingService(profilingService),
25 m_BackendId(backendId) {}
Colm Donelan1aff3932020-02-05 17:48:59 +000026
27 ~BackendProfiling()
28 {}
29
30 std::unique_ptr<IRegisterBackendCounters>
James Conroy2dcd3fe2020-02-06 18:34:52 +000031 GetCounterRegistrationInterface(uint16_t currentMaxGlobalCounterID) override;
Colm Donelan1aff3932020-02-05 17:48:59 +000032
33 std::unique_ptr<ISendTimelinePacket> GetSendTimelinePacket() override;
34
35 IProfilingGuidGenerator& GetProfilingGuidGenerator() override;
36
37 void ReportCounters(const std::vector<Timestamp>&) override
38 {}
39
40 CounterStatus GetCounterStatus(uint16_t backendCounterId) override;
41
42 std::vector<CounterStatus> GetActiveCounters() override;
43
44 bool IsProfilingEnabled() const override;
45
46private:
James Conroy2dcd3fe2020-02-06 18:34:52 +000047 IRuntime::CreationOptions m_Options;
Colm Donelan1aff3932020-02-05 17:48:59 +000048 ProfilingService& m_ProfilingService;
James Conroy2dcd3fe2020-02-06 18:34:52 +000049 BackendId m_BackendId;
Colm Donelan1aff3932020-02-05 17:48:59 +000050};
51} // namespace profiling
52} // namespace armnn