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