diff options
Diffstat (limited to 'src/profiling')
9 files changed, 44 insertions, 44 deletions
diff --git a/src/profiling/FileOnlyProfilingConnection.hpp b/src/profiling/FileOnlyProfilingConnection.hpp index 8bde0abdea..9ad2c94e07 100644 --- a/src/profiling/FileOnlyProfilingConnection.hpp +++ b/src/profiling/FileOnlyProfilingConnection.hpp @@ -50,7 +50,7 @@ private: class FileOnlyProfilingConnection : public IProfilingConnection, public IInternalProfilingConnection { public: - explicit FileOnlyProfilingConnection(const Runtime::CreationOptions::ExternalProfilingOptions& options) + explicit FileOnlyProfilingConnection(const IRuntime::CreationOptions::ExternalProfilingOptions& options) : m_Options(options) , m_Endianness(TargetEndianness::LeWire) // Set a sensible default. // StreamMetaDataProcessor will set a real value. @@ -103,7 +103,7 @@ private: void ForwardPacketToHandlers(arm::pipe::Packet& packet); void ServiceLocalHandlers(); - Runtime::CreationOptions::ExternalProfilingOptions m_Options; + IRuntime::CreationOptions::ExternalProfilingOptions m_Options; std::queue<arm::pipe::Packet> m_PacketQueue; TargetEndianness m_Endianness; diff --git a/src/profiling/ProfilingConnectionDumpToFileDecorator.cpp b/src/profiling/ProfilingConnectionDumpToFileDecorator.cpp index 84aae9d39f..9ac7cc03e4 100644 --- a/src/profiling/ProfilingConnectionDumpToFileDecorator.cpp +++ b/src/profiling/ProfilingConnectionDumpToFileDecorator.cpp @@ -18,7 +18,7 @@ namespace profiling ProfilingConnectionDumpToFileDecorator::ProfilingConnectionDumpToFileDecorator( std::unique_ptr<IProfilingConnection> connection, - const Runtime::CreationOptions::ExternalProfilingOptions& options, + const IRuntime::CreationOptions::ExternalProfilingOptions& options, bool ignoreFailures) : m_Connection(std::move(connection)) , m_Options(options) diff --git a/src/profiling/ProfilingConnectionDumpToFileDecorator.hpp b/src/profiling/ProfilingConnectionDumpToFileDecorator.hpp index aedb28571e..f1b9324d2b 100644 --- a/src/profiling/ProfilingConnectionDumpToFileDecorator.hpp +++ b/src/profiling/ProfilingConnectionDumpToFileDecorator.hpp @@ -27,7 +27,7 @@ class ProfilingConnectionDumpToFileDecorator : public IProfilingConnection public: ProfilingConnectionDumpToFileDecorator(std::unique_ptr<IProfilingConnection> connection, - const Runtime::CreationOptions::ExternalProfilingOptions& options, + const IRuntime::CreationOptions::ExternalProfilingOptions& options, bool ignoreFailures = false); ~ProfilingConnectionDumpToFileDecorator(); @@ -51,11 +51,11 @@ private: void Fail(const std::string& errorMessage); - std::unique_ptr<IProfilingConnection> m_Connection; - Runtime::CreationOptions::ExternalProfilingOptions m_Options; - std::ofstream m_IncomingDumpFileStream; - std::ofstream m_OutgoingDumpFileStream; - bool m_IgnoreFileErrors; + std::unique_ptr<IProfilingConnection> m_Connection; + IRuntime::CreationOptions::ExternalProfilingOptions m_Options; + std::ofstream m_IncomingDumpFileStream; + std::ofstream m_OutgoingDumpFileStream; + bool m_IgnoreFileErrors; }; } // namespace profiling diff --git a/src/profiling/ProfilingConnectionFactory.cpp b/src/profiling/ProfilingConnectionFactory.cpp index 96f7ed4b06..b5af5a7efa 100644 --- a/src/profiling/ProfilingConnectionFactory.cpp +++ b/src/profiling/ProfilingConnectionFactory.cpp @@ -16,7 +16,7 @@ namespace profiling { std::unique_ptr<IProfilingConnection> ProfilingConnectionFactory::GetProfilingConnection( - const Runtime::CreationOptions::ExternalProfilingOptions& options) const + const IRuntime::CreationOptions::ExternalProfilingOptions& options) const { // Before proceed to create the IProfilingConnection, check if the file format is supported if (!(options.m_FileFormat == "binary")) diff --git a/src/profiling/test/FileOnlyProfilingDecoratorTests.cpp b/src/profiling/test/FileOnlyProfilingDecoratorTests.cpp index 943650a8f1..813bb49b72 100644 --- a/src/profiling/test/FileOnlyProfilingDecoratorTests.cpp +++ b/src/profiling/test/FileOnlyProfilingDecoratorTests.cpp @@ -45,7 +45,7 @@ BOOST_AUTO_TEST_CASE(TestFileOnlyProfiling) { // Enable m_FileOnly but also provide ILocalPacketHandler which should consume the packets. // This won't dump anything to file. - armnn::Runtime::CreationOptions creationOptions; + armnn::IRuntime::CreationOptions creationOptions; creationOptions.m_ProfilingOptions.m_EnableProfiling = true; creationOptions.m_ProfilingOptions.m_FileOnly = true; creationOptions.m_ProfilingOptions.m_CapturePeriod = 100; @@ -53,7 +53,7 @@ BOOST_AUTO_TEST_CASE(TestFileOnlyProfiling) ILocalPacketHandlerSharedPtr localPacketHandlerPtr = std::make_shared<TestTimelinePacketHandler>(); creationOptions.m_ProfilingOptions.m_LocalPacketHandlers.push_back(localPacketHandlerPtr); - armnn::Runtime runtime(creationOptions); + armnn::RuntimeImpl runtime(creationOptions); // ensure the GUID generator is reset to zero GetProfilingService(&runtime).ResetGuidGenerator(); @@ -164,7 +164,7 @@ BOOST_AUTO_TEST_CASE(DumpOutgoingValidFileEndToEnd) // Make sure the file does not exist at this point BOOST_CHECK(!fs::exists(tempPath)); - armnn::Runtime::CreationOptions options; + armnn::IRuntime::CreationOptions options; options.m_ProfilingOptions.m_EnableProfiling = true; options.m_ProfilingOptions.m_FileOnly = true; options.m_ProfilingOptions.m_IncomingCaptureFile = ""; @@ -175,7 +175,7 @@ BOOST_AUTO_TEST_CASE(DumpOutgoingValidFileEndToEnd) ILocalPacketHandlerSharedPtr localPacketHandlerPtr = std::make_shared<TestTimelinePacketHandler>(); options.m_ProfilingOptions.m_LocalPacketHandlers.push_back(localPacketHandlerPtr); - armnn::Runtime runtime(options); + armnn::RuntimeImpl runtime(options); // ensure the GUID generator is reset to zero GetProfilingService(&runtime).ResetGuidGenerator(); diff --git a/src/profiling/test/ProfilingConnectionDumpToFileDecoratorTests.cpp b/src/profiling/test/ProfilingConnectionDumpToFileDecoratorTests.cpp index 0feed4138f..2ebba5d8d1 100644 --- a/src/profiling/test/ProfilingConnectionDumpToFileDecoratorTests.cpp +++ b/src/profiling/test/ProfilingConnectionDumpToFileDecoratorTests.cpp @@ -78,7 +78,7 @@ BOOST_AUTO_TEST_SUITE(ProfilingConnectionDumpToFileDecoratorTests) BOOST_AUTO_TEST_CASE(DumpIncomingInvalidFile) { - armnn::Runtime::CreationOptions::ExternalProfilingOptions options; + armnn::IRuntime::CreationOptions::ExternalProfilingOptions options; options.m_IncomingCaptureFile = "/"; options.m_OutgoingCaptureFile = ""; ProfilingConnectionDumpToFileDecorator decorator(std::make_unique<DummyProfilingConnection>(), options, false); @@ -87,7 +87,7 @@ BOOST_AUTO_TEST_CASE(DumpIncomingInvalidFile) BOOST_AUTO_TEST_CASE(DumpIncomingInvalidFileIgnoreErrors) { - armnn::Runtime::CreationOptions::ExternalProfilingOptions options; + armnn::IRuntime::CreationOptions::ExternalProfilingOptions options; options.m_IncomingCaptureFile = "/"; options.m_OutgoingCaptureFile = ""; ProfilingConnectionDumpToFileDecorator decorator(std::make_unique<DummyProfilingConnection>(), options, true); @@ -98,7 +98,7 @@ BOOST_AUTO_TEST_CASE(DumpIncomingValidFile) { fs::path fileName = armnnUtils::Filesystem::NamedTempFile("Armnn-DumpIncomingValidFileTest-TempFile"); - armnn::Runtime::CreationOptions::ExternalProfilingOptions options; + armnn::IRuntime::CreationOptions::ExternalProfilingOptions options; options.m_IncomingCaptureFile = fileName.string(); options.m_OutgoingCaptureFile = ""; @@ -122,7 +122,7 @@ BOOST_AUTO_TEST_CASE(DumpIncomingValidFile) BOOST_AUTO_TEST_CASE(DumpOutgoingInvalidFile) { - armnn::Runtime::CreationOptions::ExternalProfilingOptions options; + armnn::IRuntime::CreationOptions::ExternalProfilingOptions options; options.m_IncomingCaptureFile = ""; options.m_OutgoingCaptureFile = "/"; ProfilingConnectionDumpToFileDecorator decorator(std::make_unique<DummyProfilingConnection>(), options, false); @@ -131,7 +131,7 @@ BOOST_AUTO_TEST_CASE(DumpOutgoingInvalidFile) BOOST_AUTO_TEST_CASE(DumpOutgoingInvalidFileIgnoreErrors) { - armnn::Runtime::CreationOptions::ExternalProfilingOptions options; + armnn::IRuntime::CreationOptions::ExternalProfilingOptions options; options.m_IncomingCaptureFile = ""; options.m_OutgoingCaptureFile = "/"; @@ -146,7 +146,7 @@ BOOST_AUTO_TEST_CASE(DumpOutgoingValidFile) { fs::path fileName = armnnUtils::Filesystem::NamedTempFile("Armnn-DumpOutgoingValidFileTest-TempFile"); - armnn::Runtime::CreationOptions::ExternalProfilingOptions options; + armnn::IRuntime::CreationOptions::ExternalProfilingOptions options; options.m_IncomingCaptureFile = ""; options.m_OutgoingCaptureFile = fileName.string(); diff --git a/src/profiling/test/ProfilingTestUtils.cpp b/src/profiling/test/ProfilingTestUtils.cpp index 93d0b10d4b..faa86e55bf 100644 --- a/src/profiling/test/ProfilingTestUtils.cpp +++ b/src/profiling/test/ProfilingTestUtils.cpp @@ -366,7 +366,7 @@ void VerifyPostOptimisationStructureTestImpl(armnn::BackendId backendId) armnn::IRuntime::CreationOptions options; options.m_ProfilingOptions.m_EnableProfiling = true; options.m_ProfilingOptions.m_TimelineEnabled = true; - armnn::Runtime runtime(options); + armnn::RuntimeImpl runtime(options); GetProfilingService(&runtime).ResetExternalProfilingOptions(options.m_ProfilingOptions, false); profiling::ProfilingServiceRuntimeHelper profilingServiceHelper(GetProfilingService(&runtime)); diff --git a/src/profiling/test/ProfilingTests.cpp b/src/profiling/test/ProfilingTests.cpp index ff45a454c3..6999650fba 100644 --- a/src/profiling/test/ProfilingTests.cpp +++ b/src/profiling/test/ProfilingTests.cpp @@ -655,7 +655,7 @@ BOOST_AUTO_TEST_CASE(CaptureDataMethods) BOOST_AUTO_TEST_CASE(CheckProfilingServiceDisabled) { - armnn::Runtime::CreationOptions::ExternalProfilingOptions options; + armnn::IRuntime::CreationOptions::ExternalProfilingOptions options; armnn::profiling::ProfilingService profilingService; profilingService.ResetExternalProfilingOptions(options, true); BOOST_CHECK(profilingService.GetCurrentState() == ProfilingState::Uninitialised); @@ -665,7 +665,7 @@ BOOST_AUTO_TEST_CASE(CheckProfilingServiceDisabled) BOOST_AUTO_TEST_CASE(CheckProfilingServiceCounterDirectory) { - armnn::Runtime::CreationOptions::ExternalProfilingOptions options; + armnn::IRuntime::CreationOptions::ExternalProfilingOptions options; armnn::profiling::ProfilingService profilingService; profilingService.ResetExternalProfilingOptions(options, true); @@ -688,7 +688,7 @@ BOOST_AUTO_TEST_CASE(CheckProfilingServiceCounterDirectory) BOOST_AUTO_TEST_CASE(CheckProfilingServiceCounterValues) { - armnn::Runtime::CreationOptions::ExternalProfilingOptions options; + armnn::IRuntime::CreationOptions::ExternalProfilingOptions options; options.m_EnableProfiling = true; armnn::profiling::ProfilingService profilingService; profilingService.ResetExternalProfilingOptions(options, true); @@ -2006,7 +2006,7 @@ BOOST_AUTO_TEST_CASE(CheckProfilingServiceNotActive) armnn::IRuntime::CreationOptions options; options.m_ProfilingOptions.m_EnableProfiling = true; - armnn::Runtime runtime(options); + armnn::RuntimeImpl runtime(options); profiling::ProfilingServiceRuntimeHelper profilingServiceHelper(GetProfilingService(&runtime)); profilingServiceHelper.ForceTransitionToState(ProfilingState::NotConnected); profilingServiceHelper.ForceTransitionToState(ProfilingState::WaitingForAck); @@ -2548,7 +2548,7 @@ BOOST_AUTO_TEST_CASE(CheckProfilingServiceGoodConnectionAcknowledgedPacket) unsigned int streamMetadataPacketsize = GetStreamMetaDataPacketSize(); // Reset the profiling service to the uninitialized state - armnn::Runtime::CreationOptions::ExternalProfilingOptions options; + armnn::IRuntime::CreationOptions::ExternalProfilingOptions options; options.m_EnableProfiling = true; armnn::profiling::ProfilingService profilingService; profilingService.ResetExternalProfilingOptions(options, true); @@ -2608,7 +2608,7 @@ BOOST_AUTO_TEST_CASE(CheckProfilingServiceGoodConnectionAcknowledgedPacket) BOOST_AUTO_TEST_CASE(CheckProfilingServiceGoodRequestCounterDirectoryPacket) { // Reset the profiling service to the uninitialized state - armnn::Runtime::CreationOptions::ExternalProfilingOptions options; + armnn::IRuntime::CreationOptions::ExternalProfilingOptions options; options.m_EnableProfiling = true; armnn::profiling::ProfilingService profilingService; profilingService.ResetExternalProfilingOptions(options, true); @@ -2666,7 +2666,7 @@ BOOST_AUTO_TEST_CASE(CheckProfilingServiceGoodRequestCounterDirectoryPacket) BOOST_AUTO_TEST_CASE(CheckProfilingServiceBadPeriodicCounterSelectionPacketInvalidCounterUid) { // Reset the profiling service to the uninitialized state - armnn::Runtime::CreationOptions::ExternalProfilingOptions options; + armnn::IRuntime::CreationOptions::ExternalProfilingOptions options; options.m_EnableProfiling = true; armnn::profiling::ProfilingService profilingService; profilingService.ResetExternalProfilingOptions(options, true); @@ -2745,7 +2745,7 @@ BOOST_AUTO_TEST_CASE(CheckProfilingServiceBadPeriodicCounterSelectionPacketInval BOOST_AUTO_TEST_CASE(CheckProfilingServiceGoodPeriodicCounterSelectionPacketNoCounters) { // Reset the profiling service to the uninitialized state - armnn::Runtime::CreationOptions::ExternalProfilingOptions options; + armnn::IRuntime::CreationOptions::ExternalProfilingOptions options; options.m_EnableProfiling = true; armnn::profiling::ProfilingService profilingService; profilingService.ResetExternalProfilingOptions(options, true); @@ -2810,7 +2810,7 @@ BOOST_AUTO_TEST_CASE(CheckProfilingServiceGoodPeriodicCounterSelectionPacketNoCo BOOST_AUTO_TEST_CASE(CheckProfilingServiceGoodPeriodicCounterSelectionPacketSingleCounter) { // Reset the profiling service to the uninitialized state - armnn::Runtime::CreationOptions::ExternalProfilingOptions options; + armnn::IRuntime::CreationOptions::ExternalProfilingOptions options; options.m_EnableProfiling = true; armnn::profiling::ProfilingService profilingService; profilingService.ResetExternalProfilingOptions(options, true); @@ -2887,7 +2887,7 @@ BOOST_AUTO_TEST_CASE(CheckProfilingServiceGoodPeriodicCounterSelectionPacketSing BOOST_AUTO_TEST_CASE(CheckProfilingServiceGoodPeriodicCounterSelectionPacketMultipleCounters) { // Reset the profiling service to the uninitialized state - armnn::Runtime::CreationOptions::ExternalProfilingOptions options; + armnn::IRuntime::CreationOptions::ExternalProfilingOptions options; options.m_EnableProfiling = true; armnn::profiling::ProfilingService profilingService; profilingService.ResetExternalProfilingOptions(options, true); @@ -2966,7 +2966,7 @@ BOOST_AUTO_TEST_CASE(CheckProfilingServiceGoodPeriodicCounterSelectionPacketMult BOOST_AUTO_TEST_CASE(CheckProfilingServiceDisconnect) { // Reset the profiling service to the uninitialized state - armnn::Runtime::CreationOptions::ExternalProfilingOptions options; + armnn::IRuntime::CreationOptions::ExternalProfilingOptions options; options.m_EnableProfiling = true; armnn::profiling::ProfilingService profilingService; profilingService.ResetExternalProfilingOptions(options, true); @@ -3024,7 +3024,7 @@ BOOST_AUTO_TEST_CASE(CheckProfilingServiceDisconnect) BOOST_AUTO_TEST_CASE(CheckProfilingServiceGoodPerJobCounterSelectionPacket) { // Reset the profiling service to the uninitialized state - armnn::Runtime::CreationOptions::ExternalProfilingOptions options; + armnn::IRuntime::CreationOptions::ExternalProfilingOptions options; options.m_EnableProfiling = true; armnn::profiling::ProfilingService profilingService; profilingService.ResetExternalProfilingOptions(options, true); @@ -3091,7 +3091,7 @@ BOOST_AUTO_TEST_CASE(CheckProfilingServiceGoodPerJobCounterSelectionPacket) BOOST_AUTO_TEST_CASE(CheckConfigureProfilingServiceOn) { - armnn::Runtime::CreationOptions::ExternalProfilingOptions options; + armnn::IRuntime::CreationOptions::ExternalProfilingOptions options; options.m_EnableProfiling = true; armnn::profiling::ProfilingService profilingService; BOOST_CHECK(profilingService.GetCurrentState() == ProfilingState::Uninitialised); @@ -3105,7 +3105,7 @@ BOOST_AUTO_TEST_CASE(CheckConfigureProfilingServiceOn) BOOST_AUTO_TEST_CASE(CheckConfigureProfilingServiceOff) { - armnn::Runtime::CreationOptions::ExternalProfilingOptions options; + armnn::IRuntime::CreationOptions::ExternalProfilingOptions options; armnn::profiling::ProfilingService profilingService; BOOST_CHECK(profilingService.GetCurrentState() == ProfilingState::Uninitialised); profilingService.ConfigureProfilingService(options); @@ -3120,7 +3120,7 @@ BOOST_AUTO_TEST_CASE(CheckProfilingServiceEnabled) { // Locally reduce log level to "Warning", as this test needs to parse a warning message from the standard output LogLevelSwapper logLevelSwapper(armnn::LogSeverity::Warning); - armnn::Runtime::CreationOptions::ExternalProfilingOptions options; + armnn::IRuntime::CreationOptions::ExternalProfilingOptions options; options.m_EnableProfiling = true; armnn::profiling::ProfilingService profilingService; profilingService.ResetExternalProfilingOptions(options, true); @@ -3151,7 +3151,7 @@ BOOST_AUTO_TEST_CASE(CheckProfilingServiceEnabledRuntime) { // Locally reduce log level to "Warning", as this test needs to parse a warning message from the standard output LogLevelSwapper logLevelSwapper(armnn::LogSeverity::Warning); - armnn::Runtime::CreationOptions::ExternalProfilingOptions options; + armnn::IRuntime::CreationOptions::ExternalProfilingOptions options; armnn::profiling::ProfilingService profilingService; profilingService.ResetExternalProfilingOptions(options, true); BOOST_CHECK(profilingService.GetCurrentState() == ProfilingState::Uninitialised); @@ -3193,7 +3193,7 @@ BOOST_AUTO_TEST_CASE(CheckProfilingServiceBadConnectionAcknowledgedPacket) StreamRedirector streamRedirector(std::cout, ss.rdbuf()); // Reset the profiling service to the uninitialized state - armnn::Runtime::CreationOptions::ExternalProfilingOptions options; + armnn::IRuntime::CreationOptions::ExternalProfilingOptions options; options.m_EnableProfiling = true; armnn::profiling::ProfilingService profilingService; profilingService.ResetExternalProfilingOptions(options, true); @@ -3255,7 +3255,7 @@ BOOST_AUTO_TEST_CASE(CheckProfilingServiceBadRequestCounterDirectoryPacket) StreamRedirector streamRedirector(std::cout, ss.rdbuf()); // Reset the profiling service to the uninitialized state - armnn::Runtime::CreationOptions::ExternalProfilingOptions options; + armnn::IRuntime::CreationOptions::ExternalProfilingOptions options; options.m_EnableProfiling = true; armnn::profiling::ProfilingService profilingService; profilingService.ResetExternalProfilingOptions(options, true); @@ -3319,7 +3319,7 @@ BOOST_AUTO_TEST_CASE(CheckProfilingServiceBadPeriodicCounterSelectionPacket) StreamRedirector streamRedirector(std::cout, ss.rdbuf()); // Reset the profiling service to the uninitialized state - armnn::Runtime::CreationOptions::ExternalProfilingOptions options; + armnn::IRuntime::CreationOptions::ExternalProfilingOptions options; options.m_EnableProfiling = true; armnn::profiling::ProfilingService profilingService; profilingService.ResetExternalProfilingOptions(options, true); @@ -3420,7 +3420,7 @@ BOOST_AUTO_TEST_CASE(CheckRegisterBackendCounters) armnn::BackendId cpuRefId(armnn::Compute::CpuRef); // Reset the profiling service to the uninitialized state - armnn::Runtime::CreationOptions::ExternalProfilingOptions options; + armnn::IRuntime::CreationOptions::ExternalProfilingOptions options; options.m_EnableProfiling = true; ProfilingService profilingService; profilingService.ResetExternalProfilingOptions(options, true); @@ -3604,7 +3604,7 @@ BOOST_AUTO_TEST_CASE(CheckCounterStatusQuery) BOOST_AUTO_TEST_CASE(CheckRegisterCounters) { - armnn::Runtime::CreationOptions options; + armnn::IRuntime::CreationOptions options; options.m_ProfilingOptions.m_EnableProfiling = true; MockBufferManager mockBuffer(1024); @@ -3666,7 +3666,7 @@ BOOST_AUTO_TEST_CASE(CheckFileFormat) { LogLevelSwapper logLevelSwapper(armnn::LogSeverity::Warning); // Create profiling options. - armnn::Runtime::CreationOptions::ExternalProfilingOptions options; + armnn::IRuntime::CreationOptions::ExternalProfilingOptions options; options.m_EnableProfiling = true; // Check the default value set to binary BOOST_CHECK(options.m_FileFormat == "binary"); diff --git a/src/profiling/test/SendTimelinePacketTests.cpp b/src/profiling/test/SendTimelinePacketTests.cpp index 7b68bb9753..244f23dfb4 100644 --- a/src/profiling/test/SendTimelinePacketTests.cpp +++ b/src/profiling/test/SendTimelinePacketTests.cpp @@ -427,7 +427,7 @@ BOOST_AUTO_TEST_CASE(GetGuidsFromProfilingService) { armnn::IRuntime::CreationOptions options; options.m_ProfilingOptions.m_EnableProfiling = true; - armnn::Runtime runtime(options); + armnn::RuntimeImpl runtime(options); armnn::profiling::ProfilingService profilingService(runtime); profilingService.ResetExternalProfilingOptions(options.m_ProfilingOptions, true); |