157 bool kernelProfiling =
options.m_EnableGpuProfiling;
159 arm_compute::CLTuner* tuner =
nullptr;
160 bool useLegacyTunerAPI =
options.m_GpuAccTunedParameters.get() !=
nullptr;
161 if (useLegacyTunerAPI)
163 auto clTunerParams = boost::polymorphic_downcast<ClTunedParameters*>(
164 options.m_GpuAccTunedParameters.get());
165 tuner = &clTunerParams->m_Tuner;
187 BOOST_ASSERT_MSG(
false,
"Tuning level not recognised.");
193 TuningLevel tuningLevel = ConvertTuningLevel(clTunerParams->m_TuningLevel, clTunerParams->m_Mode);
200 auto tuningLevel = defaultTuningLevel;
202 ParseOptions(
options.m_BackendOptions,
"GpuAcc", [&](std::string name,
const BackendOptions::Var& value)
204 if (name ==
"KernelProfilingEnabled")
206 kernelProfiling |= ParseBoolean(value, false);
207 }
else if (name ==
"TuningFile")
210 }
else if (name ==
"TuningLevel")
217 m_Tuner = std::make_unique<arm_compute::CLTuner>(
true);
221 if (!m_TuningFile.empty())
225 m_Tuner->load_from_file(m_TuningFile.c_str());
226 }
catch (
const std::exception& e)
231 tuner = m_Tuner.get();
235 m_ClContextControlWrapper = std::make_unique<ClContextControlWrapper>(
std::string ParseFile(const BackendOptions::Var &value, std::string defaultValue)
IBackendContext(const IRuntime::CreationOptions &)
void ConfigureTuner(arm_compute::CLTuner &tuner, TuningLevel level)
#define ARMNN_LOG(severity)
TuningLevel ParseTuningLevel(const BackendOptions::Var &value, TuningLevel defaultValue)
void ParseOptions(const std::vector< BackendOptions > &options, BackendId backend, F f)
armnn::Runtime::CreationOptions::ExternalProfilingOptions options