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/backends | |
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/backends')
-rw-r--r-- | src/backends/cl/ClBackendContext.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/backends/cl/ClBackendContext.cpp b/src/backends/cl/ClBackendContext.cpp index bfe93bdc01..42f42b3023 100644 --- a/src/backends/cl/ClBackendContext.cpp +++ b/src/backends/cl/ClBackendContext.cpp @@ -79,7 +79,7 @@ TuningLevel ParseTuningLevel(const BackendOptions::Var& value, TuningLevel defau { if (value.IsInt()) { - int v = value.IsInt(); + int v = value.AsInt(); if (v > static_cast<int>(TuningLevel::Exhaustive) || v < static_cast<int>(TuningLevel::None)) { @@ -218,18 +218,18 @@ ClBackendContext::ClBackendContext(const IRuntime::CreationOptions& options) ConfigureTuner(*(m_Tuner.get()), tuningLevel); - if (!m_TuningFile.empty()) + if (!m_TuningFile.empty() && tuningLevel == TuningLevel::None) { try { m_Tuner->load_from_file(m_TuningFile.c_str()); - } catch (const std::exception& e) + } + catch (const std::exception& e) { ARMNN_LOG(warning) << "Could not load GpuAcc tuner data file."; } - - tuner = m_Tuner.get(); } + tuner = m_Tuner.get(); } m_ClContextControlWrapper = std::make_unique<ClContextControlWrapper>( |