20.02
|
#include "../FileOnlyProfilingConnection.hpp"
#include <ProfilingService.hpp>
#include <Runtime.hpp>
#include <Filesystem.hpp>
#include <armnn/utility/IgnoreUnused.hpp>
#include <boost/filesystem.hpp>
#include <boost/numeric/conversion/cast.hpp>
#include <boost/test/unit_test.hpp>
#include <cstdio>
#include <fstream>
#include <sstream>
#include <sys/stat.h>
Go to the source code of this file.
Functions | |
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.GetCounterValue(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 = boost::filesystem::unique_path() |
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 |
ProfilingService & | profilingService = ProfilingService::Instance() |
uint32_t | packetCount = 0 |
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(), TestLayerVisitor::CheckLayerName(), TestLayerVisitor::CheckLayerPointer(), TestLayerVisitor::CheckOptionalConstTensors(), ParserFlatbuffersFixture::CheckTensors(), Convolution2dInferOutputShapeTest(), DepthwiseConvolution2dInferOutputShapeTest(), GetBasePath(), GetSoftmaxProfilerJson(), GetTestFilePath(), PreluInferOutputShapeAlphaBiggerTest(), PreluInferOutputShapeInputBiggerTest(), PreluInferOutputShapeNoMatchTest(), PreluInferOutputShapeSameDimsTest(), 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. | GetCounterValue0, |
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 | |||
) |
profilingService Update | ( | ) |
helper WaitForPacketsSent | ( | ) |
while | ( | ) |
Definition at line 69 of file FileOnlyProfilingDecoratorTests.cpp.
References armnn::profiling::Active, BOOST_AUTO_TEST_SUITE_END(), BOOST_CHECK(), ProfilingService::GetCounterValue(), ProfilingService::GetCurrentState(), armnnUtils::Filesystem::GetFileSize(), ProfilingService::IncrementCounterValue(), ProfilingService::IsCounterRegistered(), armnnUtils::Filesystem::Remove(), and ProfilingService::ResetExternalProfilingOptions().
FileOnlyHelperService helper |
Definition at line 52 of file FileOnlyProfilingDecoratorTests.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
options m_CapturePeriod = 100 |
Definition at line 50 of file FileOnlyProfilingDecoratorTests.cpp.
Referenced by MockBackendProfilingContext::ActivateCounters(), MockBackendProfilingContext::EnableProfiling(), and MockBackendProfilingContext::ReportCounterValues().
Definition at line 46 of file FileOnlyProfilingDecoratorTests.cpp.
Referenced by InferenceModel< IParser, TDataType >::GetAllQuantizationParams(), InferenceModel< IParser, TDataType >::InferenceModel(), and InferenceModel< IParser, TDataType >::Run().
Definition at line 47 of file FileOnlyProfilingDecoratorTests.cpp.
options m_IncomingCaptureFile = "" |
Definition at line 48 of file FileOnlyProfilingDecoratorTests.cpp.
options m_OutgoingCaptureFile = tempPath.string() |
Definition at line 49 of file FileOnlyProfilingDecoratorTests.cpp.
armnn::Runtime::CreationOptions::ExternalProfilingOptions options |
Definition at line 45 of file FileOnlyProfilingDecoratorTests.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), armnn::BOOST_AUTO_TEST_CASE(), CreateNetworkImpl< IParser >::Create(), TfLiteParser::CreateNetworkFromBinary(), Runtime::GetDeviceSpec(), ProfilingConnectionFactory::GetProfilingConnection(), GetSoftmaxProfilerJson(), InferenceModel< IParser, TDataType >::InferenceModel(), ProfilingService::Instance(), main(), TfLiteParser::OutputShapeOfReshape(), TfLiteParser::OutputShapeOfSqueeze(), ParserFlatbuffersFixture::ParserFlatbuffersFixture(), armnn::PreserveTypeTestImpl(), QuantizedLstmEndToEnd(), NetworkQuantizer::Refine(), ProfilingService::ResetExternalProfilingOptions(), armnn::TestQuantizeConvolution2d(), armnn::TestQuantizeDepthwiseConvolution2d(), armnn::TestQuantizeTransposeConvolution2d(), armnn::ValidateFullyConnectedLayer(), VerifyPostOptimisationStructureTestImpl(), armnn::VisitLayersTopologically(), IInferenceTestCase::~IInferenceTestCase(), and IProfilingConnectionFactory::~IProfilingConnectionFactory().
uint32_t packetCount = 0 |
Definition at line 68 of file FileOnlyProfilingDecoratorTests.cpp.
Referenced by SwapProfilingConnectionFactoryHelper::WaitForPacketsSent().
ProfilingService& profilingService = ProfilingService::Instance() |
Definition at line 55 of file FileOnlyProfilingDecoratorTests.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), and VerifyPostOptimisationStructureTestImpl().
boost::filesystem::path tempFile = boost::filesystem::unique_path() |
Definition at line 43 of file FileOnlyProfilingDecoratorTests.cpp.
tempPath = tempPath / tempFile |
Definition at line 44 of file FileOnlyProfilingDecoratorTests.cpp.