From 42477c1d3e7ddf74863e84ab79dbe6f42e4a0ba3 Mon Sep 17 00:00:00 2001 From: Kevin May Date: Thu, 26 Mar 2020 13:34:14 +0000 Subject: IVGCVSW-4447 Add Hal 1_3 Support * Add new 1.3 files HalPolicy, ArmnnDriver, ArmnnDriverImpl * Add new .rc file for 1.3 service * Add ArmnnPreparedModel_1_3 and implement new functions * Update Android.mk with 1.3 driver and service * Refactor ifdef to include ARMNN_ANDROID_NN_V1_3 * Create Utils getMainModel for new 1.3 Model Main Subgraph * Use android Utils to convertToV1_X in ArmnnPrepapredModel_1_3 * Refactor HAL 1.2 convert functions into ConversionUtils_1_2.hpp * Replace ArmnnBurstExecutorWithCache with call to ExecutionBurstServer Signed-off-by: Kevin May Change-Id: I514069e9e1b16bcd1c4abfb5d563d25ac22d02e3 --- 1.3/ArmnnDriverImpl.hpp | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 1.3/ArmnnDriverImpl.hpp (limited to '1.3/ArmnnDriverImpl.hpp') diff --git a/1.3/ArmnnDriverImpl.hpp b/1.3/ArmnnDriverImpl.hpp new file mode 100644 index 00000000..8a665ea5 --- /dev/null +++ b/1.3/ArmnnDriverImpl.hpp @@ -0,0 +1,40 @@ +// +// Copyright © 2020 Arm Ltd. All rights reserved. +// SPDX-License-Identifier: MIT +// + +#pragma once + +#include + +#include "../DriverOptions.hpp" + +#include + +using namespace android::nn::hal; + +namespace V1_0 = ::android::hardware::neuralnetworks::V1_0; +namespace V1_2 = ::android::hardware::neuralnetworks::V1_2; +namespace V1_3 = ::android::hardware::neuralnetworks::V1_3; + +namespace armnn_driver +{ +namespace hal_1_3 +{ + +class ArmnnDriverImpl +{ +public: + static Return prepareArmnnModel_1_3(const armnn::IRuntimePtr& runtime, + const armnn::IGpuAccTunedParametersPtr& clTunedParameters, + const DriverOptions& options, + const V1_3::Model& model, + const android::sp& cb, + bool float32ToFloat16 = false); + + static Return getCapabilities_1_3(const armnn::IRuntimePtr& runtime, + V1_3::IDevice::getCapabilities_1_3_cb cb); +}; + +} // namespace hal_1_3 +} // namespace armnn_driver \ No newline at end of file -- cgit v1.2.1