diff options
author | alered01 <Alex.Redshaw@arm.com> | 2020-05-07 14:58:29 +0100 |
---|---|---|
committer | Alex Redshaw <Alex.Redshaw@arm.com> | 2020-05-22 11:05:07 +0000 |
commit | a7227ac8fa45c9ea0da0e1ed66bb0c551c61095b (patch) | |
tree | b0d1af7bed0e1d2de1bb7f2e64b67c56d43c10dc /src/armnn/Runtime.cpp | |
parent | 985ef1f2baf052a4d845b4fc7b6019ee7cd5e846 (diff) | |
download | armnn-a7227ac8fa45c9ea0da0e1ed66bb0c551c61095b.tar.gz |
Adding more performance metrics
* Implemented CLTuning flow for ExecuteNetwork tests
* Added --tuning-path to specify tuning file to use/create
* Added --tuning-level to specify tuning level to use as well as enable extra tuning run to generate the tuning file
* Fixed issue where TuningLevel was being parsed incorrectly
* Added measurements for initialization, network parsing, network optimization, tuning, and shutdown
* Added flag to control number of iterations inference is run for
Signed-off-by: alered01 <Alex.Redshaw@arm.com>
Change-Id: Ic739ff26e136e32aff9f0995217c1c3207008ca4
Diffstat (limited to 'src/armnn/Runtime.cpp')
-rw-r--r-- | src/armnn/Runtime.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/armnn/Runtime.cpp b/src/armnn/Runtime.cpp index dbdd409784..b1b7d51d7c 100644 --- a/src/armnn/Runtime.cpp +++ b/src/armnn/Runtime.cpp @@ -7,6 +7,7 @@ #include <armnn/Version.hpp> #include <armnn/BackendRegistry.hpp> #include <armnn/Logging.hpp> +#include <armnn/utility/Timer.hpp> #include <armnn/backends/IBackendContext.hpp> #include <backendsCommon/DynamicBackendUtils.hpp> @@ -171,6 +172,7 @@ Runtime::Runtime(const CreationOptions& options) : m_NetworkIdCounter(0), m_ProfilingService(*this) { + const auto start_time = armnn::GetTimeNow(); ARMNN_LOG(info) << "ArmNN v" << ARMNN_VERSION << "\n"; if ( options.m_ProfilingOptions.m_TimelineEnabled && !options.m_ProfilingOptions.m_EnableProfiling ) @@ -225,10 +227,14 @@ Runtime::Runtime(const CreationOptions& options) m_ProfilingService.ConfigureProfilingService(options.m_ProfilingOptions); m_DeviceSpec.AddSupportedBackends(supportedBackends); + + ARMNN_LOG(info) << "Initialization time: " << std::setprecision(2) + << std::fixed << armnn::GetTimeDuration(start_time).count() << " ms\n"; } Runtime::~Runtime() { + const auto start_time = armnn::GetTimeNow(); std::vector<int> networkIDs; try { @@ -272,6 +278,8 @@ Runtime::~Runtime() m_BackendContexts.clear(); BackendRegistryInstance().SetProfilingService(armnn::EmptyOptional()); + ARMNN_LOG(info) << "Shutdown time: " << std::setprecision(2) + << std::fixed << armnn::GetTimeDuration(start_time).count() << " ms\n"; } LoadedNetwork* Runtime::GetLoadedNetworkPtr(NetworkId networkId) const |