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