ArmNN
 25.11
Loading...
Searching...
No Matches
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
10namespace armnn
11{
12
14{
15public:
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
bool IsMemImportSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsMergeSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
bool IsShapeSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
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...
bool IsMemCopySupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
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
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
bool IsStandInSupported(const std::vector< const TensorInfo * > &inputs, const std::vector< const TensorInfo * > &outputs, const StandInDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional()) const
Copyright (c) 2021 ARM Limited and Contributors.
LayerType
When adding a new layer, adapt also the LastLayer enum value in the enum class LayerType below.
Definition Types.hpp:494
Base class for all descriptors.
EmptyOptional is used to initialize the Optional class in case we want to have default value for an O...
Definition Optional.hpp:32
A StandInDescriptor for the StandIn layer.