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/backends/backendsCommon/test/BackendProfilingTests.cpp | |
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/backends/backendsCommon/test/BackendProfilingTests.cpp')
-rw-r--r-- | src/backends/backendsCommon/test/BackendProfilingTests.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/backends/backendsCommon/test/BackendProfilingTests.cpp b/src/backends/backendsCommon/test/BackendProfilingTests.cpp index b40964c89a..9769b4f7a1 100644 --- a/src/backends/backendsCommon/test/BackendProfilingTests.cpp +++ b/src/backends/backendsCommon/test/BackendProfilingTests.cpp @@ -10,6 +10,7 @@ #include "MockBackendId.hpp" #include "PeriodicCounterCapture.hpp" #include "PeriodicCounterSelectionCommandHandler.hpp" +#include "ProfilingOptionsConverter.hpp" #include "ProfilingStateMachine.hpp" #include "ProfilingUtils.hpp" #include "RequestCounterDirectoryCommandHandler.hpp" @@ -20,6 +21,7 @@ #include <armnn/BackendId.hpp> #include <armnn/Logging.hpp> #include <armnn/profiling/ISendTimelinePacket.hpp> +#include <armnn/profiling/ProfilingOptions.hpp> #include <doctest/doctest.h> #include <vector> @@ -140,7 +142,8 @@ TEST_CASE("BackendProfilingCounterRegisterMockBackendTest") CHECK(counterMap.GetGlobalId(4, mockId) == 9 + shiftedId); CHECK(counterMap.GetGlobalId(5, mockId) == 10 + shiftedId); options.m_ProfilingOptions.m_EnableProfiling = false; - GetProfilingService(&runtime).ResetExternalProfilingOptions(options.m_ProfilingOptions, true); + GetProfilingService(&runtime).ResetExternalProfilingOptions( + ConvertExternalProfilingOptions(options.m_ProfilingOptions), true); } TEST_CASE("TestBackendCounters") @@ -155,8 +158,8 @@ TEST_CASE("TestBackendCounters") const armnn::BackendId cpuAccId(armnn::Compute::CpuAcc); const armnn::BackendId gpuAccId(armnn::Compute::GpuAcc); - armnn::IRuntime::CreationOptions options; - options.m_ProfilingOptions.m_EnableProfiling = true; + ProfilingOptions options; + options.m_EnableProfiling = true; armnn::profiling::ProfilingService profilingService; @@ -403,8 +406,8 @@ TEST_CASE("TestBackendCounterLogging") const armnn::BackendId cpuAccId(armnn::Compute::CpuAcc); const armnn::BackendId gpuAccId(armnn::Compute::GpuAcc); - armnn::IRuntime::CreationOptions options; - options.m_ProfilingOptions.m_EnableProfiling = true; + ProfilingOptions options; + options.m_EnableProfiling = true; armnn::profiling::ProfilingService profilingService; @@ -459,7 +462,8 @@ TEST_CASE("BackendProfilingContextGetSendTimelinePacket") armnn::IRuntime::CreationOptions options; options.m_ProfilingOptions.m_EnableProfiling = true; armnn::profiling::ProfilingService profilingService; - profilingService.ConfigureProfilingService(options.m_ProfilingOptions, true); + profilingService.ConfigureProfilingService( + ConvertExternalProfilingOptions(options.m_ProfilingOptions), true); armnn::MockBackendInitialiser initialiser; // Create a runtime. During this the mock backend will be registered and context returned. @@ -483,7 +487,8 @@ TEST_CASE("BackendProfilingContextGetSendTimelinePacket") // Reset the profiling servie after the test. options.m_ProfilingOptions.m_EnableProfiling = false; - profilingService.ResetExternalProfilingOptions(options.m_ProfilingOptions, true); + profilingService.ResetExternalProfilingOptions( + ConvertExternalProfilingOptions(options.m_ProfilingOptions), true); } TEST_CASE("GetProfilingGuidGenerator") |