ArmNN
 24.02
LayerSupportBase.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #pragma once
7 
9 
10 namespace armnn
11 {
12 
14 {
15 public:
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 
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,
31  const DetectionPostProcessDescriptor& descriptor,
32  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const;
33 
34  bool IsMemCopySupported(const TensorInfo& input,
35  const TensorInfo& output,
36  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const;
37 
38  bool IsMemImportSupported(const TensorInfo& input,
39  const TensorInfo& output,
40  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const;
41 
42  bool IsMergeSupported(const TensorInfo& input0,
43  const TensorInfo& input1,
44  const TensorInfo& output,
45  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const;
46 
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,
53  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const;
54 
55  bool IsShapeSupported(const TensorInfo& input,
56  const TensorInfo& output,
57  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const;
58 
59  bool IsStandInSupported(const std::vector<const TensorInfo*>& inputs,
60  const std::vector<const TensorInfo*>& outputs,
61  const StandInDescriptor& descriptor,
62  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const;
63 
64 };
65 
66 } // namespace armnn
armnn::Optional
Definition: Optional.hpp:270
armnn::TensorInfo
Definition: Tensor.hpp:152
armnn::LayerSupportBase::IsStandInSupported
bool IsStandInSupported(const std::vector< const TensorInfo * > &inputs, const std::vector< const TensorInfo * > &outputs, const StandInDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
Definition: LayerSupportBase.cpp:138
ILayerSupport.hpp
armnn::QuantizedLstmInputParamsInfo
Definition: QuantizedLstmParams.hpp:119
armnn::LayerSupportBase::IsQuantizedLstmSupported
bool IsQuantizedLstmSupported(const TensorInfo &input, const TensorInfo &previousCellStateIn, const TensorInfo &previousOutputIn, const TensorInfo &cellStateOut, const TensorInfo &output, const QuantizedLstmInputParamsInfo &paramsInfo, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
Definition: LayerSupportBase.cpp:120
armnn::LayerSupportBase::IsDetectionPostProcessSupported
bool IsDetectionPostProcessSupported(const TensorInfo &boxEncodings, const TensorInfo &scores, const TensorInfo &anchors, const TensorInfo &detectionBoxes, const TensorInfo &detectionClasses, const TensorInfo &detectionScores, const TensorInfo &numDetections, const DetectionPostProcessDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
Definition: LayerSupportBase.cpp:85
armnn::EmptyOptional
EmptyOptional is used to initialize the Optional class in case we want to have default value for an O...
Definition: Optional.hpp:32
armnn::LayerSupportBase::IsMergeSupported
bool IsMergeSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
Definition: LayerSupportBase.cpp:112
armnn::LayerSupportBase::IsMemImportSupported
bool IsMemImportSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
Definition: LayerSupportBase.cpp:105
armnn::BaseDescriptor
Base class for all descriptors.
Definition: Descriptors.hpp:22
armnn::StandInDescriptor
A StandInDescriptor for the StandIn layer.
Definition: Descriptors.hpp:1281
armnn::LayerSupportBase::IsShapeSupported
bool IsShapeSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
Definition: LayerSupportBase.cpp:131
armnn::ILayerSupport
Definition: ILayerSupport.hpp:23
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition: 01_00_quick_start.dox:6
armnn::DetectionPostProcessDescriptor
Definition: Descriptors.hpp:713
armnn::LayerSupportBase::IsMemCopySupported
bool IsMemCopySupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
Definition: LayerSupportBase.cpp:98
armnn::LayerType
LayerType
When adding a new layer, adapt also the LastLayer enum value in the enum class LayerType below.
Definition: Types.hpp:491
armnn::LayerSupportBase::IsLayerSupported
bool IsLayerSupported(const LayerType &type, const std::vector< TensorInfo > &infos, const BaseDescriptor &descriptor, const Optional< LstmInputParamsInfo > &lstmParamsInfo=EmptyOptional(), const Optional< QuantizedLstmInputParamsInfo > &quantizedLstmParamsInfo=EmptyOptional(), Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const override
Default implementation of the ILayerSupport interface, Backends should implement this as a switch sta...
Definition: LayerSupportBase.cpp:40
armnn::LayerSupportBase
Definition: LayerSupportBase.hpp:13