diff options
author | Jim Flynn <jim.flynn@arm.com> | 2022-01-23 23:57:20 +0000 |
---|---|---|
committer | Jim Flynn <jim.flynn@arm.com> | 2022-02-14 09:51:24 +0000 |
commit | 4c9ed1d974657b8b32c8a86239c105ca54b30be5 (patch) | |
tree | 9f3d59d9626f333e3626c61d17ab984692e43c86 /src/armnn | |
parent | d688e86c5edf19b2de556d198d6cb8688c6919da (diff) | |
download | armnn-4c9ed1d974657b8b32c8a86239c105ca54b30be5.tar.gz |
IVGCVSW-6708 Break Profiling Dependence on IRuntime ExternalProfilingOptions
Change-Id: I30a46f3368bbbf33019eac4fa1245f6ff69deacd
Signed-off-by: Jim Flynn <jim.flynn@arm.com>
Diffstat (limited to 'src/armnn')
-rw-r--r-- | src/armnn/Runtime.cpp | 5 | ||||
-rw-r--r-- | src/armnn/test/RuntimeTests.cpp | 5 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/armnn/Runtime.cpp b/src/armnn/Runtime.cpp index 1abe0f394b..4b9d0aeabb 100644 --- a/src/armnn/Runtime.cpp +++ b/src/armnn/Runtime.cpp @@ -14,6 +14,7 @@ #include <backendsCommon/DynamicBackendUtils.hpp> #include <backendsCommon/memoryOptimizerStrategyLibrary/MemoryOptimizerStrategyLibrary.hpp> #include <armnn/utility/PolymorphicDowncast.hpp> +#include <ProfilingOptionsConverter.hpp> #include <common/include/LabelsAndEventClasses.hpp> @@ -474,7 +475,7 @@ RuntimeImpl::RuntimeImpl(const IRuntime::CreationOptions& options) unique_ptr<armnn::profiling::IBackendProfiling> profilingIface = std::make_unique<armnn::profiling::BackendProfiling>(armnn::profiling::BackendProfiling( - options, m_ProfilingService, id)); + ConvertExternalProfilingOptions(options.m_ProfilingOptions), m_ProfilingService, id)); // Backends may also provide a profiling context. Ask for it now. auto profilingContext = backend->CreateBackendProfilingContext(options, profilingIface); @@ -493,7 +494,7 @@ RuntimeImpl::RuntimeImpl(const IRuntime::CreationOptions& options) BackendRegistryInstance().SetProfilingService(m_ProfilingService); // pass configuration info to the profiling service - m_ProfilingService.ConfigureProfilingService(options.m_ProfilingOptions); + m_ProfilingService.ConfigureProfilingService(ConvertExternalProfilingOptions(options.m_ProfilingOptions)); if (options.m_ProfilingOptions.m_EnableProfiling) { // try to wait for the profiling service to initialise diff --git a/src/armnn/test/RuntimeTests.cpp b/src/armnn/test/RuntimeTests.cpp index 045007b5c9..e175c12b57 100644 --- a/src/armnn/test/RuntimeTests.cpp +++ b/src/armnn/test/RuntimeTests.cpp @@ -6,10 +6,12 @@ #include <armnn/Descriptors.hpp> #include <armnn/IRuntime.hpp> #include <armnn/INetwork.hpp> +#include <ProfilingOptionsConverter.hpp> #include <Processes.hpp> #include <Runtime.hpp> #include <armnn/TypesUtils.hpp> + #include <common/include/LabelsAndEventClasses.hpp> #include <test/ProfilingTestUtils.hpp> @@ -644,7 +646,8 @@ TEST_CASE("ProfilingEnableCpuRef") options.m_ProfilingOptions.m_TimelineEnabled = true; armnn::RuntimeImpl runtime(options); - GetProfilingService(&runtime).ResetExternalProfilingOptions(options.m_ProfilingOptions, false); + GetProfilingService(&runtime).ResetExternalProfilingOptions( + ConvertExternalProfilingOptions(options.m_ProfilingOptions), false); profiling::ProfilingServiceRuntimeHelper profilingServiceHelper(GetProfilingService(&runtime)); profilingServiceHelper.ForceTransitionToState(ProfilingState::NotConnected); |