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 "../ConversionUtils.hpp" |
| 9 | |
| 10 | #include <HalInterfaces.h> |
| 11 | |
Aron Virginas-Tar | fb2fa29 | 2019-07-04 11:59:48 +0100 | [diff] [blame^] | 12 | #include <armnn/Types.hpp> |
| 13 | |
Mike Kelly | b5fdf38 | 2019-06-11 16:35:25 +0100 | [diff] [blame] | 14 | namespace armnn_driver |
| 15 | { |
| 16 | namespace hal_1_2 |
| 17 | { |
| 18 | |
| 19 | class HalPolicy |
| 20 | { |
| 21 | public: |
| 22 | using Model = V1_2::Model; |
| 23 | using Operand = V1_2::Operand; |
Aron Virginas-Tar | cd700e4 | 2019-06-14 14:54:52 +0100 | [diff] [blame] | 24 | using OperandLifeTime = V1_0::OperandLifeTime; |
| 25 | using OperandType = V1_2::OperandType; |
Mike Kelly | b5fdf38 | 2019-06-11 16:35:25 +0100 | [diff] [blame] | 26 | using Operation = V1_2::Operation; |
| 27 | using OperationType = V1_2::OperationType; |
| 28 | using ExecutionCallback = V1_2::IExecutionCallback; |
| 29 | using getSupportedOperations_cb = V1_2::IDevice::getSupportedOperations_1_2_cb; |
| 30 | |
| 31 | static bool ConvertOperation(const Operation& operation, const Model& model, ConversionData& data); |
Aron Virginas-Tar | 24e699d | 2019-06-17 14:47:46 +0100 | [diff] [blame] | 32 | |
| 33 | private: |
| 34 | static bool ConvertConv2d(const Operation& operation, const Model& model, ConversionData& data); |
Aron Virginas-Tar | fb2fa29 | 2019-07-04 11:59:48 +0100 | [diff] [blame^] | 35 | |
Aron Virginas-Tar | 24e699d | 2019-06-17 14:47:46 +0100 | [diff] [blame] | 36 | static bool ConvertDepthwiseConv2d(const Operation& operation, const Model& model, ConversionData& data); |
Aron Virginas-Tar | fb2fa29 | 2019-07-04 11:59:48 +0100 | [diff] [blame^] | 37 | |
Matteo Martincigh | 17ffff3 | 2019-06-27 14:12:55 +0100 | [diff] [blame] | 38 | static bool ConvertPrelu(const Operation& operation, const Model& model, ConversionData& data); |
Aron Virginas-Tar | fb2fa29 | 2019-07-04 11:59:48 +0100 | [diff] [blame^] | 39 | |
| 40 | static bool ConvertResize(const Operation& operation, |
| 41 | const Model& model, |
| 42 | ConversionData& data, |
| 43 | armnn::ResizeMethod resizeMethod); |
Mike Kelly | b5fdf38 | 2019-06-11 16:35:25 +0100 | [diff] [blame] | 44 | }; |
| 45 | |
| 46 | } // namespace hal_1_2 |
Matteo Martincigh | 17ffff3 | 2019-06-27 14:12:55 +0100 | [diff] [blame] | 47 | } // namespace armnn_driver |