Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 1 | // |
Teresa Charlin | 5266473 | 2020-06-29 16:27:03 +0100 | [diff] [blame] | 2 | // Copyright © 2017 Arm Ltd and Contributors. All rights reserved. |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
| 6 | #pragma once |
| 7 | |
Francis Murtagh | cae4568 | 2021-04-26 10:07:49 +0100 | [diff] [blame] | 8 | #include <armnn/backends/ILayerSupport.hpp> |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 9 | |
| 10 | namespace armnn |
| 11 | { |
| 12 | |
| 13 | class LayerSupportBase : public ILayerSupport |
| 14 | { |
| 15 | public: |
Cathal Corbett | 34b429c | 2021-12-24 12:24:40 +0000 | [diff] [blame] | 16 | |
| 17 | bool IsLayerSupported(const LayerType& type, |
| 18 | const std::vector<TensorInfo>& infos, |
| 19 | const BaseDescriptor& descriptor, |
| 20 | const Optional<LstmInputParamsInfo>& lstmParamsInfo = EmptyOptional(), |
| 21 | const Optional<QuantizedLstmInputParamsInfo>& quantizedLstmParamsInfo = EmptyOptional(), |
| 22 | Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const override; |
| 23 | |
Derek Lamberti | 6a5e5e8 | 2019-12-05 14:41:20 +0000 | [diff] [blame] | 24 | bool IsDetectionPostProcessSupported(const TensorInfo& boxEncodings, |
| 25 | const TensorInfo& scores, |
| 26 | const TensorInfo& anchors, |
| 27 | const TensorInfo& detectionBoxes, |
| 28 | const TensorInfo& detectionClasses, |
| 29 | const TensorInfo& detectionScores, |
| 30 | const TensorInfo& numDetections, |
Narumol Prangnawarat | 94dd5d8 | 2019-01-23 18:06:26 +0000 | [diff] [blame] | 31 | const DetectionPostProcessDescriptor& descriptor, |
Francis Murtagh | 6627703 | 2023-07-28 13:01:32 +0100 | [diff] [blame] | 32 | Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const; |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 33 | |
| 34 | bool IsMemCopySupported(const TensorInfo& input, |
| 35 | const TensorInfo& output, |
Francis Murtagh | 6627703 | 2023-07-28 13:01:32 +0100 | [diff] [blame] | 36 | Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const; |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 37 | |
Derek Lamberti | f674aa0 | 2019-08-01 15:56:25 +0100 | [diff] [blame] | 38 | bool IsMemImportSupported(const TensorInfo& input, |
| 39 | const TensorInfo& output, |
Francis Murtagh | 6627703 | 2023-07-28 13:01:32 +0100 | [diff] [blame] | 40 | Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const; |
Derek Lamberti | f674aa0 | 2019-08-01 15:56:25 +0100 | [diff] [blame] | 41 | |
Nattapat Chaimanowong | 1f88630 | 2019-04-05 13:37:19 +0100 | [diff] [blame] | 42 | bool IsMergeSupported(const TensorInfo& input0, |
| 43 | const TensorInfo& input1, |
| 44 | const TensorInfo& output, |
Francis Murtagh | 6627703 | 2023-07-28 13:01:32 +0100 | [diff] [blame] | 45 | Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const; |
James Conroy | 586a9aa | 2020-03-20 08:49:33 +0000 | [diff] [blame] | 46 | |
James Conroy | ee18dc8 | 2019-07-17 11:27:46 +0100 | [diff] [blame] | 47 | bool IsQuantizedLstmSupported(const TensorInfo& input, |
| 48 | const TensorInfo& previousCellStateIn, |
| 49 | const TensorInfo& previousOutputIn, |
| 50 | const TensorInfo& cellStateOut, |
| 51 | const TensorInfo& output, |
| 52 | const QuantizedLstmInputParamsInfo& paramsInfo, |
Francis Murtagh | 6627703 | 2023-07-28 13:01:32 +0100 | [diff] [blame] | 53 | Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const; |
Teresa Charlin | a9075df | 2019-06-27 15:41:57 +0100 | [diff] [blame] | 54 | |
Keith Davis | 3ae3f97 | 2021-05-21 16:33:48 +0100 | [diff] [blame] | 55 | bool IsShapeSupported(const TensorInfo& input, |
| 56 | const TensorInfo& output, |
Francis Murtagh | 6627703 | 2023-07-28 13:01:32 +0100 | [diff] [blame] | 57 | Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const; |
Matthew Jackson | 2b8c1da | 2019-07-04 14:59:16 +0100 | [diff] [blame] | 58 | |
Derek Lamberti | 013c390 | 2019-10-21 10:46:16 +0100 | [diff] [blame] | 59 | bool IsStandInSupported(const std::vector<const TensorInfo*>& inputs, |
| 60 | const std::vector<const TensorInfo*>& outputs, |
| 61 | const StandInDescriptor& descriptor, |
Francis Murtagh | 6627703 | 2023-07-28 13:01:32 +0100 | [diff] [blame] | 62 | Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const; |
Narumol Prangnawarat | 8ed39ae | 2021-07-15 16:16:25 +0100 | [diff] [blame] | 63 | |
Matteo Martincigh | 992d6dc | 2019-01-10 17:34:20 +0000 | [diff] [blame] | 64 | }; |
| 65 | |
| 66 | } // namespace armnn |