From fe5a24beeef6e9a41366e694f41093565e748048 Mon Sep 17 00:00:00 2001 From: Finn Williams Date: Thu, 9 Apr 2020 16:05:28 +0100 Subject: IVGCVSW-4666 Call EnableProfiling when state switches to active * Move the call to EnableProfiling() into ConnectionAcknowledgedHandler * Fix an issue with MockGatord forcing some command handlers to be quiet * Add some small unrelated improvements and typo fixes to the periodic counter command handlers Signed-off-by: Finn Williams Change-Id: I9e6066b78d1f782cfaf27c11571c0ec5cb5d126f --- src/armnn/Runtime.cpp | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'src/armnn') diff --git a/src/armnn/Runtime.cpp b/src/armnn/Runtime.cpp index 32c7c39f8a..483eea7165 100644 --- a/src/armnn/Runtime.cpp +++ b/src/armnn/Runtime.cpp @@ -178,9 +178,6 @@ Runtime::Runtime(const CreationOptions& options) throw RuntimeException("It is not possible to enable timeline reporting without profiling being enabled"); } - // pass configuration info to the profiling service - m_ProfilingService.ConfigureProfilingService(options.m_ProfilingOptions); - // Load any available/compatible dynamic backend before the runtime // goes through the backend registry LoadDynamicBackends(options.m_DynamicBackendsPath); @@ -213,24 +210,19 @@ Runtime::Runtime(const CreationOptions& options) // Backends that don't support profiling will return a null profiling context. if (profilingContext) { - // Enable profiling on the backend and assert that it returns true - if(profilingContext->EnableProfiling(true)) - { - // Pass the context onto the profiling service. - m_ProfilingService.AddBackendProfilingContext(id, profilingContext); - } - else - { - throw BackendProfilingException("Unable to enable profiling on Backend Id: " + id.Get()); - } + // Pass the context onto the profiling service. + m_ProfilingService.AddBackendProfilingContext(id, profilingContext); } } catch (const BackendUnavailableException&) { // Ignore backends which are unavailable } - } + + // pass configuration info to the profiling service + m_ProfilingService.ConfigureProfilingService(options.m_ProfilingOptions); + m_DeviceSpec.AddSupportedBackends(supportedBackends); } @@ -273,7 +265,6 @@ Runtime::~Runtime() } } - // Clear all dynamic backends. DynamicBackendUtils::DeregisterDynamicBackends(m_DeviceSpec.GetDynamicBackends()); m_DeviceSpec.ClearDynamicBackends(); -- cgit v1.2.1