From: Hyunsoo Park Date: Mon, 25 Oct 2021 06:31:04 +0000 (+0900) Subject: Excludes tuning level when READ mode is set X-Git-Tag: submit/tizen/20220105.080154^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Ftizen_devel;p=platform%2Fcore%2Fmultimedia%2Finference-engine-armnn.git Excludes tuning level when READ mode is set Change-Id: I33210956a9af5ef94614a582eda945dcab350724 Signed-off-by: Hyunsoo Park --- 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(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(ConvertTuningType(mCLTuner.tuning_mode))} + } + } + ); + } } else { creation_options.m_BackendOptions.emplace_back( armnn::BackendOptions