Matteo Martincigh | e48bdff | 2018-09-03 13:50:50 +0100 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2017 Arm Ltd. All rights reserved. |
David Beck | 93e4898 | 2018-09-05 13:05:09 +0100 | [diff] [blame] | 3 | // SPDX-License-Identifier: MIT |
Matteo Martincigh | e48bdff | 2018-09-03 13:50:50 +0100 | [diff] [blame] | 4 | // |
| 5 | |
| 6 | #pragma once |
| 7 | |
Matteo Martincigh | e48bdff | 2018-09-03 13:50:50 +0100 | [diff] [blame] | 8 | #include "DriverOptions.hpp" |
| 9 | |
arovir01 | b0717b5 | 2018-09-05 17:03:25 +0100 | [diff] [blame] | 10 | #include <HalInterfaces.h> |
Matteo Martincigh | e48bdff | 2018-09-03 13:50:50 +0100 | [diff] [blame] | 11 | |
| 12 | namespace armnn_driver |
| 13 | { |
| 14 | |
arovir01 | b0717b5 | 2018-09-05 17:03:25 +0100 | [diff] [blame] | 15 | template<typename HalPolicy> |
Matteo Martincigh | e48bdff | 2018-09-03 13:50:50 +0100 | [diff] [blame] | 16 | class ArmnnDriverImpl |
| 17 | { |
| 18 | public: |
arovir01 | b0717b5 | 2018-09-05 17:03:25 +0100 | [diff] [blame] | 19 | using HalModel = typename HalPolicy::Model; |
| 20 | using HalGetSupportedOperations_cb = typename HalPolicy::getSupportedOperations_cb; |
Matteo Martincigh | e48bdff | 2018-09-03 13:50:50 +0100 | [diff] [blame] | 21 | |
Matteo Martincigh | e48bdff | 2018-09-03 13:50:50 +0100 | [diff] [blame] | 22 | static Return<void> getSupportedOperations( |
| 23 | const armnn::IRuntimePtr& runtime, |
| 24 | const DriverOptions& options, |
| 25 | const HalModel& model, |
| 26 | HalGetSupportedOperations_cb); |
arovir01 | b0717b5 | 2018-09-05 17:03:25 +0100 | [diff] [blame] | 27 | |
Matteo Martincigh | e48bdff | 2018-09-03 13:50:50 +0100 | [diff] [blame] | 28 | static Return<ErrorStatus> prepareModel( |
| 29 | const armnn::IRuntimePtr& runtime, |
| 30 | const armnn::IGpuAccTunedParametersPtr& clTunedParameters, |
| 31 | const DriverOptions& options, |
| 32 | const HalModel& model, |
| 33 | const android::sp<IPreparedModelCallback>& cb, |
| 34 | bool float32ToFloat16 = false); |
arovir01 | b0717b5 | 2018-09-05 17:03:25 +0100 | [diff] [blame] | 35 | |
Matteo Martincigh | e48bdff | 2018-09-03 13:50:50 +0100 | [diff] [blame] | 36 | static Return<DeviceStatus> getStatus(); |
| 37 | }; |
| 38 | |
| 39 | } // namespace armnn_driver |