diff options
author | Pablo Tello <pablo.tello@arm.com> | 2021-09-01 15:30:10 +0100 |
---|---|---|
committer | Pablo Marquez Tello <pablo.tello@arm.com> | 2021-09-03 10:46:14 +0000 |
commit | 6bf3f43c6f1d88c676f277f4c3c766cb3ea37ed0 (patch) | |
tree | abda8bb6e49654c8f31cf7eae862642db0310056 /1.2/HalPolicy.hpp | |
parent | 69e38617cc66c008e092d533f3f3bede8043223c (diff) | |
download | android-nn-driver-6bf3f43c6f1d88c676f277f4c3c766cb3ea37ed0.tar.gz |
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 <pablo.tello@arm.com>
Diffstat (limited to '1.2/HalPolicy.hpp')
-rw-r--r-- | 1.2/HalPolicy.hpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/1.2/HalPolicy.hpp b/1.2/HalPolicy.hpp index a348abe0..0662e1be 100644 --- a/1.2/HalPolicy.hpp +++ b/1.2/HalPolicy.hpp @@ -16,6 +16,7 @@ namespace V1_2 = ::android::hardware::neuralnetworks::V1_2; namespace armnn_driver { +class DriverOptions; namespace hal_1_2 { @@ -31,6 +32,9 @@ public: using ExecutionCallback = V1_2::IExecutionCallback; using getSupportedOperations_cb = V1_2::IDevice::getSupportedOperations_1_2_cb; using ErrorStatus = V1_0::ErrorStatus; + using DeviceType = V1_2::DeviceType; + + static DeviceType GetDeviceTypeFromOptions(const DriverOptions& options); static bool ConvertOperation(const Operation& operation, const Model& model, ConversionData& data); |