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/backends/README.md | 2 +- .../backendsCommon/test/BackendProfilingTests.cpp | 34 +++++++++++----------- src/backends/backendsCommon/test/MockBackend.hpp | 12 ++++---- 3 files changed, 24 insertions(+), 24 deletions(-) (limited to 'src/backends') diff --git a/src/backends/README.md b/src/backends/README.md index 7105319f2a..a8baa15cfd 100644 --- a/src/backends/README.md +++ b/src/backends/README.md @@ -114,7 +114,7 @@ The interface functions to be implemented are: const IMemoryManagerSharedPtr& memoryManager = nullptr) const = 0; virtual IBackendContextPtr CreateBackendContext(const IRuntime::CreationOptions&) const = 0; virtual IBackendProfilingContextPtr CreateBackendProfilingContext(const IRuntime::CreationOptions& creationOptions, - armnn::profiling::IBackendProfiling& backendProfiling) const = 0; + arm::pipe::IBackendProfiling& backendProfiling) const = 0; virtual ILayerSupportSharedPtr GetLayerSupport() const = 0; virtual Optimizations GetOptimizations() const = 0; virtual SubgraphUniquePtr OptimizeSubgraph(const SubgraphView& subgraph, bool& optimizationAttempted) const; diff --git a/src/backends/backendsCommon/test/BackendProfilingTests.cpp b/src/backends/backendsCommon/test/BackendProfilingTests.cpp index 9769b4f7a1..3651696fd3 100644 --- a/src/backends/backendsCommon/test/BackendProfilingTests.cpp +++ b/src/backends/backendsCommon/test/BackendProfilingTests.cpp @@ -30,7 +30,7 @@ #include #include -using namespace armnn::profiling; +using namespace arm::pipe; class ReadCounterVals : public IReadCounterValues { @@ -134,7 +134,7 @@ TEST_CASE("BackendProfilingCounterRegisterMockBackendTest") // Check if the MockBackends 3 dummy counters {0, 1, 2-5 (four cores)} are registered armnn::BackendId mockId = armnn::MockBackendId(); - const armnn::profiling::ICounterMappings& counterMap = GetProfilingService(&runtime).GetCounterMappings(); + const ICounterMappings& counterMap = GetProfilingService(&runtime).GetCounterMappings(); CHECK(counterMap.GetGlobalId(0, mockId) == 5 + shiftedId); CHECK(counterMap.GetGlobalId(1, mockId) == 6 + shiftedId); CHECK(counterMap.GetGlobalId(2, mockId) == 7 + shiftedId); @@ -161,20 +161,20 @@ TEST_CASE("TestBackendCounters") ProfilingOptions options; options.m_EnableProfiling = true; - armnn::profiling::ProfilingService profilingService; + ProfilingService profilingService; - std::unique_ptr cpuBackendProfilingPtr = + std::unique_ptr cpuBackendProfilingPtr = std::make_unique(options, profilingService, cpuAccId); - std::unique_ptr gpuBackendProfilingPtr = + std::unique_ptr gpuBackendProfilingPtr = std::make_unique(options, profilingService, gpuAccId); - std::shared_ptr cpuProfilingContextPtr = + std::shared_ptr cpuProfilingContextPtr = std::make_shared(cpuBackendProfilingPtr); - std::shared_ptr gpuProfilingContextPtr = + std::shared_ptr gpuProfilingContextPtr = std::make_shared(gpuBackendProfilingPtr); std::unordered_map> backendProfilingContexts; + std::shared_ptr> backendProfilingContexts; backendProfilingContexts[cpuAccId] = cpuProfilingContextPtr; backendProfilingContexts[gpuAccId] = gpuProfilingContextPtr; @@ -409,16 +409,16 @@ TEST_CASE("TestBackendCounterLogging") ProfilingOptions options; options.m_EnableProfiling = true; - armnn::profiling::ProfilingService profilingService; + ProfilingService profilingService; - std::unique_ptr cpuBackendProfilingPtr = + std::unique_ptr cpuBackendProfilingPtr = std::make_unique(options, profilingService, cpuAccId); - std::shared_ptr cpuProfilingContextPtr = + std::shared_ptr cpuProfilingContextPtr = std::make_shared(cpuBackendProfilingPtr); std::unordered_map> backendProfilingContexts; + std::shared_ptr> backendProfilingContexts; uint16_t globalId = 5; counterIdMap.RegisterMapping(globalId, 0, cpuAccId); @@ -461,7 +461,7 @@ TEST_CASE("BackendProfilingContextGetSendTimelinePacket") // Reset the profiling service to the uninitialized state armnn::IRuntime::CreationOptions options; options.m_ProfilingOptions.m_EnableProfiling = true; - armnn::profiling::ProfilingService profilingService; + ProfilingService profilingService; profilingService.ConfigureProfilingService( ConvertExternalProfilingOptions(options.m_ProfilingOptions), true); @@ -478,7 +478,7 @@ TEST_CASE("BackendProfilingContextGetSendTimelinePacket") // Now for the meat of the test. We're just going to send a random packet and make sure there // are no exceptions or errors. The sending of packets is already tested in SendTimelinePacketTests. - std::unique_ptr timelinePacket = + std::unique_ptr timelinePacket = backendProfilingIface->GetSendTimelinePacket(); // Send TimelineEntityClassBinaryPacket const uint64_t entityBinaryPacketProfilingGuid = 123456u; @@ -509,9 +509,9 @@ TEST_CASE("GetProfilingGuidGenerator") CHECK(backendProfilingIface); // Get the Guid generator and check the getting two Guid's results in the second being greater than the first. - armnn::profiling::IProfilingGuidGenerator& guidGenerator = backendProfilingIface->GetProfilingGuidGenerator(); - const armnn::profiling::ProfilingDynamicGuid& firstGuid = guidGenerator.NextGuid(); - const armnn::profiling::ProfilingDynamicGuid& secondGuid = guidGenerator.NextGuid(); + IProfilingGuidGenerator& guidGenerator = backendProfilingIface->GetProfilingGuidGenerator(); + const ProfilingDynamicGuid& firstGuid = guidGenerator.NextGuid(); + const ProfilingDynamicGuid& secondGuid = guidGenerator.NextGuid(); CHECK(secondGuid > firstGuid); // Reset the profiling servie after the test. diff --git a/src/backends/backendsCommon/test/MockBackend.hpp b/src/backends/backendsCommon/test/MockBackend.hpp index df133dfed2..9b7b2f37c4 100644 --- a/src/backends/backendsCommon/test/MockBackend.hpp +++ b/src/backends/backendsCommon/test/MockBackend.hpp @@ -26,7 +26,7 @@ public: ~MockBackendInitialiser(); }; -class MockBackendProfilingContext : public profiling::IBackendProfilingContext +class MockBackendProfilingContext : public arm::pipe::IBackendProfilingContext { public: MockBackendProfilingContext(IBackendInternal::IBackendProfilingPtr& backendProfiling) @@ -44,7 +44,7 @@ public: uint16_t RegisterCounters(uint16_t currentMaxGlobalCounterId) { - std::unique_ptr counterRegistrar = + std::unique_ptr counterRegistrar = m_BackendProfiling->GetCounterRegistrationInterface(static_cast(currentMaxGlobalCounterId)); std::string categoryName("MockCounters"); @@ -77,17 +77,17 @@ public: return armnn::Optional(); } - std::vector ReportCounterValues() + std::vector ReportCounterValues() { - std::vector counterValues; + std::vector counterValues; for (auto counterId : m_ActiveCounters) { - counterValues.emplace_back(profiling::CounterValue{ counterId, counterId + 1u }); + counterValues.emplace_back(arm::pipe::CounterValue{ counterId, counterId + 1u }); } uint64_t timestamp = m_CapturePeriod; - return { profiling::Timestamp{ timestamp, counterValues } }; + return { arm::pipe::Timestamp{ timestamp, counterValues } }; } bool EnableProfiling(bool) -- cgit v1.2.1