aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/Runtime.cpp
diff options
context:
space:
mode:
authorFinn Williams <Finn.Williams@arm.com>2020-04-09 16:05:28 +0100
committerFinn Williams <Finn.Williams@arm.com>2020-04-10 14:48:56 +0100
commitfe5a24beeef6e9a41366e694f41093565e748048 (patch)
tree72c660062f9c8287e54176dfbd8c5aa0269f2e51 /src/armnn/Runtime.cpp
parentbb446e576e120512d5752a5d6dc1ddc636f563ba (diff)
downloadarmnn-fe5a24beeef6e9a41366e694f41093565e748048.tar.gz
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 <Finn.Williams@arm.com> Change-Id: I9e6066b78d1f782cfaf27c11571c0ec5cb5d126f
Diffstat (limited to 'src/armnn/Runtime.cpp')
-rw-r--r--src/armnn/Runtime.cpp21
1 files changed, 6 insertions, 15 deletions
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();