From 6bf3f43c6f1d88c676f277f4c3c766cb3ea37ed0 Mon Sep 17 00:00:00 2001 From: Pablo Tello Date: Wed, 1 Sep 2021 15:30:10 +0100 Subject: android-nn-driver getType returns the right device * ArmnnDriver queries the options and returns CPU or GPU depending on which is the first backend listed in the options * Resolves MLCE-401 Change-Id: If4e63e144507e817449f37926711fa325861b57d Signed-off-by: Pablo Tello --- 1.3/ArmnnDriver.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '1.3/ArmnnDriver.hpp') diff --git a/1.3/ArmnnDriver.hpp b/1.3/ArmnnDriver.hpp index 451b5ab5..fd4aa74c 100644 --- a/1.3/ArmnnDriver.hpp +++ b/1.3/ArmnnDriver.hpp @@ -244,8 +244,8 @@ public: Return getType(getType_cb cb) { ALOGV("hal_1_3::ArmnnDriver::getType()"); - - cb(V1_0::ErrorStatus::NONE, V1_2::DeviceType::CPU); + const auto device_type = hal_1_2::HalPolicy::GetDeviceTypeFromOptions(this->m_Options); + cb(V1_0::ErrorStatus::NONE, device_type); return Void(); } -- cgit v1.2.1