20.05
|
#include <Filesystem.hpp>
#include <ProfilingService.hpp>
#include <Runtime.hpp>
#include "PrintPacketHeaderHandler.hpp"
#include "TestTimelinePacketHandler.hpp"
#include <boost/filesystem.hpp>
#include <boost/numeric/conversion/cast.hpp>
#include <boost/test/unit_test.hpp>
#include <cstdio>
#include <sstream>
#include <sys/stat.h>
Go to the source code of this file.
Functions | |
std::string | UniqueFileName () |
BOOST_AUTO_TEST_CASE (TestFileOnlyProfiling) | |
profilingService | ResetExternalProfilingOptions (options, true) |
profilingService | Update () |
BOOST_CHECK (profilingService.GetCurrentState()==ProfilingState::WaitingForAck) | |
while (profilingService.GetCurrentState() !=ProfilingState::Active &&packetCount< 3) | |
BOOST_CHECK (boost::filesystem::exists(tempPath.c_str())==true) | |
BOOST_CHECK (profilingService.IsCounterRegistered(0)==true) | |
profilingService | IncrementCounterValue (0) |
BOOST_CHECK (profilingService.GetAbsoluteCounterValue(0) > 0) | |
helper | WaitForPacketsSent () |
BOOST_CHECK (armnnUtils::Filesystem::GetFileSize(tempPath.string().c_str()) > 0) | |
BOOST_CHECK (armnnUtils::Filesystem::Remove(tempPath.string().c_str())) | |
Variables | |
boost::filesystem::path | tempFile = UniqueFileName() |
tempPath = tempPath / tempFile | |
armnn::Runtime::CreationOptions::ExternalProfilingOptions | options |
options | m_EnableProfiling = true |
options | m_FileOnly = true |
options | m_IncomingCaptureFile = "" |
options | m_OutgoingCaptureFile = tempPath.string() |
options | m_CapturePeriod = 100 |
FileOnlyHelperService | helper |
armnn::profiling::ProfilingService | profilingService |
uint32_t | packetCount = 0 |
BOOST_AUTO_TEST_CASE | ( | TestFileOnlyProfiling | ) |
Definition at line 50 of file FileOnlyProfilingDecoratorTests.cpp.
References armnn::BackendRegistryInstance(), armnn::BOOST_AUTO_TEST_CASE(), IOutputSlot::Connect(), armnn::CpuRef, INetwork::Create(), armnn::Float32, Runtime::GetDeviceSpec(), IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), Runtime::LoadNetwork(), IRuntime::CreationOptions::ExternalProfilingOptions::m_CapturePeriod, IRuntime::CreationOptions::ExternalProfilingOptions::m_EnableProfiling, IRuntime::CreationOptions::ExternalProfilingOptions::m_FileOnly, IRuntime::CreationOptions::ExternalProfilingOptions::m_LocalPacketHandlers, IRuntime::CreationOptions::m_ProfilingOptions, IRuntime::CreationOptions::ExternalProfilingOptions::m_TimelineEnabled, armnn::Optimize(), IOutputSlot::SetTensorInfo(), armnn::Success, tempFile, tempPath, and UniqueFileName().
BOOST_CHECK | ( | profilingService. | GetCurrentState() = =ProfilingState::WaitingForAck | ) |
Referenced by ArgMinMaxInferOutputShape1dTest(), ArgMinMaxInferOutputShape2dTest(), ArgMinMaxInferOutputShape3dTest(), ArgMinMaxInferOutputShape4dTest(), BatchToSpaceInferOutputShapeTest(), BOOST_AUTO_TEST_CASE(), armnn::BOOST_AUTO_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), TestLayerVisitor::CheckConstTensors(), TestConvolution2dLayerVisitor::CheckDescriptor(), TestDepthwiseConvolution2dLayerVisitor::CheckDescriptor(), TestFullyConnectedLayerVistor::CheckDescriptor(), TestBatchNormalizationLayerVisitor::CheckDescriptor(), TestLstmLayerVisitor::CheckDescriptor(), TestQLstmLayerVisitor::CheckDescriptor(), TestLayerVisitor::CheckLayerName(), TestLayerVisitor::CheckLayerPointer(), TestLayerVisitor::CheckOptionalConstTensors(), ParserFlatbuffersFixture::CheckTensors(), CheckTimelineDirectory(), CheckTimelinePackets(), Convolution2dInferOutputShapeTest(), DepthwiseConvolution2dInferOutputShapeTest(), GetBasePath(), GetSoftmaxProfilerJson(), GetTestFilePath(), PreluInferOutputShapeAlphaBiggerTest(), PreluInferOutputShapeInputBiggerTest(), PreluInferOutputShapeNoMatchTest(), PreluInferOutputShapeSameDimsTest(), QLstmInferOutputShapeTest(), QuantizedLstmEndToEnd(), QuantizedLstmInferOutputShapeTest(), RunSoftmaxProfilerJsonPrinterTest(), SendTimelinePacketToCommandHandler(), SpaceToDepthInferOutputShapeTest(), StackInferOutputShapeFromInputsMatchTest(), StackInferOutputShapeFromInputsNoMatchTest(), StringToSwTraceStringTestHelper(), SwapProfilingConnectionFactoryHelper::SwapProfilingConnectionFactoryHelper(), TransposeConvolution2dInferOutputShapeTest(), ValidateProfilerJson(), VerifyPostOptimisationStructureTestImpl(), VerifyTimelineEntityBinaryPacketData(), VerifyTimelineEventBinaryPacket(), VerifyTimelineEventClassBinaryPacketData(), VerifyTimelineHeaderBinary(), VerifyTimelineLabelBinaryPacketData(), VerifyTimelineRelationshipBinaryPacketData(), while(), and SwapProfilingConnectionFactoryHelper::~SwapProfilingConnectionFactoryHelper().
BOOST_CHECK | ( | boost::filesystem::exists(tempPath.c_str()) | = =true | ) |
BOOST_CHECK | ( | profilingService. | IsCounterRegistered0 = =true | ) |
BOOST_CHECK | ( | profilingService. | GetAbsoluteCounterValue0, |
0 | |||
) |
BOOST_CHECK | ( | armnnUtils::Filesystem::GetFileSize(tempPath.string().c_str()) | , |
0 | |||
) |
BOOST_CHECK | ( | armnnUtils::Filesystem::Remove(tempPath.string().c_str()) | ) |
profilingService IncrementCounterValue | ( | 0 | ) |
Referenced by IWriteCounterValues::~IWriteCounterValues().
profilingService ResetExternalProfilingOptions | ( | options | , |
true | |||
) |
std::string UniqueFileName | ( | ) |
Definition at line 38 of file FileOnlyProfilingDecoratorTests.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
profilingService Update | ( | ) |
helper WaitForPacketsSent | ( | ) |
while | ( | ) |
Definition at line 130 of file FileOnlyProfilingDecoratorTests.cpp.
References armnn::profiling::Active, BOOST_AUTO_TEST_SUITE_END(), BOOST_CHECK(), ProfilingService::GetAbsoluteCounterValue(), ProfilingService::GetCurrentState(), ProfilingService::GetDeltaCounterValue(), armnnUtils::Filesystem::GetFileSize(), ProfilingService::IncrementCounterValue(), ProfilingService::IsCounterRegistered(), armnnUtils::Filesystem::Remove(), and ProfilingService::ResetExternalProfilingOptions().
FileOnlyHelperService helper |
Definition at line 113 of file FileOnlyProfilingDecoratorTests.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
options m_CapturePeriod = 100 |
Definition at line 111 of file FileOnlyProfilingDecoratorTests.cpp.
Referenced by MockBackendProfilingContext::ActivateCounters(), MockBackendProfilingContext::ReportCounterValues(), and MockBackendProfilingContext::TimelineReportingEnabled().
Definition at line 107 of file FileOnlyProfilingDecoratorTests.cpp.
Referenced by InferenceModel< IParser, TDataType >::GetAllQuantizationParams(), InferenceModel< IParser, TDataType >::InferenceModel(), and InferenceModel< IParser, TDataType >::Run().
Definition at line 108 of file FileOnlyProfilingDecoratorTests.cpp.
options m_IncomingCaptureFile = "" |
Definition at line 109 of file FileOnlyProfilingDecoratorTests.cpp.
options m_OutgoingCaptureFile = tempPath.string() |
Definition at line 110 of file FileOnlyProfilingDecoratorTests.cpp.
armnn::Runtime::CreationOptions::ExternalProfilingOptions options |
Definition at line 106 of file FileOnlyProfilingDecoratorTests.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), armnn::BOOST_AUTO_TEST_CASE(), armnnTfLiteParser::ComputeWrappedIndex(), CreateNetworkImpl< IParser >::Create(), TfLiteParser::CreateNetworkFromBinary(), Runtime::GetDeviceSpec(), ProfilingConnectionFactory::GetProfilingConnection(), GetSoftmaxProfilerJson(), InferenceModel< IParser, TDataType >::InferenceModel(), main(), TfLiteParser::OutputShapeOfReshape(), TfLiteParser::OutputShapeOfSqueeze(), ParserFlatbuffersFixture::ParserFlatbuffersFixture(), armnn::PreserveTypeTestImpl(), ProfilingService::ProfilingService(), QLstmEndToEnd(), QuantizedLstmEndToEnd(), NetworkQuantizer::Refine(), ProfilingService::ResetExternalProfilingOptions(), RunCLTuning(), armnn::TestQuantizeConvolution2d(), armnn::TestQuantizeDepthwiseConvolution2d(), armnn::TestQuantizeTransposeConvolution2d(), armnn::ValidateFullyConnectedLayer(), VerifyPostOptimisationStructureTestImpl(), armnn::VisitLayersTopologically(), IInferenceTestCase::~IInferenceTestCase(), and IProfilingConnectionFactory::~IProfilingConnectionFactory().
uint32_t packetCount = 0 |
Definition at line 129 of file FileOnlyProfilingDecoratorTests.cpp.
Referenced by SwapProfilingConnectionFactoryHelper::WaitForPacketsSent().
armnn::profiling::ProfilingService profilingService |
Definition at line 116 of file FileOnlyProfilingDecoratorTests.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), LoadedNetwork::MakeLoadedNetwork(), BackendRegistry::SetProfilingService(), VerifyTimelineLabelBinaryPacketData(), and LoadedNetwork::~LoadedNetwork().
boost::filesystem::path tempFile = UniqueFileName() |
Definition at line 104 of file FileOnlyProfilingDecoratorTests.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
tempPath = tempPath / tempFile |
Definition at line 105 of file FileOnlyProfilingDecoratorTests.cpp.
Referenced by BOOST_AUTO_TEST_CASE().