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