ArmNN
 21.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  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 IsCastSupported(const TensorInfo& input,
64  const TensorInfo& output,
65  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
66 
67  virtual bool IsComparisonSupported(const TensorInfo& input0,
68  const TensorInfo& input1,
69  const TensorInfo& output,
70  const ComparisonDescriptor& descriptor,
71  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
72 
73  virtual bool IsConcatSupported(const std::vector<const TensorInfo*> inputs,
74  const TensorInfo& output,
75  const OriginsDescriptor& descriptor,
76  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
77 
78  virtual bool IsConstantSupported(const TensorInfo& output,
79  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
80 
81  virtual bool IsConvertBf16ToFp32Supported(const TensorInfo& input,
82  const TensorInfo& output,
83  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
84 
85  virtual bool IsConvertFp32ToBf16Supported(const TensorInfo& input,
86  const TensorInfo& output,
87  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
88 
89  virtual bool IsConvertFp16ToFp32Supported(const TensorInfo& input,
90  const TensorInfo& output,
91  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
92 
93  virtual bool IsConvertFp32ToFp16Supported(const TensorInfo& input,
94  const TensorInfo& output,
95  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
96 
97  virtual bool IsConvolution2dSupported(const TensorInfo& input,
98  const TensorInfo& output,
99  const Convolution2dDescriptor& descriptor,
100  const TensorInfo& weights,
101  const Optional<TensorInfo>& biases,
102  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
103 
104  virtual bool IsDebugSupported(const TensorInfo& input,
105  const TensorInfo& output,
106  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
107 
108  virtual bool IsDepthToSpaceSupported(const TensorInfo& input,
109  const TensorInfo& output,
110  const DepthToSpaceDescriptor& descriptor,
111  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
112 
113  virtual bool IsDepthwiseConvolutionSupported(
114  const TensorInfo& input,
115  const TensorInfo& output,
116  const DepthwiseConvolution2dDescriptor& descriptor,
117  const TensorInfo& weights,
118  const Optional<TensorInfo>& biases,
119  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
120 
121  virtual bool IsDequantizeSupported(const TensorInfo& input,
122  const TensorInfo& output,
123  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
124 
125  virtual bool IsDetectionPostProcessSupported(const TensorInfo& boxEncodings,
126  const TensorInfo& scores,
127  const TensorInfo& anchors,
128  const TensorInfo& detectionBoxes,
129  const TensorInfo& detectionClasses,
130  const TensorInfo& detectionScores,
131  const TensorInfo& numDetections,
132  const DetectionPostProcessDescriptor& descriptor,
133  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const =0;
134 
136  const TensorInfo& input,
137  const TensorInfo& output,
138  const DepthwiseConvolution2dDescriptor& descriptor,
139  const TensorInfo& weights,
140  const Optional<TensorInfo>& biases,
141  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
142 
143  virtual bool IsDivisionSupported(const TensorInfo& input0,
144  const TensorInfo& input1,
145  const TensorInfo& output,
146  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
147 
148  virtual bool IsElementwiseUnarySupported(const TensorInfo& input,
149  const TensorInfo& output,
150  const ElementwiseUnaryDescriptor& descriptor,
151  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
152 
153  virtual bool IsEqualSupported(const TensorInfo& input0,
154  const TensorInfo& input1,
155  const TensorInfo& output,
156  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
157 
158  virtual bool IsFakeQuantizationSupported(const TensorInfo& input,
159  const FakeQuantizationDescriptor& descriptor,
160  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
161 
162  virtual bool IsFillSupported(const TensorInfo& input,
163  const TensorInfo& output,
164  const FillDescriptor& descriptor,
165  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
166 
167  virtual bool IsFloorSupported(const TensorInfo& input,
168  const TensorInfo& output,
169  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
170 
171  virtual bool IsFullyConnectedSupported(const TensorInfo& input,
172  const TensorInfo& output,
173  const TensorInfo& weights,
174  const TensorInfo& biases,
175  const FullyConnectedDescriptor& descriptor,
176  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
177 
178  virtual bool IsGatherSupported(const TensorInfo& input0,
179  const TensorInfo& input1,
180  const TensorInfo& output,
181  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
182 
183  virtual bool IsGatherSupported(const TensorInfo& input0,
184  const TensorInfo& input1,
185  const TensorInfo& output,
186  const GatherDescriptor& descriptor,
187  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
188 
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 IsLogicalBinarySupported(const TensorInfo& input0,
209  const TensorInfo& input1,
210  const TensorInfo& output,
211  const LogicalBinaryDescriptor& descriptor,
212  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
213 
214  virtual bool IsLogicalUnarySupported(const TensorInfo& input,
215  const TensorInfo& output,
216  const ElementwiseUnaryDescriptor& descriptor,
217  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
218 
219  virtual bool IsLogSoftmaxSupported(const TensorInfo& input,
220  const TensorInfo& output,
221  const LogSoftmaxDescriptor& descriptor,
222  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
223 
224  virtual bool IsLstmSupported(const TensorInfo& input,
225  const TensorInfo& outputStateIn,
226  const TensorInfo& cellStateIn,
227  const TensorInfo& scratchBuffer,
228  const TensorInfo& outputStateOut,
229  const TensorInfo& cellStateOut,
230  const TensorInfo& output,
231  const LstmDescriptor& descriptor,
232  const LstmInputParamsInfo& paramsInfo,
233  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
234 
235  virtual bool IsMaximumSupported(const TensorInfo& input0,
236  const TensorInfo& input1,
237  const TensorInfo& output,
238  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
239 
240  virtual bool IsMeanSupported(const TensorInfo& input,
241  const TensorInfo& output,
242  const MeanDescriptor& descriptor,
243  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
244 
245  virtual bool IsMemCopySupported(const TensorInfo& input,
246  const TensorInfo& output,
247  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
248 
249  virtual bool IsMemImportSupported(const TensorInfo& input,
250  const TensorInfo& output,
251  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
252 
253  virtual bool IsMergeSupported(const TensorInfo& input0,
254  const TensorInfo& input1,
255  const TensorInfo& output,
256  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
257 
258  virtual bool IsMergerSupported(const std::vector<const TensorInfo*> inputs,
259  const TensorInfo& output,
260  const OriginsDescriptor& descriptor,
261  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
262 
263  virtual bool IsMinimumSupported(const TensorInfo& input0,
264  const TensorInfo& input1,
265  const TensorInfo& ouput,
266  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
267 
268  virtual bool IsMultiplicationSupported(const TensorInfo& input0,
269  const TensorInfo& input1,
270  const TensorInfo& output,
271  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
272 
273  virtual bool IsNormalizationSupported(const TensorInfo& input,
274  const TensorInfo& output,
275  const NormalizationDescriptor& descriptor,
276  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
277 
278  virtual bool IsOutputSupported(const TensorInfo& output,
279  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
280 
281  virtual bool IsPadSupported(const TensorInfo& input,
282  const TensorInfo& output,
283  const PadDescriptor& descriptor,
284  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
285 
286  virtual bool IsPermuteSupported(const TensorInfo& input,
287  const TensorInfo& output,
288  const PermuteDescriptor& descriptor,
289  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
290 
291  virtual bool IsPooling2dSupported(const TensorInfo& input,
292  const TensorInfo& output,
293  const Pooling2dDescriptor& descriptor,
294  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
295 
296  virtual bool IsPreCompiledSupported(const TensorInfo& input,
297  const PreCompiledDescriptor& descriptor,
298  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
299 
300  virtual bool IsPreluSupported(const TensorInfo& input,
301  const TensorInfo& alpha,
302  const TensorInfo& output,
303  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
304 
305  virtual bool IsQuantizeSupported(const TensorInfo& input,
306  const TensorInfo& output,
307  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
308 
309  virtual bool IsQLstmSupported(const TensorInfo& input,
310  const TensorInfo& previousOutputIn,
311  const TensorInfo& previousCellStateIn,
312  const TensorInfo& outputStateOut,
313  const TensorInfo& cellStateOut,
314  const TensorInfo& output,
315  const QLstmDescriptor& descriptor,
316  const LstmInputParamsInfo& paramsInfo,
317  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
318 
319  virtual bool IsQuantizedLstmSupported(const TensorInfo& input,
320  const TensorInfo& previousCellStateIn,
321  const TensorInfo& previousOutputIn,
322  const TensorInfo& cellStateOut,
323  const TensorInfo& output,
324  const QuantizedLstmInputParamsInfo& paramsInfo,
325  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
326 
327  virtual bool IsRankSupported(const TensorInfo& input,
328  const TensorInfo& output,
329  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
330 
331  virtual bool IsReduceSupported(const TensorInfo& input,
332  const TensorInfo& output,
333  const ReduceDescriptor& descriptor,
334  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
335 
336  virtual bool IsReshapeSupported(const TensorInfo& input,
337  const TensorInfo& output,
338  const ReshapeDescriptor& descriptor,
339  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
340 
341  virtual bool IsResizeBilinearSupported(const TensorInfo& input,
342  const TensorInfo& output,
343  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
344 
345  virtual bool IsResizeSupported(const TensorInfo& input,
346  const TensorInfo& output,
347  const ResizeDescriptor& descriptor,
348  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
349 
350  virtual bool IsRsqrtSupported(const TensorInfo& input,
351  const TensorInfo& output,
352  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
353 
354  virtual bool IsShapeSupported(const TensorInfo& input,
355  const TensorInfo& output,
356  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
357 
358  virtual bool IsSliceSupported(const TensorInfo& input,
359  const TensorInfo& output,
360  const SliceDescriptor& descriptor,
361  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
362 
363  virtual bool IsSoftmaxSupported(const TensorInfo& input,
364  const TensorInfo& output,
365  const SoftmaxDescriptor& descriptor,
366  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
367 
368  virtual bool IsSpaceToBatchNdSupported(const TensorInfo& input,
369  const TensorInfo& output,
370  const SpaceToBatchNdDescriptor& descriptor,
371  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
372 
373  virtual bool IsSpaceToDepthSupported(const TensorInfo& input,
374  const TensorInfo& output,
375  const SpaceToDepthDescriptor& descriptor,
376  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
377 
378  virtual bool IsSplitterSupported(const TensorInfo& input,
379  const ViewsDescriptor& descriptor,
380  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
381 
382  virtual bool IsSplitterSupported(const TensorInfo& input,
383  const std::vector<std::reference_wrapper<TensorInfo>>& outputs,
384  const ViewsDescriptor& descriptor,
385  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
386 
387  virtual bool IsStackSupported(const std::vector<const TensorInfo*>& inputs,
388  const TensorInfo& output,
389  const StackDescriptor& descriptor,
390  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
391 
392  virtual bool IsStandInSupported(const std::vector<const TensorInfo*>& inputs,
393  const std::vector<const TensorInfo*>& outputs,
394  const StandInDescriptor& descriptor,
395  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
396 
397 
398  virtual bool IsStridedSliceSupported(const TensorInfo& input,
399  const TensorInfo& output,
400  const StridedSliceDescriptor& descriptor,
401  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
402 
403  virtual bool IsSubtractionSupported(const TensorInfo& input0,
404  const TensorInfo& input1,
405  const TensorInfo& output,
406  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
407 
408  virtual bool IsSwitchSupported(const TensorInfo& input0,
409  const TensorInfo& input1,
410  const TensorInfo& output0,
411  const TensorInfo& output1,
412  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
413 
415  const TensorInfo& input,
416  const TensorInfo& output,
417  const TransposeConvolution2dDescriptor& descriptor,
418  const TensorInfo& weights,
419  const Optional<TensorInfo>& biases,
420  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
421 
422  virtual bool IsTransposeSupported(const TensorInfo& input,
423  const TensorInfo& output,
424  const TransposeDescriptor& descriptor,
425  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
426 
428  const TensorInfo& input,
429  const TensorInfo& outputStateIn,
430  const TensorInfo& cellStateIn,
431  const TensorInfo& output,
432  const Optional<TensorInfo>& hiddenStateOutput,
433  const Optional<TensorInfo>& cellStateOutput,
434  const LstmDescriptor& descriptor,
435  const LstmInputParamsInfo& paramsInfo,
436  Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
437 
438 }; // class ILayerSupport
439 
440 using ILayerSupportSharedPtr = std::shared_ptr<ILayerSupport>;
441 
442 } // 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.
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 IsUnidirectionalSequenceLstmSupported(const TensorInfo &input, const TensorInfo &outputStateIn, const TensorInfo &cellStateIn, const TensorInfo &output, const Optional< TensorInfo > &hiddenStateOutput, const Optional< TensorInfo > &cellStateOutput, const LstmDescriptor &descriptor, const LstmInputParamsInfo &paramsInfo, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0
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
virtual bool IsShapeSupported(const TensorInfo &input, const TensorInfo &output, 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
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
virtual bool IsCastSupported(const TensorInfo &input, 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.
virtual bool IsSpaceToDepthSupported(const TensorInfo &input, const TensorInfo &output, const SpaceToDepthDescriptor &descriptor, Optional< std::string &> reasonIfUnsupported=EmptyOptional()) const =0