Mike Kelly | b5fdf38 | 2019-06-11 16:35:25 +0100 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2017 Arm Ltd. All rights reserved. |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
| 6 | #pragma once |
| 7 | |
| 8 | #include <HalInterfaces.h> |
| 9 | |
| 10 | #include "../DriverOptions.hpp" |
Kevin DuBois | 30c34ae | 2020-08-26 13:53:41 -0700 | [diff] [blame] | 11 | #include "NamespaceAdaptor.hpp" |
Mike Kelly | b5fdf38 | 2019-06-11 16:35:25 +0100 | [diff] [blame] | 12 | |
| 13 | #include <armnn/ArmNN.hpp> |
| 14 | |
Kevin DuBois | c0945c7 | 2020-11-20 16:57:09 -0800 | [diff] [blame] | 15 | #if ARMNN_ANDROID_S |
| 16 | using namespace android::nn; |
| 17 | #elif ARMNN_ANDROID_R |
Kevin May | ec1e5b8 | 2020-02-26 17:00:39 +0000 | [diff] [blame] | 18 | using namespace android::nn::hal; |
| 19 | #endif |
| 20 | |
| 21 | namespace V1_0 = ::android::hardware::neuralnetworks::V1_0; |
| 22 | namespace V1_2 = ::android::hardware::neuralnetworks::V1_2; |
| 23 | |
Mike Kelly | b5fdf38 | 2019-06-11 16:35:25 +0100 | [diff] [blame] | 24 | namespace armnn_driver |
| 25 | { |
| 26 | namespace hal_1_2 |
| 27 | { |
| 28 | |
| 29 | class ArmnnDriverImpl |
| 30 | { |
| 31 | public: |
Kevin DuBois | 30c34ae | 2020-08-26 13:53:41 -0700 | [diff] [blame] | 32 | static Return<V1_0::ErrorStatus> prepareArmnnModel_1_2(const armnn::IRuntimePtr& runtime, |
Kevin May | ec1e5b8 | 2020-02-26 17:00:39 +0000 | [diff] [blame] | 33 | const armnn::IGpuAccTunedParametersPtr& clTunedParameters, |
| 34 | const DriverOptions& options, |
| 35 | const V1_2::Model& model, |
| 36 | const android::sp<V1_2::IPreparedModelCallback>& cb, |
| 37 | bool float32ToFloat16 = false); |
Mike Kelly | b5fdf38 | 2019-06-11 16:35:25 +0100 | [diff] [blame] | 38 | |
| 39 | static Return<void> getCapabilities_1_2(const armnn::IRuntimePtr& runtime, |
| 40 | V1_2::IDevice::getCapabilities_1_2_cb cb); |
| 41 | }; |
| 42 | |
| 43 | } // namespace hal_1_2 |
Kevin DuBois | 30c34ae | 2020-08-26 13:53:41 -0700 | [diff] [blame] | 44 | } // namespace armnn_driver |