From d6539c58519962acd8967e93ceb2da049631c832 Mon Sep 17 00:00:00 2001 From: Sadik Armagan Date: Wed, 22 May 2019 18:00:30 +0100 Subject: IVGCVSW-2911 Add Android Q support to android-nn-driver infrastructure * Updated Android.mk to build Android Q * Added androidnn.go to inject cpp flags for Q * Create Runtime when ACL is not enabled Change-Id: Ia3e7a8e484fc81ce63998a65e29753cbf941173c Signed-off-by: Sadik Armagan Signed-off-by: Kevin May --- ArmnnDevice.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'ArmnnDevice.cpp') diff --git a/ArmnnDevice.cpp b/ArmnnDevice.cpp index c96798a8..a03d9cc9 100644 --- a/ArmnnDevice.cpp +++ b/ArmnnDevice.cpp @@ -51,10 +51,11 @@ ArmnnDevice::ArmnnDevice(DriverOptions options) SetMinimumLogSeverity(base::INFO); } + armnn::IRuntime::CreationOptions runtimeOptions; + #if defined(ARMCOMPUTECL_ENABLED) try { - armnn::IRuntime::CreationOptions options; if (!m_Options.GetClTunedParametersFile().empty()) { m_ClTunedParameters = armnn::IGpuAccTunedParameters::Create(m_Options.GetClTunedParametersMode(), @@ -69,18 +70,17 @@ ArmnnDevice::ArmnnDevice(DriverOptions options) ALOGW("ArmnnDevice: Failed to load CL tuned parameters file '%s': %s", m_Options.GetClTunedParametersFile().c_str(), error.what()); } - options.m_GpuAccTunedParameters = m_ClTunedParameters; + runtimeOptions.m_GpuAccTunedParameters = m_ClTunedParameters; } - - options.m_EnableGpuProfiling = m_Options.IsGpuProfilingEnabled(); - - m_Runtime = armnn::IRuntime::Create(options); } catch (const armnn::ClRuntimeUnavailableException& error) { ALOGE("ArmnnDevice: Failed to setup CL runtime: %s. Device will be unavailable.", error.what()); } #endif + runtimeOptions.m_EnableGpuProfiling = m_Options.IsGpuProfilingEnabled(); + m_Runtime = armnn::IRuntime::Create(runtimeOptions); + std::vector backends; if (m_Runtime) -- cgit v1.2.1