20.02
|
#include "ProfilingTestUtils.hpp"
#include "ProfilingUtils.hpp"
#include <armnn/Descriptors.hpp>
#include <LabelsAndEventClasses.hpp>
#include <ProfilingService.hpp>
#include <boost/test/unit_test.hpp>
Go to the source code of this file.
Functions | |
unsigned int | OffsetToNextWord (unsigned int numberOfBytes) |
void | VerifyTimelineHeaderBinary (const unsigned char *readableData, unsigned int &offset, uint32_t packetDataLength) |
void | VerifyTimelineLabelBinaryPacketData (Optional< ProfilingGuid > guid, const std::string &label, const unsigned char *readableData, unsigned int &offset) |
void | VerifyTimelineEventClassBinaryPacketData (ProfilingGuid guid, const unsigned char *readableData, unsigned int &offset) |
void | VerifyTimelineRelationshipBinaryPacketData (ProfilingRelationshipType relationshipType, Optional< ProfilingGuid > relationshipGuid, Optional< ProfilingGuid > headGuid, Optional< ProfilingGuid > tailGuid, const unsigned char *readableData, unsigned int &offset) |
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) |
void | VerifyPostOptimisationStructureTestImpl (armnn::BackendId backendId) |
|
inline |
Definition at line 15 of file ProfilingTestUtils.cpp.
References armnn::profiling::uint32_t_size.
Referenced by VerifyTimelineLabelBinaryPacketData().
void VerifyPostOptimisationStructureTestImpl | ( | armnn::BackendId | backendId | ) |
Definition at line 290 of file ProfilingTestUtils.cpp.
References LabelsAndEventClasses::ARMNN_PROFILING_EOL_EVENT_CLASS, LabelsAndEventClasses::ARMNN_PROFILING_SOL_EVENT_CLASS, LabelsAndEventClasses::BACKENDID_GUID, BOOST_CHECK(), ProfilingService::ConfigureProfilingService(), IOutputSlot::Connect(), LabelsAndEventClasses::CONNECTION_GUID, INetwork::Create(), IRuntime::Create(), armnn::profiling::DataLink, armnn::profiling::ExecutionLink, armnn::Float32, BackendId::Get(), IConnectableLayer::GetGuid(), IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), BufferManager::GetReadableBuffer(), LabelsAndEventClasses::INFERENCE_GUID, ProfilingService::Instance(), armnn::profiling::LabelLink, Convolution2dDescriptor::m_BiasEnabled, IRuntime::CreationOptions::ExternalProfilingOptions::m_EnableProfiling, Convolution2dDescriptor::m_PadBottom, Convolution2dDescriptor::m_PadLeft, Convolution2dDescriptor::m_PadRight, Convolution2dDescriptor::m_PadTop, IRuntime::CreationOptions::m_ProfilingOptions, Convolution2dDescriptor::m_StrideX, Convolution2dDescriptor::m_StrideY, BufferManager::MarkRead(), LabelsAndEventClasses::NAME_GUID, armnn::Optimize(), options, profilingService, armnn::profiling::RetentionLink, IOutputSlot::SetTensorInfo(), armnn::Success, LabelsAndEventClasses::TYPE_GUID, VerifyTimelineEntityBinaryPacketData(), VerifyTimelineEventBinaryPacket(), VerifyTimelineHeaderBinary(), VerifyTimelineLabelBinaryPacketData(), VerifyTimelineRelationshipBinaryPacketData(), and LabelsAndEventClasses::WORKLOAD_EXECUTION_GUID.
Referenced by BOOST_AUTO_TEST_CASE().
void VerifyTimelineEntityBinaryPacketData | ( | Optional< ProfilingGuid > | guid, |
const unsigned char * | readableData, | ||
unsigned int & | offset | ||
) |
Definition at line 201 of file ProfilingTestUtils.cpp.
References BOOST_CHECK(), OptionalBase::has_value(), armnn::profiling::ReadUint32(), armnn::profiling::ReadUint64(), armnn::profiling::uint32_t_size, and OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().
Referenced by BOOST_AUTO_TEST_CASE(), and VerifyPostOptimisationStructureTestImpl().
void VerifyTimelineEventBinaryPacket | ( | Optional< uint64_t > | timestamp, |
Optional< std::thread::id > | threadId, | ||
Optional< ProfilingGuid > | eventGuid, | ||
const unsigned char * | readableData, | ||
unsigned int & | offset | ||
) |
Definition at line 232 of file ProfilingTestUtils.cpp.
References BOOST_CHECK(), OptionalBase::has_value(), armnn::profiling::ReadBytes(), armnn::profiling::ReadUint32(), armnn::profiling::ReadUint64(), armnn::profiling::uint32_t_size, and OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().
Referenced by BOOST_AUTO_TEST_CASE(), and VerifyPostOptimisationStructureTestImpl().
void VerifyTimelineEventClassBinaryPacketData | ( | ProfilingGuid | guid, |
const unsigned char * | readableData, | ||
unsigned int & | offset | ||
) |
Definition at line 97 of file ProfilingTestUtils.cpp.
References BOOST_CHECK(), armnn::profiling::ReadUint32(), armnn::profiling::ReadUint64(), and armnn::profiling::uint32_t_size.
Referenced by BOOST_AUTO_TEST_CASE().
void VerifyTimelineHeaderBinary | ( | const unsigned char * | readableData, |
unsigned int & | offset, | ||
uint32_t | packetDataLength | ||
) |
Definition at line 28 of file ProfilingTestUtils.cpp.
References BOOST_CHECK(), armnn::profiling::ReadUint32(), and armnn::profiling::uint32_t_size.
Referenced by BOOST_AUTO_TEST_CASE(), and VerifyPostOptimisationStructureTestImpl().
void VerifyTimelineLabelBinaryPacketData | ( | Optional< ProfilingGuid > | guid, |
const std::string & | label, | ||
const unsigned char * | readableData, | ||
unsigned int & | offset | ||
) |
Definition at line 56 of file ProfilingTestUtils.cpp.
References BOOST_CHECK(), OptionalBase::has_value(), armnn::numeric_cast(), OffsetToNextWord(), armnn::profiling::ReadUint32(), armnn::profiling::ReadUint64(), armnn::profiling::uint32_t_size, and OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().
Referenced by BOOST_AUTO_TEST_CASE(), and VerifyPostOptimisationStructureTestImpl().
void VerifyTimelineRelationshipBinaryPacketData | ( | ProfilingRelationshipType | relationshipType, |
Optional< ProfilingGuid > | relationshipGuid, | ||
Optional< ProfilingGuid > | headGuid, | ||
Optional< ProfilingGuid > | tailGuid, | ||
const unsigned char * | readableData, | ||
unsigned int & | offset | ||
) |
Definition at line 120 of file ProfilingTestUtils.cpp.
References BOOST_CHECK(), OptionalBase::has_value(), armnn::profiling::ReadUint32(), armnn::profiling::ReadUint64(), armnn::profiling::uint32_t_size, and OptionalReferenceSwitch< std::is_reference< T >::value, T >::value().
Referenced by BOOST_AUTO_TEST_CASE(), and VerifyPostOptimisationStructureTestImpl().