From 5aa9fd7ac6bf8dad576fa4a0a32aa3dae98d11ab Mon Sep 17 00:00:00 2001 From: Cathal Corbett Date: Fri, 25 Feb 2022 15:33:28 +0000 Subject: IVGCVSW-6704 Change the namespace from armnn::profiling to arm::pipe * Updated ABI version to 29 due to being the first ABI break in 22.05 !android-nn-driver:7226 Signed-off-by: Cathal Corbett Change-Id: I9c50007dcd5b5e792757e7bd1213606df5ffec36 --- src/profiling/ProfilingService.cpp | 40 +++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'src/profiling/ProfilingService.cpp') diff --git a/src/profiling/ProfilingService.cpp b/src/profiling/ProfilingService.cpp index c7ebee2ccf..cef8a6d9ea 100644 --- a/src/profiling/ProfilingService.cpp +++ b/src/profiling/ProfilingService.cpp @@ -15,10 +15,10 @@ #include -namespace armnn +namespace arm { -namespace profiling +namespace pipe { ProfilingGuidGenerator ProfilingService::m_GuidGenerator; @@ -38,7 +38,7 @@ void ProfilingService::ResetGuidGenerator() m_GuidGenerator.Reset(); } -void ProfilingService::ResetExternalProfilingOptions(const armnn::profiling::ProfilingOptions& options, +void ProfilingService::ResetExternalProfilingOptions(const arm::pipe::ProfilingOptions& options, bool resetProfilingService) { // Update the profiling options @@ -60,7 +60,7 @@ bool ProfilingService::IsProfilingEnabled() const } ProfilingState ProfilingService::ConfigureProfilingService( - const armnn::profiling::ProfilingOptions& options, + const ProfilingOptions& options, bool resetProfilingService) { ResetExternalProfilingOptions(options, resetProfilingService); @@ -147,7 +147,7 @@ void ProfilingService::Update() ARMNN_ASSERT(m_ProfilingConnectionFactory); m_ProfilingConnection = m_ProfilingConnectionFactory->GetProfilingConnection(m_Options); } - catch (const Exception& e) + catch (const armnn::Exception& e) { ARMNN_LOG(warning) << "An error has occurred when creating the profiling connection: " << e.what(); @@ -185,7 +185,7 @@ void ProfilingService::Update() break; default: - throw RuntimeException(fmt::format("Unknown profiling service state: {}", + throw armnn::RuntimeException(fmt::format("Unknown profiling service state: {}", static_cast(currentState))); } } @@ -205,14 +205,14 @@ void ProfilingService::Disconnect() break; default: - throw RuntimeException(fmt::format("Unknown profiling service state: {}", - static_cast(currentState))); + throw armnn::RuntimeException(fmt::format("Unknown profiling service state: {}", + static_cast(currentState))); } } // Store a profiling context returned from a backend that support profiling, and register its counters -void ProfilingService::AddBackendProfilingContext(const BackendId backendId, - std::shared_ptr profilingContext) +void ProfilingService::AddBackendProfilingContext(const armnn::BackendId backendId, + std::shared_ptr profilingContext) { ARMNN_ASSERT(profilingContext != nullptr); // Register the backend counters @@ -279,7 +279,7 @@ CaptureData ProfilingService::GetCaptureData() void ProfilingService::SetCaptureData(uint32_t capturePeriod, const std::vector& counterIds, - const std::set& activeBackends) + const std::set& activeBackends) { m_Holder.SetCaptureData(capturePeriod, counterIds, activeBackends); } @@ -344,7 +344,7 @@ void ProfilingService::Initialize() { const Counter* loadedNetworksCounter = m_CounterDirectory.RegisterCounter(armnn::profiling::BACKEND_ID, - armnn::profiling::NETWORK_LOADS, + NETWORK_LOADS, "ArmNN_Runtime", 0, 0, @@ -360,7 +360,7 @@ void ProfilingService::Initialize() { const Counter* unloadedNetworksCounter = m_CounterDirectory.RegisterCounter(armnn::profiling::BACKEND_ID, - armnn::profiling::NETWORK_UNLOADS, + NETWORK_UNLOADS, "ArmNN_Runtime", 0, 0, @@ -376,7 +376,7 @@ void ProfilingService::Initialize() { const Counter* registeredBackendsCounter = m_CounterDirectory.RegisterCounter(armnn::profiling::BACKEND_ID, - armnn::profiling::REGISTERED_BACKENDS, + REGISTERED_BACKENDS, "ArmNN_Runtime", 0, 0, @@ -389,14 +389,14 @@ void ProfilingService::Initialize() // Due to backends being registered before the profiling service becomes active, // we need to set the counter to the correct value here - SetCounterValue(armnn::profiling::REGISTERED_BACKENDS, static_cast(BackendRegistryInstance().Size())); + SetCounterValue(REGISTERED_BACKENDS, static_cast(armnn::BackendRegistryInstance().Size())); } // Register a counter for the number of registered backends if (!m_CounterDirectory.IsCounterRegistered("Backends unregistered")) { const Counter* unregisteredBackendsCounter = m_CounterDirectory.RegisterCounter(armnn::profiling::BACKEND_ID, - armnn::profiling::UNREGISTERED_BACKENDS, + UNREGISTERED_BACKENDS, "ArmNN_Runtime", 0, 0, @@ -412,7 +412,7 @@ void ProfilingService::Initialize() { const Counter* inferencesRunCounter = m_CounterDirectory.RegisterCounter(armnn::profiling::BACKEND_ID, - armnn::profiling::INFERENCES_RUN, + INFERENCES_RUN, "ArmNN_Runtime", 0, 0, @@ -456,7 +456,7 @@ void ProfilingService::Reset() // ...finally reset the profiling state machine m_StateMachine.Reset(); m_BackendProfilingContexts.clear(); - m_MaxGlobalCounterId = armnn::profiling::MAX_ARMNN_COUNTER; + m_MaxGlobalCounterId = MAX_ARMNN_COUNTER; } void ProfilingService::Stop() @@ -541,6 +541,6 @@ ProfilingService::~ProfilingService() { Stop(); } -} // namespace profiling +} // namespace pipe -} // namespace armnn +} // namespace arm -- cgit v1.2.1