From 9c85b41a9fcb3c64d7a686373e7dde75630ccd49 Mon Sep 17 00:00:00 2001 From: Jim Flynn Date: Wed, 16 Mar 2022 00:27:43 +0000 Subject: IVGCVSW-6852 Break the remaining dependencies on Arm NN in the profiling code Change-Id: I18b8ca22896567904768170350ee5eb22edd4a22 Signed-off-by: Jim Flynn --- src/armnn/LoadedNetwork.cpp | 2 +- src/armnn/Runtime.cpp | 21 ++++++++++++++++----- src/armnn/test/RuntimeTests.cpp | 2 +- 3 files changed, 18 insertions(+), 7 deletions(-) (limited to 'src/armnn') diff --git a/src/armnn/LoadedNetwork.cpp b/src/armnn/LoadedNetwork.cpp index a720769873..6d08fc321e 100644 --- a/src/armnn/LoadedNetwork.cpp +++ b/src/armnn/LoadedNetwork.cpp @@ -266,7 +266,7 @@ LoadedNetwork::LoadedNetwork(std::unique_ptr net, // Mark the network with a start of life event timelineUtils->RecordEvent(networkGuid, LabelsAndEventClasses::ARMNN_PROFILING_SOL_EVENT_CLASS); // and with the process ID - int processID = arm::pipe::GetCurrentId(); + int processID = arm::pipe::GetCurrentProcessId(); std::stringstream ss; ss << processID; timelineUtils->MarkEntityWithLabel(networkGuid, ss.str(), LabelsAndEventClasses::PROCESS_ID_GUID); diff --git a/src/armnn/Runtime.cpp b/src/armnn/Runtime.cpp index 57bceddbfd..e7d8e482ab 100644 --- a/src/armnn/Runtime.cpp +++ b/src/armnn/Runtime.cpp @@ -6,23 +6,29 @@ #include "ArmNNProfilingServiceInitialiser.hpp" #include "Runtime.hpp" +#include + #include #include #include #include -#include #include + +#include + +#include +#include + +#include + #include #include -#include -#include #include #include -#include using namespace armnn; using namespace std; @@ -311,7 +317,12 @@ RuntimeImpl::RuntimeImpl(const IRuntime::CreationOptions& options) : m_NetworkIdCounter(0) { m_ProfilingService = arm::pipe::IProfilingService::CreateProfilingService( - arm::pipe::MAX_ARMNN_COUNTER, *this, *this); + arm::pipe::MAX_ARMNN_COUNTER, + *this, + arm::pipe::ARMNN_SOFTWARE_INFO, + arm::pipe::ARMNN_SOFTWARE_VERSION, + arm::pipe::ARMNN_HARDWARE_VERSION, + *this); const auto start_time = armnn::GetTimeNow(); ARMNN_LOG(info) << "ArmNN v" << ARMNN_VERSION; if ( options.m_ProfilingOptions.m_TimelineEnabled && !options.m_ProfilingOptions.m_EnableProfiling ) diff --git a/src/armnn/test/RuntimeTests.cpp b/src/armnn/test/RuntimeTests.cpp index fcfcc48f96..3cbe8848df 100644 --- a/src/armnn/test/RuntimeTests.cpp +++ b/src/armnn/test/RuntimeTests.cpp @@ -736,7 +736,7 @@ TEST_CASE("ProfilingEnableCpuRef") offset); // Process ID Label - int processID = arm::pipe::GetCurrentId(); + int processID = arm::pipe::GetCurrentProcessId(); std::stringstream ss; ss << processID; std::string processIdLabel = ss.str(); -- cgit v1.2.1