blob: 7f1c9b91bfe2789d792e67a74f484bd293dbfbda [file] [log] [blame]
Matteo Martincighe48bdff2018-09-03 13:50:50 +01001//
2// Copyright © 2017 Arm Ltd. All rights reserved.
David Beck93e48982018-09-05 13:05:09 +01003// SPDX-License-Identifier: MIT
Matteo Martincighe48bdff2018-09-03 13:50:50 +01004//
5
6#pragma once
7
Matteo Martincighe48bdff2018-09-03 13:50:50 +01008#include "DriverOptions.hpp"
9
arovir01b0717b52018-09-05 17:03:25 +010010#include <HalInterfaces.h>
Matteo Martincighe48bdff2018-09-03 13:50:50 +010011
12namespace armnn_driver
13{
14
arovir01b0717b52018-09-05 17:03:25 +010015template<typename HalPolicy>
Matteo Martincighe48bdff2018-09-03 13:50:50 +010016class ArmnnDriverImpl
17{
18public:
arovir01b0717b52018-09-05 17:03:25 +010019 using HalModel = typename HalPolicy::Model;
20 using HalGetSupportedOperations_cb = typename HalPolicy::getSupportedOperations_cb;
Matteo Martincighe48bdff2018-09-03 13:50:50 +010021
Matteo Martincighe48bdff2018-09-03 13:50:50 +010022 static Return<void> getSupportedOperations(
23 const armnn::IRuntimePtr& runtime,
24 const DriverOptions& options,
25 const HalModel& model,
26 HalGetSupportedOperations_cb);
arovir01b0717b52018-09-05 17:03:25 +010027
Matteo Martincighe48bdff2018-09-03 13:50:50 +010028 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);
arovir01b0717b52018-09-05 17:03:25 +010035
Matteo Martincighe48bdff2018-09-03 13:50:50 +010036 static Return<DeviceStatus> getStatus();
37};
38
39} // namespace armnn_driver