ArmNN
 20.08
ILayerSupport.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 #pragma once
6 
7 #include <armnn/Deprecated.hpp>
9 #include <armnn/LstmParams.hpp>
10 #include <armnn/Optional.hpp>
12 
13 #include <cctype>
14 #include <functional>
15 #include <memory>
16 #include <vector>
17 
18 namespace armnn
19 {
20 
21 class TensorInfo;
22 
24 {
25 protected:
27  virtual ~ILayerSupport() {}
28 
29 public:
30  ARMNN_DEPRECATED_MSG("Use IsElementwiseUnarySupported instead")
31  virtual bool IsAbsSupported(const TensorInfo& input,
32  const TensorInfo& output,
33  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
34 
35  virtual bool IsActivationSupported(const TensorInfo& input,
36  const TensorInfo& output,
37  const ActivationDescriptor& descriptor,
38  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
39 
40  virtual bool IsAdditionSupported(const TensorInfo& input0,
41  const TensorInfo& input1,
42  const TensorInfo& output,
43  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
44 
45  virtual bool IsArgMinMaxSupported(const TensorInfo& input,
46  const TensorInfo& output,
47  const ArgMinMaxDescriptor& descriptor,
48  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
49 
50  virtual bool IsBatchNormalizationSupported(const TensorInfo& input,
51  const TensorInfo& output,
52  const TensorInfo& mean,
53  const TensorInfo& var,
54  const TensorInfo& beta,
55  const TensorInfo& gamma,
56  const BatchNormalizationDescriptor& descriptor,
57  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
58 
59  virtual bool IsBatchToSpaceNdSupported(const TensorInfo& input,
60  const TensorInfo& output,
61  const BatchToSpaceNdDescriptor& descriptor,
62  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
63 
64  virtual bool IsComparisonSupported(const TensorInfo& input0,
65  const TensorInfo& input1,
66  const TensorInfo& output,
67  const ComparisonDescriptor& descriptor,
68  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
69 
70  virtual bool IsConcatSupported(const std::vector<const TensorInfo*> inputs,
71  const TensorInfo& output,
72  const OriginsDescriptor& descriptor,
73  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
74 
75  virtual bool IsConstantSupported(const TensorInfo& output,
76  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
77 
78  virtual bool IsConvertBf16ToFp32Supported(const TensorInfo& input,
79  const TensorInfo& output,
80  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
81 
82  virtual bool IsConvertFp32ToBf16Supported(const TensorInfo& input,
83  const TensorInfo& output,
84  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
85 
86  virtual bool IsConvertFp16ToFp32Supported(const TensorInfo& input,
87  const TensorInfo& output,
88  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
89 
90  virtual bool IsConvertFp32ToFp16Supported(const TensorInfo& input,
91  const TensorInfo& output,
92  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
93 
94  virtual bool IsConvolution2dSupported(const TensorInfo& input,
95  const TensorInfo& output,
96  const Convolution2dDescriptor& descriptor,
97  const TensorInfo& weights,
98  const Optional<TensorInfo>& biases,
99  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
100 
101  virtual bool IsDebugSupported(const TensorInfo& input,
102  const TensorInfo& output,
103  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
104 
105  virtual bool IsDepthToSpaceSupported(const TensorInfo& input,
106  const TensorInfo& output,
107  const DepthToSpaceDescriptor& descriptor,
108  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
109 
110  virtual bool IsDepthwiseConvolutionSupported(
111  const TensorInfo& input,
112  const TensorInfo& output,
113  const DepthwiseConvolution2dDescriptor& descriptor,
114  const TensorInfo& weights,
115  const Optional<TensorInfo>& biases,
116  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
117 
118  virtual bool IsDequantizeSupported(const TensorInfo& input,
119  const TensorInfo& output,
120  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
121 
123  const TensorInfo& scores,
124  const TensorInfo& anchors,
125  const TensorInfo& detectionBoxes,
126  const TensorInfo& detectionClasses,
127  const TensorInfo& detectionScores,
128  const TensorInfo& numDetections,
129  const DetectionPostProcessDescriptor& descriptor,
130  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const =0;
131 
133  const TensorInfo& input,
134  const TensorInfo& output,
135  const DepthwiseConvolution2dDescriptor& descriptor,
136  const TensorInfo& weights,
137  const Optional<TensorInfo>& biases,
138  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
139 
140  virtual bool IsDivisionSupported(const TensorInfo& input0,
141  const TensorInfo& input1,
142  const TensorInfo& output,
143  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
144 
145  virtual bool IsElementwiseUnarySupported(const TensorInfo& input,
146  const TensorInfo& output,
147  const ElementwiseUnaryDescriptor& descriptor,
148  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
149 
150  ARMNN_DEPRECATED_MSG("Use IsComparisonSupported instead")
151  virtual bool IsEqualSupported(const TensorInfo& input0,
152  const TensorInfo& input1,
153  const TensorInfo& output,
154  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
155 
156  virtual bool IsFakeQuantizationSupported(const TensorInfo& input,
157  const FakeQuantizationDescriptor& descriptor,
158  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
159 
160  virtual bool IsFillSupported(const TensorInfo& input,
161  const TensorInfo& output,
162  const FillDescriptor& descriptor,
163  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
164 
165  virtual bool IsFloorSupported(const TensorInfo& input,
166  const TensorInfo& output,
167  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
168 
169  virtual bool IsFullyConnectedSupported(const TensorInfo& input,
170  const TensorInfo& output,
171  const TensorInfo& weights,
172  const TensorInfo& biases,
173  const FullyConnectedDescriptor& descriptor,
174  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
175 
176  ARMNN_DEPRECATED_MSG("Use IsGatherSupported with descriptor instead")
177  virtual bool IsGatherSupported(const TensorInfo& input0,
178  const TensorInfo& input1,
179  const TensorInfo& output,
180  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
181 
182  virtual bool IsGatherSupported(const TensorInfo& input0,
183  const TensorInfo& input1,
184  const TensorInfo& output,
185  const GatherDescriptor& descriptor,
186  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
187 
188  ARMNN_DEPRECATED_MSG("Use IsComparisonSupported instead")
189  virtual bool IsGreaterSupported(const TensorInfo& input0,
190  const TensorInfo& input1,
191  const TensorInfo& ouput,
192  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
193 
194  virtual bool IsInputSupported(const TensorInfo& input,
195  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
196 
198  const TensorInfo& input,
199  const TensorInfo& output,
200  const InstanceNormalizationDescriptor& descriptor,
201  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
202 
203  virtual bool IsL2NormalizationSupported(const TensorInfo& input,
204  const TensorInfo& output,
205  const L2NormalizationDescriptor& descriptor,
206  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
207 
208  virtual bool IsLogSoftmaxSupported(const TensorInfo& input,
209  const TensorInfo& output,
210  const LogSoftmaxDescriptor& descriptor,
211  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
212 
213  virtual bool IsLstmSupported(const TensorInfo& input,
214  const TensorInfo& outputStateIn,
215  const TensorInfo& cellStateIn,
216  const TensorInfo& scratchBuffer,
217  const TensorInfo& outputStateOut,
218  const TensorInfo& cellStateOut,
219  const TensorInfo& output,
220  const LstmDescriptor& descriptor,
221  const LstmInputParamsInfo& paramsInfo,
222  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
223 
224  virtual bool IsMaximumSupported(const TensorInfo& input0,
225  const TensorInfo& input1,
226  const TensorInfo& output,
227  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
228 
229  virtual bool IsMeanSupported(const TensorInfo& input,
230  const TensorInfo& output,
231  const MeanDescriptor& descriptor,
232  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
233 
234  virtual bool IsMemCopySupported(const TensorInfo& input,
235  const TensorInfo& output,
236  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
237 
238  virtual bool IsMemImportSupported(const TensorInfo& input,
239  const TensorInfo& output,
240  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
241 
242  virtual bool IsMergeSupported(const TensorInfo& input0,
243  const TensorInfo& input1,
244  const TensorInfo& output,
245  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
246 
247  ARMNN_DEPRECATED_MSG("Use IsConcatSupported instead")
248  virtual bool IsMergerSupported(const std::vector<const TensorInfo*> inputs,
249  const TensorInfo& output,
250  const OriginsDescriptor& descriptor,
251  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
252 
253  virtual bool IsMinimumSupported(const TensorInfo& input0,
254  const TensorInfo& input1,
255  const TensorInfo& ouput,
256  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
257 
258  virtual bool IsMultiplicationSupported(const TensorInfo& input0,
259  const TensorInfo& input1,
260  const TensorInfo& output,
261  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
262 
263  virtual bool IsNormalizationSupported(const TensorInfo& input,
264  const TensorInfo& output,
265  const NormalizationDescriptor& descriptor,
266  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
267 
268  virtual bool IsOutputSupported(const TensorInfo& output,
269  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
270 
271  virtual bool IsPadSupported(const TensorInfo& input,
272  const TensorInfo& output,
273  const PadDescriptor& descriptor,
274  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
275 
276  virtual bool IsPermuteSupported(const TensorInfo& input,
277  const TensorInfo& output,
278  const PermuteDescriptor& descriptor,
279  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
280 
281  virtual bool IsPooling2dSupported(const TensorInfo& input,
282  const TensorInfo& output,
283  const Pooling2dDescriptor& descriptor,
284  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
285 
286  virtual bool IsPreCompiledSupported(const TensorInfo& input,
287  const PreCompiledDescriptor& descriptor,
288  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
289 
290  virtual bool IsPreluSupported(const TensorInfo& input,
291  const TensorInfo& alpha,
292  const TensorInfo& output,
293  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
294 
295  virtual bool IsQuantizeSupported(const TensorInfo& input,
296  const TensorInfo& output,
297  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
298 
299  virtual bool IsQLstmSupported(const TensorInfo& input,
300  const TensorInfo& previousOutputIn,
301  const TensorInfo& previousCellStateIn,
302  const TensorInfo& outputStateOut,
303  const TensorInfo& cellStateOut,
304  const TensorInfo& output,
305  const QLstmDescriptor& descriptor,
306  const LstmInputParamsInfo& paramsInfo,
307  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
308 
309  virtual bool IsQuantizedLstmSupported(const TensorInfo& input,
310  const TensorInfo& previousCellStateIn,
311  const TensorInfo& previousOutputIn,
312  const TensorInfo& cellStateOut,
313  const TensorInfo& output,
314  const QuantizedLstmInputParamsInfo& paramsInfo,
315  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
316 
317  virtual bool IsRankSupported(const TensorInfo& input,
318  const TensorInfo& output,
319  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
320 
321  virtual bool IsReshapeSupported(const TensorInfo& input,
322  const TensorInfo& output,
323  const ReshapeDescriptor& descriptor,
324  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
325 
326  ARMNN_DEPRECATED_MSG("Use IsResizeSupported instead")
327  virtual bool IsResizeBilinearSupported(const TensorInfo& input,
328  const TensorInfo& output,
329  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
330 
331  virtual bool IsResizeSupported(const TensorInfo& input,
332  const TensorInfo& output,
333  const ResizeDescriptor& descriptor,
334  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
335 
336  ARMNN_DEPRECATED_MSG("Use IsElementwiseUnarySupported instead")
337  virtual bool IsRsqrtSupported(const TensorInfo& input,
338  const TensorInfo& output,
339  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
340 
341  virtual bool IsSliceSupported(const TensorInfo& input,
342  const TensorInfo& output,
343  const SliceDescriptor& descriptor,
344  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
345 
346  virtual bool IsSoftmaxSupported(const TensorInfo& input,
347  const TensorInfo& output,
348  const SoftmaxDescriptor& descriptor,
349  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
350 
351  virtual bool IsSpaceToBatchNdSupported(const TensorInfo& input,
352  const TensorInfo& output,
353  const SpaceToBatchNdDescriptor& descriptor,
354  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
355 
356  virtual bool IsSpaceToDepthSupported(const TensorInfo& input,
357  const TensorInfo& output,
358  const SpaceToDepthDescriptor& descriptor,
359  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
360 
361  ARMNN_DEPRECATED_MSG("Use IsSplitterSupported with outputs instead")
362  virtual bool IsSplitterSupported(const TensorInfo& input,
363  const ViewsDescriptor& descriptor,
364  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
365 
366  virtual bool IsSplitterSupported(const TensorInfo& input,
367  const std::vector<std::reference_wrapper<TensorInfo>>& outputs,
368  const ViewsDescriptor& descriptor,
369  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
370 
371  virtual bool IsStackSupported(const std::vector<const TensorInfo*>& inputs,
372  const TensorInfo& output,
373  const StackDescriptor& descriptor,
374  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
375 
376  virtual bool IsStandInSupported(const std::vector<const TensorInfo*>& inputs,
377  const std::vector<const TensorInfo*>& outputs,
378  const StandInDescriptor& descriptor,
379  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
380 
381 
382  virtual bool IsStridedSliceSupported(const TensorInfo& input,
383  const TensorInfo& output,
384  const StridedSliceDescriptor& descriptor,
385  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
386 
387  virtual bool IsSubtractionSupported(const TensorInfo& input0,
388  const TensorInfo& input1,
389  const TensorInfo& output,
390  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
391 
392  virtual bool IsSwitchSupported(const TensorInfo& input0,
393  const TensorInfo& input1,
394  const TensorInfo& output0,
395  const TensorInfo& output1,
396  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
397 
399  const TensorInfo& input,
400  const TensorInfo& output,
401  const TransposeConvolution2dDescriptor& descriptor,
402  const TensorInfo& weights,
403  const Optional<TensorInfo>& biases,
404  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
405 
406  virtual bool IsTransposeSupported(const TensorInfo& input,
407  const TensorInfo& output,
408  const TransposeDescriptor& descriptor,
409  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
410 
411 }; // class ILayerSupport
412 
413 using ILayerSupportSharedPtr = std::shared_ptr<ILayerSupport>;
414 
415 } // namespace armnn
virtual bool IsTransposeSupported(const TensorInfo &input, const TensorInfo &output, const TransposeDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual bool IsConvolution2dSupported(const TensorInfo &input, const TensorInfo &output, const Convolution2dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual bool IsInstanceNormalizationSupported(const TensorInfo &input, const TensorInfo &output, const InstanceNormalizationDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
A ViewsDescriptor for the SplitterLayer.
A TransposeConvolution2dDescriptor for the TransposeConvolution2dLayer.
A ReshapeDescriptor for the ReshapeLayer.
virtual bool IsDepthToSpaceSupported(const TensorInfo &input, const TensorInfo &output, const DepthToSpaceDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual bool IsResizeBilinearSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual bool IsMemImportSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
A ComparisonDescriptor for the ComparisonLayer.
Definition: Descriptors.hpp:70
virtual bool IsFloorSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
A Convolution2dDescriptor for the Convolution2dLayer.
virtual bool IsConvertFp16ToFp32Supported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
std::shared_ptr< ILayerSupport > ILayerSupportSharedPtr
virtual bool IsMergeSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual bool IsTransposeConvolution2dSupported(const TensorInfo &input, const TensorInfo &output, const TransposeConvolution2dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual bool IsGreaterSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &ouput, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual bool IsMergerSupported(const std::vector< const TensorInfo *> inputs, const TensorInfo &output, const OriginsDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual bool IsMaximumSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual bool IsDebugSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual bool IsConcatSupported(const std::vector< const TensorInfo *> inputs, const TensorInfo &output, const OriginsDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
std::vector< float > boxEncodings({ 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f })
Copyright (c) 2020 ARM Limited.
virtual bool IsSplitterSupported(const TensorInfo &input, const ViewsDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
A SpaceToDepthDescriptor for the SpaceToDepthLayer.
virtual bool IsGatherSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual bool IsMultiplicationSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual bool IsRankSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
A BatchToSpaceNdDescriptor for the BatchToSpaceNdLayer.
virtual bool IsBatchToSpaceNdSupported(const TensorInfo &input, const TensorInfo &output, const BatchToSpaceNdDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
A ResizeDescriptor for the ResizeLayer.
A StackDescriptor for the StackLayer.
A PadDescriptor for the PadLayer.
virtual bool IsLstmSupported(const TensorInfo &input, const TensorInfo &outputStateIn, const TensorInfo &cellStateIn, const TensorInfo &scratchBuffer, const TensorInfo &outputStateOut, const TensorInfo &cellStateOut, const TensorInfo &output, const LstmDescriptor &descriptor, const LstmInputParamsInfo &paramsInfo, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual bool IsElementwiseUnarySupported(const TensorInfo &input, const TensorInfo &output, const ElementwiseUnaryDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual bool IsSoftmaxSupported(const TensorInfo &input, const TensorInfo &output, const SoftmaxDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual bool IsSliceSupported(const TensorInfo &input, const TensorInfo &output, const SliceDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual bool IsStandInSupported(const std::vector< const TensorInfo *> &inputs, const std::vector< const TensorInfo *> &outputs, const StandInDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
An LstmDescriptor for the LstmLayer.
virtual bool IsPreCompiledSupported(const TensorInfo &input, const PreCompiledDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual bool IsBatchNormalizationSupported(const TensorInfo &input, const TensorInfo &output, const TensorInfo &mean, const TensorInfo &var, const TensorInfo &beta, const TensorInfo &gamma, const BatchNormalizationDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual bool IsPadSupported(const TensorInfo &input, const TensorInfo &output, const PadDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
A L2NormalizationDescriptor for the L2NormalizationLayer.
An ArgMinMaxDescriptor for ArgMinMaxLayer.
Definition: Descriptors.hpp:51
An OriginsDescriptor for the ConcatLayer.
A FullyConnectedDescriptor for the FullyConnectedLayer.
virtual bool IsPermuteSupported(const TensorInfo &input, const TensorInfo &output, const PermuteDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual bool IsLogSoftmaxSupported(const TensorInfo &input, const TensorInfo &output, const LogSoftmaxDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual bool IsMemCopySupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual bool IsMeanSupported(const TensorInfo &input, const TensorInfo &output, const MeanDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual bool IsQLstmSupported(const TensorInfo &input, const TensorInfo &previousOutputIn, const TensorInfo &previousCellStateIn, const TensorInfo &outputStateOut, const TensorInfo &cellStateOut, const TensorInfo &output, const QLstmDescriptor &descriptor, const LstmInputParamsInfo &paramsInfo, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual bool IsInputSupported(const TensorInfo &input, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual bool IsReshapeSupported(const TensorInfo &input, const TensorInfo &output, const ReshapeDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
A FakeQuantizationDescriptor for the FakeQuantizationLayer.
A GatherDescriptor for the GatherLayer.
virtual bool IsActivationSupported(const TensorInfo &input, const TensorInfo &output, const ActivationDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual bool IsDepthwiseConvolutionSupported(const TensorInfo &input, const TensorInfo &output, const DepthwiseConvolution2dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
A StandInDescriptor for the StandIn layer.
A QLstmDescriptor for the QLstmLayer.
virtual bool IsDivisionSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual bool IsL2NormalizationSupported(const TensorInfo &input, const TensorInfo &output, const L2NormalizationDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
An ActivationDescriptor for the ActivationLayer.
Definition: Descriptors.hpp:20
virtual bool IsQuantizeSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
A SliceDescriptor for the SliceLayer.
virtual bool IsRsqrtSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual bool IsPooling2dSupported(const TensorInfo &input, const TensorInfo &output, const Pooling2dDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual bool IsArgMinMaxSupported(const TensorInfo &input, const TensorInfo &output, const ArgMinMaxDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual bool IsPreluSupported(const TensorInfo &input, const TensorInfo &alpha, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
A SpaceToBatchNdDescriptor for the SpaceToBatchNdLayer.
virtual bool IsFillSupported(const TensorInfo &input, const TensorInfo &output, const FillDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual bool IsStackSupported(const std::vector< const TensorInfo *> &inputs, const TensorInfo &output, const StackDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
EmptyOptional is used to initialize the Optional class in case we want to have default value for an O...
Definition: Optional.hpp:32
A ElementwiseUnaryDescriptor for the ElementwiseUnaryLayer.
Definition: Descriptors.hpp:90
std::vector< float > scores({ 0.0f, 0.9f, 0.8f, 0.0f, 0.75f, 0.72f, 0.0f, 0.6f, 0.5f, 0.0f, 0.93f, 0.95f, 0.0f, 0.5f, 0.4f, 0.0f, 0.3f, 0.2f })
virtual bool IsFakeQuantizationSupported(const TensorInfo &input, const FakeQuantizationDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual bool IsAbsSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual bool IsStridedSliceSupported(const TensorInfo &input, const TensorInfo &output, const StridedSliceDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual 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 =0
virtual bool IsAdditionSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
A MeanDescriptor for the MeanLayer.
virtual bool IsNormalizationSupported(const TensorInfo &input, const TensorInfo &output, const NormalizationDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual bool IsEqualSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
A TransposeDescriptor for the TransposeLayer.
A StridedSliceDescriptor for the StridedSliceLayer.
virtual bool IsSwitchSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output0, const TensorInfo &output1, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual bool IsConvertFp32ToFp16Supported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual bool IsConvertFp32ToBf16Supported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
#define ARMNN_DEPRECATED_MSG(message)
Definition: Deprecated.hpp:43
virtual bool IsConvertBf16ToFp32Supported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
A PreCompiledDescriptor for the PreCompiledLayer.
virtual bool IsSpaceToBatchNdSupported(const TensorInfo &input, const TensorInfo &output, const SpaceToBatchNdDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
A Pooling2dDescriptor for the Pooling2dLayer.
A NormalizationDescriptor for the NormalizationLayer.
virtual bool IsSubtractionSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
An InstanceNormalizationDescriptor for InstanceNormalizationLayer.
virtual bool IsFullyConnectedSupported(const TensorInfo &input, const TensorInfo &output, const TensorInfo &weights, const TensorInfo &biases, const FullyConnectedDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual bool IsDequantizeSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual bool IsOutputSupported(const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual bool IsResizeSupported(const TensorInfo &input, const TensorInfo &output, const ResizeDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
A SoftmaxDescriptor for the SoftmaxLayer.
virtual bool IsConstantSupported(const TensorInfo &output, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual bool IsComparisonSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, const ComparisonDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual bool IsDilatedDepthwiseConvolutionSupported(const TensorInfo &input, const TensorInfo &output, const DepthwiseConvolution2dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
A DepthwiseConvolution2dDescriptor for the DepthwiseConvolution2dLayer.
A FillDescriptor for the FillLayer.
A BatchNormalizationDescriptor for the BatchNormalizationLayer.
virtual bool IsMinimumSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &ouput, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual 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 =0
A PermuteDescriptor for the PermuteLayer.
std::vector< float > anchors({ 0.5f, 0.5f, 1.0f, 1.0f, 0.5f, 0.5f, 1.0f, 1.0f, 0.5f, 0.5f, 1.0f, 1.0f, 0.5f, 10.5f, 1.0f, 1.0f, 0.5f, 10.5f, 1.0f, 1.0f, 0.5f, 100.5f, 1.0f, 1.0f })
virtual bool IsSpaceToDepthSupported(const TensorInfo &input, const TensorInfo &output, const SpaceToDepthDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0