blob: d5cf7f3eed18abec7c37fa6a5bd76d1aff36db47 [file] [log] [blame]
Mike Kellyb5fdf382019-06-11 16:35:25 +01001//
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 DuBois30c34ae2020-08-26 13:53:41 -070011#include "NamespaceAdaptor.hpp"
Mike Kellyb5fdf382019-06-11 16:35:25 +010012
13#include <armnn/ArmNN.hpp>
14
Kevin DuBoisc0945c72020-11-20 16:57:09 -080015#if ARMNN_ANDROID_S
16using namespace android::nn;
17#elif ARMNN_ANDROID_R
Kevin Mayec1e5b82020-02-26 17:00:39 +000018using namespace android::nn::hal;
19#endif
20
21namespace V1_0 = ::android::hardware::neuralnetworks::V1_0;
22namespace V1_2 = ::android::hardware::neuralnetworks::V1_2;
23
Mike Kellyb5fdf382019-06-11 16:35:25 +010024namespace armnn_driver
25{
26namespace hal_1_2
27{
28
29class ArmnnDriverImpl
30{
31public:
Kevin DuBois30c34ae2020-08-26 13:53:41 -070032 static Return<V1_0::ErrorStatus> prepareArmnnModel_1_2(const armnn::IRuntimePtr& runtime,
Kevin Mayec1e5b82020-02-26 17:00:39 +000033 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 Kellyb5fdf382019-06-11 16:35:25 +010038
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 DuBois30c34ae2020-08-26 13:53:41 -070044} // namespace armnn_driver