Excludes tuning level when READ mode is set 08/265608/2 accepted/tizen_7.0_unified accepted/tizen_7.0_unified_hotfix tizen_7.0 tizen_7.0_hotfix tizen_devel accepted/tizen/7.0/unified/20221110.060517 accepted/tizen/7.0/unified/hotfix/20221116.105353 accepted/tizen/unified/20220110.140027 submit/tizen/20220105.080154 submit/tizen/20220105.081745 tizen_7.0_m2_release
authorHyunsoo Park <hance.park@samsung.com>
Mon, 25 Oct 2021 06:31:04 +0000 (15:31 +0900)
committerHyunsoo Park <hance.park@samsung.com>
Mon, 25 Oct 2021 07:48:22 +0000 (16:48 +0900)
Change-Id: I33210956a9af5ef94614a582eda945dcab350724
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
packaging/inference-engine-armnn.spec
src/inference_engine_armnn.cpp

index 83e7a44a2e6ddecc426f653256bd4888ac10f95a..7347c768e49de43c309fe7384984bbc1d0b36770 100644 (file)
@@ -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
index 29ba8c48fed15d90eeb7007d9e9eb06a29e99e16..5409b44c90a32d6a535b7893a17709de3d8f2e78 100644 (file)
@@ -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