diff options
-rw-r--r-- | packaging/inference-engine-armnn.spec | 2 | ||||
-rw-r--r-- | src/inference_engine_armnn.cpp | 28 |
2 files changed, 20 insertions, 10 deletions
diff --git a/packaging/inference-engine-armnn.spec b/packaging/inference-engine-armnn.spec index 83e7a44..7347c76 100644 --- a/packaging/inference-engine-armnn.spec +++ b/packaging/inference-engine-armnn.spec @@ -1,7 +1,7 @@ Name: inference-engine-armnn Summary: ARM Neural Network Runtime based implementation of inference-engine-interface Version: 0.0.1 -Release: 3 +Release: 4 Group: Multimedia/Libraries License: Apache-2.0 ExclusiveArch: %{arm} aarch64 diff --git a/src/inference_engine_armnn.cpp b/src/inference_engine_armnn.cpp index 29ba8c4..5409b44 100644 --- a/src/inference_engine_armnn.cpp +++ b/src/inference_engine_armnn.cpp @@ -281,26 +281,36 @@ namespace ARMNNImpl LOGI("CLTuner tuning file name is %s", tune_path.c_str()); - // If CLTuner is read only mode then set INFERENCE_ENGINE_CLTUNER_READ - // to TuningLevel. - // Ps. if TuningLevel is INFERENCE_ENGINE_CLTUNER_READ then + // If CLTuner is read only mode then skip to set TuningLevel + // if user skipped "TuningLevel" options, + // then "TuningLevel::None" will be used as tuningLevel internally in armnn. + // Ps. if TuningLevel is "TuningLevel::None" then // ARMCL will read a tuned file for inference. - if (mCLTuner.update == false) { - LOGI("CLTuner mode is read only."); - mCLTuner.tuning_mode = INFERENCE_ENGINE_CLTUNER_READ; - } - creation_options.m_BackendOptions.emplace_back( armnn::BackendOptions { "GpuAcc", { {"FastMathEnabled", true}, - {"TuningLevel", static_cast<int>(ConvertTuningType(mCLTuner.tuning_mode))}, {"TuningFile", tune_path.c_str()} } } ); + + // If TuningLevel is set, + // ARMCL will generate a tuned file as specified by user. + if (mCLTuner.update) { + LOGI("CLTuner tuning mode is set %d", mCLTuner.tuning_mode); + creation_options.m_BackendOptions.emplace_back( + armnn::BackendOptions + { + "GpuAcc", + { + {"TuningLevel", static_cast<int>(ConvertTuningType(mCLTuner.tuning_mode))} + } + } + ); + } } else { creation_options.m_BackendOptions.emplace_back( armnn::BackendOptions |