ArmNN
 20.02
ProfilingTestUtils.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2019 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #pragma once
7 
8 #include "ProfilingUtils.hpp"
9 
10 #include <armnn/BackendId.hpp>
11 #include <armnn/Optional.hpp>
12 #include <armnn/Types.hpp>
13 #include <BufferManager.hpp>
14 #include <ProfilingService.hpp>
15 
16 using namespace armnn;
17 using namespace armnn::profiling;
18 
19 inline unsigned int OffsetToNextWord(unsigned int numberOfBytes);
20 
21 void VerifyTimelineHeaderBinary(const unsigned char* readableData,
22  unsigned int& offset,
23  uint32_t packetDataLength);
24 
26  const std::string& label,
27  const unsigned char* readableData,
28  unsigned int& offset);
29 
31  const unsigned char* readableData,
32  unsigned int& offset);
33 
35  Optional<ProfilingGuid> relationshipGuid,
36  Optional<ProfilingGuid> headGuid,
37  Optional<ProfilingGuid> tailGuid,
38  const unsigned char* readableData,
39  unsigned int& offset);
40 
42  const unsigned char* readableData,
43  unsigned int& offset);
44 
47  Optional<ProfilingGuid> eventGuid,
48  const unsigned char* readableData,
49  unsigned int& offset);
50 
52 
53 namespace armnn
54 {
55 
56 namespace profiling
57 {
58 
60 {
61 public:
63  ~ProfilingServiceRuntimeHelper() = default;
64 
66  {
67  return GetBufferManager(ProfilingService::Instance());
68  }
69 };
70 
71 } // namespace profiling
72 
73 } // namespace armnn
74 
static ProfilingService & Instance()
unsigned int OffsetToNextWord(unsigned int numberOfBytes)
void VerifyTimelineLabelBinaryPacketData(Optional< ProfilingGuid > guid, const std::string &label, const unsigned char *readableData, unsigned int &offset)
void VerifyPostOptimisationStructureTestImpl(armnn::BackendId backendId)
Copyright (c) 2020 ARM Limited.
void VerifyTimelineRelationshipBinaryPacketData(ProfilingRelationshipType relationshipType, Optional< ProfilingGuid > relationshipGuid, Optional< ProfilingGuid > headGuid, Optional< ProfilingGuid > tailGuid, const unsigned char *readableData, unsigned int &offset)
void VerifyTimelineEventClassBinaryPacketData(ProfilingGuid guid, const unsigned char *readableData, unsigned int &offset)
void VerifyTimelineHeaderBinary(const unsigned char *readableData, unsigned int &offset, uint32_t packetDataLength)
void VerifyTimelineEntityBinaryPacketData(Optional< ProfilingGuid > guid, const unsigned char *readableData, unsigned int &offset)
void VerifyTimelineEventBinaryPacket(Optional< uint64_t > timestamp, Optional< std::thread::id > threadId, Optional< ProfilingGuid > eventGuid, const unsigned char *readableData, unsigned int &offset)