ArmNN
 21.02
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  virtual bool IsAbsSupported(const TensorInfo& input,
31  const TensorInfo& output,
32  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
33 
34  virtual bool IsActivationSupported(const TensorInfo& input,
35  const TensorInfo& output,
36  const ActivationDescriptor& descriptor,
37  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
38 
39  virtual bool IsAdditionSupported(const TensorInfo& input0,
40  const TensorInfo& input1,
41  const TensorInfo& output,
42  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
43 
44  virtual bool IsArgMinMaxSupported(const TensorInfo& input,
45  const TensorInfo& output,
46  const ArgMinMaxDescriptor& descriptor,
47  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
48 
49  virtual bool IsBatchNormalizationSupported(const TensorInfo& input,
50  const TensorInfo& output,
51  const TensorInfo& mean,
52  const TensorInfo& var,
53  const TensorInfo& beta,
54  const TensorInfo& gamma,
55  const BatchNormalizationDescriptor& descriptor,
56  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
57 
58  virtual bool IsBatchToSpaceNdSupported(const TensorInfo& input,
59  const TensorInfo& output,
60  const BatchToSpaceNdDescriptor& descriptor,
61  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
62 
63  virtual bool IsComparisonSupported(const TensorInfo& input0,
64  const TensorInfo& input1,
65  const TensorInfo& output,
66  const ComparisonDescriptor& descriptor,
67  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
68 
69  virtual bool IsConcatSupported(const std::vector<const TensorInfo*> inputs,
70  const TensorInfo& output,
71  const OriginsDescriptor& descriptor,
72  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
73 
74  virtual bool IsConstantSupported(const TensorInfo& output,
75  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
76 
77  virtual bool IsConvertBf16ToFp32Supported(const TensorInfo& input,
78  const TensorInfo& output,
79  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
80 
81  virtual bool IsConvertFp32ToBf16Supported(const TensorInfo& input,
82  const TensorInfo& output,
83  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
84 
85  virtual bool IsConvertFp16ToFp32Supported(const TensorInfo& input,
86  const TensorInfo& output,
87  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
88 
89  virtual bool IsConvertFp32ToFp16Supported(const TensorInfo& input,
90  const TensorInfo& output,
91  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
92 
93  virtual bool IsConvolution2dSupported(const TensorInfo& input,
94  const TensorInfo& output,
95  const Convolution2dDescriptor& descriptor,
96  const TensorInfo& weights,
97  const Optional<TensorInfo>& biases,
98  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
99 
100  virtual bool IsDebugSupported(const TensorInfo& input,
101  const TensorInfo& output,
102  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
103 
104  virtual bool IsDepthToSpaceSupported(const TensorInfo& input,
105  const TensorInfo& output,
106  const DepthToSpaceDescriptor& descriptor,
107  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
108 
109  virtual bool IsDepthwiseConvolutionSupported(
110  const TensorInfo& input,
111  const TensorInfo& output,
112  const DepthwiseConvolution2dDescriptor& descriptor,
113  const TensorInfo& weights,
114  const Optional<TensorInfo>& biases,
115  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
116 
117  virtual bool IsDequantizeSupported(const TensorInfo& input,
118  const TensorInfo& output,
119  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
120 
122  const TensorInfo& scores,
123  const TensorInfo& anchors,
124  const TensorInfo& detectionBoxes,
125  const TensorInfo& detectionClasses,
126  const TensorInfo& detectionScores,
127  const TensorInfo& numDetections,
128  const DetectionPostProcessDescriptor& descriptor,
129  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const =0;
130 
132  const TensorInfo& input,
133  const TensorInfo& output,
134  const DepthwiseConvolution2dDescriptor& descriptor,
135  const TensorInfo& weights,
136  const Optional<TensorInfo>& biases,
137  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
138 
139  virtual bool IsDivisionSupported(const TensorInfo& input0,
140  const TensorInfo& input1,
141  const TensorInfo& output,
142  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
143 
144  virtual bool IsElementwiseUnarySupported(const TensorInfo& input,
145  const TensorInfo& output,
146  const ElementwiseUnaryDescriptor& descriptor,
147  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
148 
149  virtual bool IsEqualSupported(const TensorInfo& input0,
150  const TensorInfo& input1,
151  const TensorInfo& output,
152  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
153 
154  virtual bool IsFakeQuantizationSupported(const TensorInfo& input,
155  const FakeQuantizationDescriptor& descriptor,
156  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
157 
158  virtual bool IsFillSupported(const TensorInfo& input,
159  const TensorInfo& output,
160  const FillDescriptor& descriptor,
161  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
162 
163  virtual bool IsFloorSupported(const TensorInfo& input,
164  const TensorInfo& output,
165  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
166 
167  virtual bool IsFullyConnectedSupported(const TensorInfo& input,
168  const TensorInfo& output,
169  const TensorInfo& weights,
170  const TensorInfo& biases,
171  const FullyConnectedDescriptor& descriptor,
172  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
173 
174  virtual bool IsGatherSupported(const TensorInfo& input0,
175  const TensorInfo& input1,
176  const TensorInfo& output,
177  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
178 
179  virtual bool IsGatherSupported(const TensorInfo& input0,
180  const TensorInfo& input1,
181  const TensorInfo& output,
182  const GatherDescriptor& descriptor,
183  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
184 
185  virtual bool IsGreaterSupported(const TensorInfo& input0,
186  const TensorInfo& input1,
187  const TensorInfo& ouput,
188  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
189 
190  virtual bool IsInputSupported(const TensorInfo& input,
191  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
192 
194  const TensorInfo& input,
195  const TensorInfo& output,
196  const InstanceNormalizationDescriptor& descriptor,
197  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
198 
199  virtual bool IsL2NormalizationSupported(const TensorInfo& input,
200  const TensorInfo& output,
201  const L2NormalizationDescriptor& descriptor,
202  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
203 
204  virtual bool IsLogicalBinarySupported(const TensorInfo& input0,
205  const TensorInfo& input1,
206  const TensorInfo& output,
207  const LogicalBinaryDescriptor& descriptor,
208  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
209 
210  virtual bool IsLogicalUnarySupported(const TensorInfo& input,
211  const TensorInfo& output,
212  const ElementwiseUnaryDescriptor& descriptor,
213  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
214 
215  virtual bool IsLogSoftmaxSupported(const TensorInfo& input,
216  const TensorInfo& output,
217  const LogSoftmaxDescriptor& descriptor,
218  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
219 
220  virtual 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()) const = 0;
230 
231  virtual bool IsMaximumSupported(const TensorInfo& input0,
232  const TensorInfo& input1,
233  const TensorInfo& output,
234  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
235 
236  virtual bool IsMeanSupported(const TensorInfo& input,
237  const TensorInfo& output,
238  const MeanDescriptor& descriptor,
239  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
240 
241  virtual bool IsMemCopySupported(const TensorInfo& input,
242  const TensorInfo& output,
243  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
244 
245  virtual bool IsMemImportSupported(const TensorInfo& input,
246  const TensorInfo& output,
247  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
248 
249  virtual bool IsMergeSupported(const TensorInfo& input0,
250  const TensorInfo& input1,
251  const TensorInfo& output,
252  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
253 
254  virtual bool IsMergerSupported(const std::vector<const TensorInfo*> inputs,
255  const TensorInfo& output,
256  const OriginsDescriptor& descriptor,
257  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
258 
259  virtual bool IsMinimumSupported(const TensorInfo& input0,
260  const TensorInfo& input1,
261  const TensorInfo& ouput,
262  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
263 
264  virtual bool IsMultiplicationSupported(const TensorInfo& input0,
265  const TensorInfo& input1,
266  const TensorInfo& output,
267  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
268 
269  virtual bool IsNormalizationSupported(const TensorInfo& input,
270  const TensorInfo& output,
271  const NormalizationDescriptor& descriptor,
272  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
273 
274  virtual bool IsOutputSupported(const TensorInfo& output,
275  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
276 
277  virtual bool IsPadSupported(const TensorInfo& input,
278  const TensorInfo& output,
279  const PadDescriptor& descriptor,
280  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
281 
282  virtual bool IsPermuteSupported(const TensorInfo& input,
283  const TensorInfo& output,
284  const PermuteDescriptor& descriptor,
285  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
286 
287  virtual bool IsPooling2dSupported(const TensorInfo& input,
288  const TensorInfo& output,
289  const Pooling2dDescriptor& descriptor,
290  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
291 
292  virtual bool IsPreCompiledSupported(const TensorInfo& input,
293  const PreCompiledDescriptor& descriptor,
294  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
295 
296  virtual bool IsPreluSupported(const TensorInfo& input,
297  const TensorInfo& alpha,
298  const TensorInfo& output,
299  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
300 
301  virtual bool IsQuantizeSupported(const TensorInfo& input,
302  const TensorInfo& output,
303  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
304 
305  virtual bool IsQLstmSupported(const TensorInfo& input,
306  const TensorInfo& previousOutputIn,
307  const TensorInfo& previousCellStateIn,
308  const TensorInfo& outputStateOut,
309  const TensorInfo& cellStateOut,
310  const TensorInfo& output,
311  const QLstmDescriptor& descriptor,
312  const LstmInputParamsInfo& paramsInfo,
313  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
314 
315  virtual bool IsQuantizedLstmSupported(const TensorInfo& input,
316  const TensorInfo& previousCellStateIn,
317  const TensorInfo& previousOutputIn,
318  const TensorInfo& cellStateOut,
319  const TensorInfo& output,
320  const QuantizedLstmInputParamsInfo& paramsInfo,
321  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
322 
323  virtual bool IsRankSupported(const TensorInfo& input,
324  const TensorInfo& output,
325  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
326 
327  virtual bool IsReduceSupported(const TensorInfo& input,
328  const TensorInfo& output,
329  const ReduceDescriptor& descriptor,
330  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
331 
332  virtual bool IsReshapeSupported(const TensorInfo& input,
333  const TensorInfo& output,
334  const ReshapeDescriptor& descriptor,
335  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
336 
337  virtual bool IsResizeBilinearSupported(const TensorInfo& input,
338  const TensorInfo& output,
339  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
340 
341  virtual bool IsResizeSupported(const TensorInfo& input,
342  const TensorInfo& output,
343  const ResizeDescriptor& descriptor,
344  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
345 
346  virtual bool IsRsqrtSupported(const TensorInfo& input,
347  const TensorInfo& output,
348  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
349 
350  virtual bool IsSliceSupported(const TensorInfo& input,
351  const TensorInfo& output,
352  const SliceDescriptor& descriptor,
353  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
354 
355  virtual bool IsSoftmaxSupported(const TensorInfo& input,
356  const TensorInfo& output,
357  const SoftmaxDescriptor& descriptor,
358  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
359 
360  virtual bool IsSpaceToBatchNdSupported(const TensorInfo& input,
361  const TensorInfo& output,
362  const SpaceToBatchNdDescriptor& descriptor,
363  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
364 
365  virtual bool IsSpaceToDepthSupported(const TensorInfo& input,
366  const TensorInfo& output,
367  const SpaceToDepthDescriptor& descriptor,
368  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
369 
370  virtual bool IsSplitterSupported(const TensorInfo& input,
371  const ViewsDescriptor& descriptor,
372  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
373 
374  virtual bool IsSplitterSupported(const TensorInfo& input,
375  const std::vector<std::reference_wrapper<TensorInfo>>& outputs,
376  const ViewsDescriptor& descriptor,
377  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
378 
379  virtual bool IsStackSupported(const std::vector<const TensorInfo*>& inputs,
380  const TensorInfo& output,
381  const StackDescriptor& descriptor,
382  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
383 
384  virtual bool IsStandInSupported(const std::vector<const TensorInfo*>& inputs,
385  const std::vector<const TensorInfo*>& outputs,
386  const StandInDescriptor& descriptor,
387  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
388 
389 
390  virtual bool IsStridedSliceSupported(const TensorInfo& input,
391  const TensorInfo& output,
392  const StridedSliceDescriptor& descriptor,
393  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
394 
395  virtual bool IsSubtractionSupported(const TensorInfo& input0,
396  const TensorInfo& input1,
397  const TensorInfo& output,
398  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
399 
400  virtual bool IsSwitchSupported(const TensorInfo& input0,
401  const TensorInfo& input1,
402  const TensorInfo& output0,
403  const TensorInfo& output1,
404  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
405 
407  const TensorInfo& input,
408  const TensorInfo& output,
409  const TransposeConvolution2dDescriptor& descriptor,
410  const TensorInfo& weights,
411  const Optional<TensorInfo>& biases,
412  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
413 
414  virtual bool IsTransposeSupported(const TensorInfo& input,
415  const TensorInfo& output,
416  const TransposeDescriptor& descriptor,
417  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
418 
419 }; // class ILayerSupport
420 
421 using ILayerSupportSharedPtr = std::shared_ptr<ILayerSupport>;
422 
423 } // namespace armnn
virtual bool IsTransposeSupported(const TensorInfo &input, const TensorInfo &output, const TransposeDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
virtual bool IsLogicalUnarySupported(const TensorInfo &input, const TensorInfo &output, const ElementwiseUnaryDescriptor &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:78
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
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.
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:56
An OriginsDescriptor for the ConcatLayer.
A ReduceDescriptor for the REDUCE operators.
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:25
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 IsLogicalBinarySupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, const LogicalBinaryDescriptor &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:98
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
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 IsReduceSupported(const TensorInfo &input, const TensorInfo &output, const ReduceDescriptor &descriptor, 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