ArmNN
 23.08
BackendHelper.cpp
Go to the documentation of this file.
1 //
2 // Copyright © 2017,2022-2023 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
7 #include <armnn/BackendId.hpp>
10 #include <armnn/LstmParams.hpp>
12 #include <armnn/Tensor.hpp>
13 #include <armnn/Types.hpp>
16 
17 #include <stddef.h>
18 
19 namespace armnn
20 {
21 
22 // Return LayerSupportHandle instead of the previous pointer to ILayerSupport.
24 {
26 
27  if (!backendRegistry.IsBackendRegistered(backend))
28  {
29  return LayerSupportHandle(nullptr);
30  }
31 
32  auto factoryFunc = backendRegistry.GetFactory(backend);
33  auto backendObject = factoryFunc();
34  return LayerSupportHandle(backendObject->GetLayerSupport(), backend);
35 }
36 
37 Optional<const BackendOptions::BackendOption> GetCapability(const std::string& backendCapabilityName,
38  const BackendCapabilities& capabilities)
39 {
40  for (size_t i=0; i < capabilities.GetOptionCount(); i++)
41  {
42  const auto& capability = capabilities.GetOption(i);
43  if (backendCapabilityName == capability.GetName())
44  {
45  return capability;
46  }
47  }
48  return EmptyOptional();
49 }
50 
51 Optional<const BackendOptions::BackendOption> GetCapability(const std::string& backendCapabilityName,
52  const armnn::BackendId& backend)
53 {
54  auto const& backendRegistry = armnn::BackendRegistryInstance();
55  if (backendRegistry.IsBackendRegistered(backend))
56  {
57  auto factoryFunc = backendRegistry.GetFactory(backend);
58  auto backendObject = factoryFunc();
59  auto capabilities = backendObject->GetCapabilities();
60  return GetCapability(backendCapabilityName, capabilities);
61  }
62  return EmptyOptional();
63 }
64 
65 bool HasCapability(const std::string& name, const BackendCapabilities& capabilities)
66 {
67  return GetCapability(name, capabilities).has_value();
68 }
69 
70 bool HasCapability(const std::string& name, const armnn::BackendId& backend)
71 {
72  return GetCapability(name, backend).has_value();
73 }
74 
75 bool HasCapability(const BackendOptions::BackendOption& capability, const BackendCapabilities& capabilities)
76 {
77  return HasMatchingCapability(capability, capabilities);
78 }
79 
80 bool HasCapability(const BackendOptions::BackendOption& backendOption, const armnn::BackendId& backend)
81 {
82  return HasMatchingCapability(backendOption, backend);
83 }
84 
85 bool HasMatchingCapability(const BackendOptions::BackendOption& capability, const BackendCapabilities& capabilities)
86 {
87  for (size_t i=0; i < capabilities.GetOptionCount(); i++)
88  {
89  const auto& backendCapability = capabilities.GetOption(i);
90  if (capability.GetName() == backendCapability.GetName())
91  {
92  if (capability.GetValue().IsBool() && backendCapability.GetValue().IsBool())
93  {
94  return capability.GetValue().AsBool() == backendCapability.GetValue().AsBool();
95  }
96  else if (capability.GetValue().IsFloat() && backendCapability.GetValue().IsFloat())
97  {
98  return capability.GetValue().AsFloat() == backendCapability.GetValue().AsFloat();
99  }
100  else if (capability.GetValue().IsInt() && backendCapability.GetValue().IsInt())
101  {
102  return capability.GetValue().AsInt() == backendCapability.GetValue().AsInt();
103  }
104  else if (capability.GetValue().IsString() && backendCapability.GetValue().IsString())
105  {
106  return capability.GetValue().AsString() == backendCapability.GetValue().AsString();
107  }
108  else if (capability.GetValue().IsUnsignedInt() && backendCapability.GetValue().IsUnsignedInt())
109  {
110  return capability.GetValue().AsUnsignedInt() == backendCapability.GetValue().AsUnsignedInt();
111  }
112  }
113  }
114  return false;
115 }
116 
117 bool HasMatchingCapability(const BackendOptions::BackendOption& backendOption, const armnn::BackendId& backend)
118 {
119  auto const& backendRegistry = armnn::BackendRegistryInstance();
120  if (backendRegistry.IsBackendRegistered(backend))
121  {
122  auto factoryFunc = backendRegistry.GetFactory(backend);
123  auto backendObject = factoryFunc();
124  auto capabilities = backendObject->GetCapabilities();
125  return HasMatchingCapability(backendOption, capabilities);
126  }
127  return false;
128 }
129 
130 unsigned int GetNumberOfCacheFiles(const armnn::BackendId& backend)
131 {
132  auto const& backendRegistry = armnn::BackendRegistryInstance();
133  if (backendRegistry.IsBackendRegistered(backend))
134  {
135  auto factoryFunc = backendRegistry.GetFactory(backend);
136  auto backendObject = factoryFunc();
137  return backendObject->GetNumberOfCacheFiles();
138  }
139  return 0;
140 }
141 
143 {
144  if (m_LayerSupport)
145  {
146  return true;
147  }
148 
149  return false;
150 }
151 
152 using TensorInfos = std::vector<TensorInfo>;
153 
155  const TensorInfo& output,
156  const ActivationDescriptor& descriptor,
157  Optional<std::string&> reasonIfUnsupported)
158 {
159  TensorInfos infos{input, output};
160 
161  return m_LayerSupport->IsLayerSupported(LayerType::Activation,
162  infos,
163  descriptor,
164  EmptyOptional(),
165  EmptyOptional(),
166  reasonIfUnsupported);
167 }
168 
170  const TensorInfo& input1,
171  const TensorInfo& output,
172  Optional<std::string&> reasonIfUnsupported)
173 {
174  TensorInfos infos{input0, input1, output};
175 
176  return m_LayerSupport->IsLayerSupported(LayerType::Addition,
177  infos,
178  BaseDescriptor(),
179  EmptyOptional(),
180  EmptyOptional(),
181  reasonIfUnsupported);
182 }
183 
185  const TensorInfo& output,
186  const ArgMinMaxDescriptor& descriptor,
187  Optional<std::string&> reasonIfUnsupported)
188 {
189  TensorInfos infos{input, output};
190 
191  return m_LayerSupport->IsLayerSupported(LayerType::ArgMinMax,
192  infos,
193  descriptor,
194  EmptyOptional(),
195  EmptyOptional(),
196  reasonIfUnsupported);
197 }
198 
200  const TensorInfo& input1,
201  const TensorInfo& output,
202  const BatchMatMulDescriptor& descriptor,
203  Optional<std::string&> reasonIfUnsupported)
204 {
205  TensorInfos infos{input0, input1, output};
206 
207  return m_LayerSupport->IsLayerSupported(LayerType::BatchMatMul,
208  infos,
209  descriptor,
210  EmptyOptional(),
211  EmptyOptional(),
212  reasonIfUnsupported);
213 }
214 
216  const TensorInfo& output,
217  const TensorInfo& mean,
218  const TensorInfo& var,
219  const TensorInfo& beta,
220  const TensorInfo& gamma,
221  const BatchNormalizationDescriptor& descriptor,
222  Optional<std::string&> reasonIfUnsupported)
223 {
224  TensorInfos infos{input, output, mean, var, beta, gamma};
225 
226  return m_LayerSupport->IsLayerSupported(LayerType::BatchNormalization,
227  infos,
228  descriptor,
229  EmptyOptional(),
230  EmptyOptional(),
231  reasonIfUnsupported);
232 }
233 
235  const TensorInfo& output,
236  const BatchToSpaceNdDescriptor& descriptor,
237  Optional<std::string&> reasonIfUnsupported)
238 {
239  TensorInfos infos{input, output};
240 
241  return m_LayerSupport->IsLayerSupported(LayerType::BatchToSpaceNd,
242  infos,
243  descriptor,
244  EmptyOptional(),
245  EmptyOptional(),
246  reasonIfUnsupported);
247 }
248 
250  const TensorInfo& output,
251  Optional<std::string&> reasonIfUnsupported)
252 {
253  TensorInfos infos{input, output};
254 
255  return m_LayerSupport->IsLayerSupported(LayerType::Cast,
256  infos,
257  BaseDescriptor(),
258  EmptyOptional(),
259  EmptyOptional(),
260  reasonIfUnsupported);
261 }
262 
264  const TensorInfo &output,
265  const ChannelShuffleDescriptor &descriptor,
266  Optional<std::string &> reasonIfUnsupported)
267 {
268  TensorInfos infos{input, output};
269 
270  return m_LayerSupport->IsLayerSupported(LayerType::ChannelShuffle,
271  infos,
272  descriptor,
273  EmptyOptional(),
274  EmptyOptional(),
275  reasonIfUnsupported);
276 }
277 
279  const TensorInfo& input1,
280  const TensorInfo& output,
281  const ComparisonDescriptor& descriptor,
282  Optional<std::string&> reasonIfUnsupported)
283 {
284  TensorInfos infos{input0, input1, output};
285 
286  return m_LayerSupport->IsLayerSupported(LayerType::Comparison,
287  infos,
288  descriptor,
289  EmptyOptional(),
290  EmptyOptional(),
291  reasonIfUnsupported);
292 }
293 
294 bool LayerSupportHandle::IsConcatSupported(const std::vector<const TensorInfo*> inputs,
295  const TensorInfo& output,
296  const OriginsDescriptor& descriptor,
297  Optional<std::string&> reasonIfUnsupported)
298 {
299  TensorInfos infos;
300  for (const TensorInfo* inputInfo : inputs)
301  {
302  infos.push_back(*inputInfo);
303  }
304  infos.push_back(output);
305 
306  return m_LayerSupport->IsLayerSupported(LayerType::Concat,
307  infos,
308  descriptor,
309  EmptyOptional(),
310  EmptyOptional(),
311  reasonIfUnsupported);
312 }
313 
315  Optional<std::string&> reasonIfUnsupported)
316 {
317  TensorInfos infos{output};
318 
319  return m_LayerSupport->IsLayerSupported(LayerType::Constant,
320  infos,
321  BaseDescriptor(),
322  EmptyOptional(),
323  EmptyOptional(),
324  reasonIfUnsupported);
325 }
326 
328  const TensorInfo& output,
329  Optional<std::string&> reasonIfUnsupported)
330 {
331  TensorInfos infos{input, output};
332 
333  return m_LayerSupport->IsLayerSupported(LayerType::ConvertFp16ToFp32,
334  infos,
335  BaseDescriptor(),
336  EmptyOptional(),
337  EmptyOptional(),
338  reasonIfUnsupported);
339 }
340 
342  const TensorInfo& output,
343  Optional<std::string&> reasonIfUnsupported)
344 {
345  TensorInfos infos{input, output};
346 
347  return m_LayerSupport->IsLayerSupported(LayerType::ConvertFp32ToFp16,
348  infos,
349  BaseDescriptor(),
350  EmptyOptional(),
351  EmptyOptional(),
352  reasonIfUnsupported);
353 }
354 
356  const TensorInfo& output,
357  const Convolution2dDescriptor& descriptor,
358  const TensorInfo& weights,
359  const Optional<TensorInfo>& biases,
360  Optional<std::string&> reasonIfUnsupported)
361 {
362  TensorInfo biasesVal = biases.has_value() ? biases.value() : TensorInfo();
363  TensorInfos infos{input, output, weights, biasesVal};
364 
366  if (!m_BackendId.IsUndefined())
367  {
368  capability = GetCapability("NonConstWeights", m_BackendId);
369  if (!capability.has_value() || capability.value().GetValue().AsBool() == false)
370  {
371  if (!weights.IsConstant())
372  {
373  if (reasonIfUnsupported.has_value())
374  {
375  reasonIfUnsupported.value() =
376  "Backend is not capable of supporting dynamic weights (NonConstWeights) and "
377  "Convolution2d weights are set as dynamic (non constant). ";
378  }
379  return false;
380  }
381  if (descriptor.m_BiasEnabled && !biasesVal.IsConstant())
382  {
383  if (reasonIfUnsupported.has_value())
384  {
385  reasonIfUnsupported.value() =
386  "Backend is not capable of supporting dynamic biases (NonConstWeights) and "
387  "Convolution2d biases are set as dynamic (non constant). ";
388  }
389  return false;
390  }
391 
392  // At the first stage we will only print a warning. this is to give
393  // backend developers a chance to adopt and read weights from input slots.
394  ARMNN_LOG(warning) << "The backend makes use of a deprecated interface to read constant tensors. "
395  "If you are a backend developer please find more information in our "
396  "doxygen documentation on github https://github.com/ARM-software/armnn "
397  "under the keyword 'ConstTensorsAsInputs'.";
398  }
399  }
400 
401  return m_LayerSupport->IsLayerSupported(LayerType::Convolution2d,
402  infos,
403  descriptor,
404  EmptyOptional(),
405  EmptyOptional(),
406  reasonIfUnsupported);
407 }
408 
410  const TensorInfo& output,
411  const Convolution3dDescriptor& descriptor,
412  const TensorInfo& weights,
413  const Optional<TensorInfo>& biases,
414  Optional<std::string&> reasonIfUnsupported)
415 {
416  TensorInfo biasesVal = biases.has_value() ? biases.value() : TensorInfo();
417  TensorInfos infos{input, output, weights, biasesVal};
418 
419  return m_LayerSupport->IsLayerSupported(LayerType::Convolution3d,
420  infos,
421  descriptor,
422  EmptyOptional(),
423  EmptyOptional(),
424  reasonIfUnsupported);
425 }
426 
428  const TensorInfo& output,
429  Optional<std::string&> reasonIfUnsupported)
430 {
431  TensorInfos infos{input, output};
432 
433  return m_LayerSupport->IsLayerSupported(LayerType::Debug,
434  infos,
435  BaseDescriptor(),
436  EmptyOptional(),
437  EmptyOptional(),
438  reasonIfUnsupported);
439 }
440 
442  const TensorInfo& output,
443  const DepthToSpaceDescriptor& descriptor,
444  Optional<std::string&> reasonIfUnsupported)
445 {
446  TensorInfos infos{input, output};
447 
448  return m_LayerSupport->IsLayerSupported(LayerType::DepthToSpace,
449  infos,
450  descriptor,
451  EmptyOptional(),
452  EmptyOptional(),
453  reasonIfUnsupported);
454 }
455 
457  const TensorInfo& input,
458  const TensorInfo& output,
459  const DepthwiseConvolution2dDescriptor& descriptor,
460  const TensorInfo& weights,
461  const Optional<TensorInfo>& biases,
462  Optional<std::string&> reasonIfUnsupported)
463 {
464  TensorInfo biasesVal = biases.has_value() ? biases.value() : TensorInfo();
465  TensorInfos infos{input, output, weights, biasesVal};
466 
468  if (!m_BackendId.IsUndefined())
469  {
470  capability = GetCapability("NonConstWeights", m_BackendId);
471  if (!capability.has_value() || capability.value().GetValue().AsBool() == false)
472  {
473  if (!weights.IsConstant())
474  {
475  if (reasonIfUnsupported.has_value())
476  {
477  reasonIfUnsupported.value() =
478  "Backend is not capable of supporting dynamic weights (NonConstWeights) and "
479  "DepthwiseConvolution2d weights are set as dynamic (non constant). ";
480  }
481  return false;
482  }
483  if (descriptor.m_BiasEnabled && !biasesVal.IsConstant())
484  {
485  if (reasonIfUnsupported.has_value())
486  {
487  reasonIfUnsupported.value() =
488  "Backend is not capable of supporting dynamic biases (NonConstWeights) and "
489  "DepthwiseConvolution2d biases are set as dynamic (non constant). ";
490  }
491  return false;
492  }
493  // At the first stage we will only print a warning. this is to give
494  // backend developers a chance to adopt and read weights from input slots.
495  ARMNN_LOG(warning) << "The backend makes use of a deprecated interface to read constant tensors. "
496  "If you are a backend developer please find more information in our "
497  "doxygen documentation on github https://github.com/ARM-software/armnn "
498  "under the keyword 'ConstTensorsAsInputs'.";
499  }
500  }
501 
502  return m_LayerSupport->IsLayerSupported(LayerType::DepthwiseConvolution2d,
503  infos,
504  descriptor,
505  EmptyOptional(),
506  EmptyOptional(),
507  reasonIfUnsupported);
508 }
509 
511  const TensorInfo& output,
512  Optional<std::string&> reasonIfUnsupported)
513 {
514  TensorInfos infos{input, output};
515 
516  return m_LayerSupport->IsLayerSupported(LayerType::Dequantize,
517  infos,
518  BaseDescriptor(),
519  EmptyOptional(),
520  EmptyOptional(),
521  reasonIfUnsupported);
522 }
523 
525  const TensorInfo& scores,
526  const TensorInfo& anchors,
527  const TensorInfo& detectionBoxes,
528  const TensorInfo& detectionClasses,
529  const TensorInfo& detectionScores,
530  const TensorInfo& numDetections,
531  const DetectionPostProcessDescriptor& descriptor,
532  Optional<std::string&> reasonIfUnsupported)
533 {
534  TensorInfos infos{boxEncodings, scores, anchors, detectionBoxes, detectionClasses, detectionScores, numDetections};
535 
536  return m_LayerSupport->IsLayerSupported(LayerType::DetectionPostProcess,
537  infos,
538  descriptor,
539  EmptyOptional(),
540  EmptyOptional(),
541  reasonIfUnsupported);
542 }
543 
545  const TensorInfo& input,
546  const TensorInfo& output,
547  const DepthwiseConvolution2dDescriptor& descriptor,
548  const TensorInfo& weights,
549  const Optional<TensorInfo>& biases,
550  Optional<std::string&> reasonIfUnsupported)
551 {
552  TensorInfo biasesVal = biases.has_value() ? biases.value() : TensorInfo();
553  TensorInfos infos{input, output, weights, biasesVal};
554 
556  if (!m_BackendId.IsUndefined())
557  {
558  capability = GetCapability("NonConstWeights", m_BackendId);
559  if (!capability.has_value() || capability.value().GetValue().AsBool() == false)
560  {
561  if (!weights.IsConstant())
562  {
563  if (reasonIfUnsupported.has_value())
564  {
565  reasonIfUnsupported.value() =
566  "Backend is not capable of supporting dynamic weights (NonConstWeights) and "
567  "DilatedDepthwiseConvolution2d weights are set as dynamic (non constant). ";
568  }
569  return false;
570  }
571  if (descriptor.m_BiasEnabled && !biasesVal.IsConstant())
572  {
573  if (reasonIfUnsupported.has_value())
574  {
575  reasonIfUnsupported.value() =
576  "Backend is not capable of supporting dynamic biases (NonConstWeights) and "
577  "DilatedDepthwiseConvolution2d biases are set as dynamic (non constant). ";
578  }
579  return false;
580  }
581  // At the first stage we will only print a warning. this is to give
582  // backend developers a chance to adopt and read weights from input slots.
583  ARMNN_LOG(warning) << "The backend makes use of a deprecated interface to read constant tensors. "
584  "If you are a backend developer please find more information in our "
585  "doxygen documentation on github https://github.com/ARM-software/armnn "
586  "under the keyword 'ConstTensorsAsInputs'.";
587  }
588  }
589 
590  return m_LayerSupport->IsLayerSupported(LayerType::DepthwiseConvolution2d,
591  infos,
592  descriptor,
593  EmptyOptional(),
594  EmptyOptional(),
595  reasonIfUnsupported);
596 }
597 
599  const TensorInfo& input1,
600  const TensorInfo& output,
601  Optional<std::string&> reasonIfUnsupported)
602 {
603  TensorInfos infos{input0, input1, output};
604 
605  return m_LayerSupport->IsLayerSupported(LayerType::Division,
606  infos,
607  BaseDescriptor(),
608  EmptyOptional(),
609  EmptyOptional(),
610  reasonIfUnsupported);
611 }
612 
614  const TensorInfo &input1,
615  const TensorInfo &output,
616  const ElementwiseBinaryDescriptor &descriptor,
617  Optional<std::string &> reasonIfUnsupported)
618 {
619  TensorInfos infos{input0, input1, output};
620 
621  return m_LayerSupport->IsLayerSupported(LayerType::ElementwiseBinary,
622  infos,
623  descriptor,
624  EmptyOptional(),
625  EmptyOptional(),
626  reasonIfUnsupported);
627 }
628 
630  const TensorInfo& output,
631  const ElementwiseUnaryDescriptor& descriptor,
632  Optional<std::string&> reasonIfUnsupported)
633 {
634  TensorInfos infos{input, output};
635 
636  return m_LayerSupport->IsLayerSupported(LayerType::ElementwiseUnary,
637  infos,
638  descriptor,
639  EmptyOptional(),
640  EmptyOptional(),
641  reasonIfUnsupported);
642 }
643 
645  const FakeQuantizationDescriptor& descriptor,
646  Optional<std::string&> reasonIfUnsupported)
647 {
648  TensorInfos infos{input};
649 
650  return m_LayerSupport->IsLayerSupported(LayerType::FakeQuantization,
651  infos,
652  descriptor,
653  EmptyOptional(),
654  EmptyOptional(),
655  reasonIfUnsupported);
656 }
657 
659  const TensorInfo& output,
660  const FillDescriptor& descriptor,
661  Optional<std::string&> reasonIfUnsupported)
662 {
663  TensorInfos infos{input, output};
664 
665  return m_LayerSupport->IsLayerSupported(LayerType::Fill,
666  infos,
667  descriptor,
668  EmptyOptional(),
669  EmptyOptional(),
670  reasonIfUnsupported);
671 }
672 
674  const TensorInfo& output,
675  Optional<std::string&> reasonIfUnsupported)
676 {
677  TensorInfos infos{input, output};
678 
679  return m_LayerSupport->IsLayerSupported(LayerType::Floor,
680  infos,
681  BaseDescriptor(),
682  EmptyOptional(),
683  EmptyOptional(),
684  reasonIfUnsupported);
685 }
686 
688  const TensorInfo& output,
689  const TensorInfo& weights,
690  const TensorInfo& biases,
691  const FullyConnectedDescriptor& descriptor,
692  Optional<std::string&> reasonIfUnsupported)
693 {
694  TensorInfos infos{input, output, weights, biases};
695 
697  if (!m_BackendId.IsUndefined())
698  {
699  capability = GetCapability("NonConstWeights", m_BackendId);
700  if (!capability.has_value() || capability.value().GetValue().AsBool() == false)
701  {
702  if (!descriptor.m_ConstantWeights)
703  {
704  if (reasonIfUnsupported.has_value())
705  {
706  reasonIfUnsupported.value() =
707  "Backend is not capable of supporting dynamic weights (NonConstWeights) and "
708  "FullyConnected descriptor indicates that weights are dynamic (non constant). ";
709  }
710  return false;
711  }
712  if (!weights.IsConstant())
713  {
714  if (reasonIfUnsupported.has_value())
715  {
716  reasonIfUnsupported.value() =
717  "Backend is not capable of supporting dynamic weights (NonConstWeights) and "
718  "FullyConnected weights are set as dynamic (non constant). ";
719  }
720 
721  return false;
722  }
723  if (descriptor.m_BiasEnabled && !biases.IsConstant())
724  {
725  if (reasonIfUnsupported.has_value())
726  {
727  reasonIfUnsupported.value() =
728  "Backend is not capable of supporting dynamic biases (NonConstWeights) and "
729  "FullyConnected biases are set as dynamic (non constant). ";
730  }
731  return false;
732  }
733 
734  // At the first stage we will only print a warning. this is to give
735  // backend developers a chance to adopt and read weights from input slots.
736  ARMNN_LOG(warning) << "The backend makes use of a deprecated interface to read constant tensors. "
737  "If you are a backend developer please find more information in our "
738  "doxygen documentation on github https://github.com/ARM-software/armnn "
739  "under the keyword 'ConstTensorsAsInputs'.";
740  }
741  }
742 
743  return m_LayerSupport->IsLayerSupported(LayerType::FullyConnected,
744  infos,
745  descriptor,
746  EmptyOptional(),
747  EmptyOptional(),
748  reasonIfUnsupported);
749 }
750 
752  const TensorInfo& input1,
753  const TensorInfo& output,
754  const GatherDescriptor& descriptor,
755  Optional<std::string&> reasonIfUnsupported)
756 {
757  TensorInfos infos{input0, input1, output};
758 
759  return m_LayerSupport->IsLayerSupported(LayerType::Gather,
760  infos,
761  descriptor,
762  EmptyOptional(),
763  EmptyOptional(),
764  reasonIfUnsupported);
765 }
766 
768  const TensorInfo& input1,
769  const TensorInfo& output,
770  Optional<std::string&> reasonIfUnsupported)
771 {
772  TensorInfos infos{input0, input1, output};
773 
774  return m_LayerSupport->IsLayerSupported(LayerType::GatherNd,
775  infos,
776  BaseDescriptor(),
777  EmptyOptional(),
778  EmptyOptional(),
779  reasonIfUnsupported);
780 }
781 
783  Optional<std::string&> reasonIfUnsupported)
784 {
785  TensorInfos infos{input};
786 
787  return m_LayerSupport->IsLayerSupported(LayerType::Input,
788  infos,
789  BaseDescriptor(),
790  EmptyOptional(),
791  EmptyOptional(),
792  reasonIfUnsupported);
793 }
794 
796  const TensorInfo& input,
797  const TensorInfo& output,
798  const InstanceNormalizationDescriptor& descriptor,
799  Optional<std::string&> reasonIfUnsupported)
800 {
801  TensorInfos infos{input, output};
802 
803  return m_LayerSupport->IsLayerSupported(LayerType::InstanceNormalization,
804  infos,
805  descriptor,
806  EmptyOptional(),
807  EmptyOptional(),
808  reasonIfUnsupported);
809 }
810 
812  const TensorInfo& output,
813  const L2NormalizationDescriptor& descriptor,
814  Optional<std::string&> reasonIfUnsupported)
815 {
816  TensorInfos infos{input, output};
817 
818  return m_LayerSupport->IsLayerSupported(LayerType::L2Normalization,
819  infos,
820  descriptor,
821  EmptyOptional(),
822  EmptyOptional(),
823  reasonIfUnsupported);
824 }
825 
827  const TensorInfo& input1,
828  const TensorInfo& output,
829  const LogicalBinaryDescriptor& descriptor,
830  Optional<std::string&> reasonIfUnsupported)
831 {
832  TensorInfos infos{input0, input1, output};
833 
834  return m_LayerSupport->IsLayerSupported(LayerType::LogicalBinary,
835  infos,
836  descriptor,
837  EmptyOptional(),
838  EmptyOptional(),
839  reasonIfUnsupported);
840 }
841 
843  const TensorInfo& output,
844  const ElementwiseUnaryDescriptor& descriptor,
845  Optional<std::string&> reasonIfUnsupported)
846 {
847  TensorInfos infos{input, output};
848 
849  return m_LayerSupport->IsLayerSupported(LayerType::ElementwiseUnary,
850  infos,
851  descriptor,
852  EmptyOptional(),
853  EmptyOptional(),
854  reasonIfUnsupported);
855 }
856 
858  const TensorInfo& output,
859  const LogSoftmaxDescriptor& descriptor,
860  Optional<std::string&> reasonIfUnsupported)
861 {
862  TensorInfos infos{input, output};
863 
864  return m_LayerSupport->IsLayerSupported(LayerType::LogSoftmax,
865  infos,
866  descriptor,
867  EmptyOptional(),
868  EmptyOptional(),
869  reasonIfUnsupported);
870 }
871 
873  const TensorInfo& outputStateIn,
874  const TensorInfo& cellStateIn,
875  const TensorInfo& scratchBuffer,
876  const TensorInfo& outputStateOut,
877  const TensorInfo& cellStateOut,
878  const TensorInfo& output,
879  const LstmDescriptor& descriptor,
880  const LstmInputParamsInfo& paramsInfo,
881  Optional<std::string&> reasonIfUnsupported)
882 {
883  TensorInfos infos{input, outputStateIn, cellStateIn, scratchBuffer, outputStateOut, cellStateOut, output};
884 
885  return m_LayerSupport->IsLayerSupported(LayerType::Lstm,
886  infos,
887  descriptor,
888  paramsInfo,
889  EmptyOptional(),
890  reasonIfUnsupported);
891 }
892 
894  const TensorInfo& input1,
895  const TensorInfo& output,
896  Optional<std::string&> reasonIfUnsupported)
897 {
898  TensorInfos infos{input0, input1, output};
899 
900  return m_LayerSupport->IsLayerSupported(LayerType::Maximum,
901  infos,
902  BaseDescriptor(),
903  EmptyOptional(),
904  EmptyOptional(),
905  reasonIfUnsupported);
906 }
907 
909  const TensorInfo& output,
910  const MeanDescriptor& descriptor,
911  Optional<std::string&> reasonIfUnsupported)
912 {
913  TensorInfos infos{input, output};
914 
915  return m_LayerSupport->IsLayerSupported(LayerType::Mean,
916  infos,
917  descriptor,
918  EmptyOptional(),
919  EmptyOptional(),
920  reasonIfUnsupported);
921 }
922 
924  const TensorInfo& output,
925  Optional<std::string&> reasonIfUnsupported)
926 {
927  TensorInfos infos{input, output};
928 
929  return m_LayerSupport->IsLayerSupported(LayerType::MemCopy,
930  infos,
931  BaseDescriptor(),
932  EmptyOptional(),
933  EmptyOptional(),
934  reasonIfUnsupported);
935 }
936 
938  const TensorInfo& output,
939  Optional<std::string&> reasonIfUnsupported)
940 {
941  TensorInfos infos{input, output};
942 
943  return m_LayerSupport->IsLayerSupported(LayerType::MemImport,
944  infos,
945  BaseDescriptor(),
946  EmptyOptional(),
947  EmptyOptional(),
948  reasonIfUnsupported);
949 }
950 
952  const TensorInfo& input1,
953  const TensorInfo& output,
954  Optional<std::string&> reasonIfUnsupported)
955 {
956  TensorInfos infos{input0, input1, output};
957 
958  return m_LayerSupport->IsLayerSupported(LayerType::Merge,
959  infos,
960  BaseDescriptor(),
961  EmptyOptional(),
962  EmptyOptional(),
963  reasonIfUnsupported);
964 }
965 
967  const TensorInfo& input1,
968  const TensorInfo& output,
969  Optional<std::string&> reasonIfUnsupported)
970 {
971  TensorInfos infos{input0, input1, output};
972 
973  return m_LayerSupport->IsLayerSupported(LayerType::Minimum,
974  infos,
975  BaseDescriptor(),
976  EmptyOptional(),
977  EmptyOptional(),
978  reasonIfUnsupported);
979 }
980 
982  const TensorInfo& input1,
983  const TensorInfo& output,
984  Optional<std::string&> reasonIfUnsupported)
985 {
986  TensorInfos infos{input0, input1, output};
987 
988  return m_LayerSupport->IsLayerSupported(LayerType::Multiplication,
989  infos,
990  BaseDescriptor(),
991  EmptyOptional(),
992  EmptyOptional(),
993  reasonIfUnsupported);
994 }
995 
997  const TensorInfo& output,
998  const NormalizationDescriptor& descriptor,
999  Optional<std::string&> reasonIfUnsupported)
1000 {
1001  TensorInfos infos{input, output};
1002 
1003  return m_LayerSupport->IsLayerSupported(LayerType::Normalization,
1004  infos,
1005  descriptor,
1006  EmptyOptional(),
1007  EmptyOptional(),
1008  reasonIfUnsupported);
1009 }
1010 
1012  Optional<std::string&> reasonIfUnsupported)
1013 {
1014  TensorInfos infos{output};
1015 
1016  return m_LayerSupport->IsLayerSupported(LayerType::Output,
1017  infos,
1018  BaseDescriptor(),
1019  EmptyOptional(),
1020  EmptyOptional(),
1021  reasonIfUnsupported);
1022 }
1023 
1025  const TensorInfo& output,
1026  const PadDescriptor& descriptor,
1027  Optional<std::string&> reasonIfUnsupported)
1028 {
1029  TensorInfos infos{input, output};
1030 
1031  return m_LayerSupport->IsLayerSupported(LayerType::Pad,
1032  infos,
1033  descriptor,
1034  EmptyOptional(),
1035  EmptyOptional(),
1036  reasonIfUnsupported);
1037 }
1038 
1040  const TensorInfo& output,
1041  const PermuteDescriptor& descriptor,
1042  Optional<std::string&> reasonIfUnsupported)
1043 {
1044  TensorInfos infos{input, output};
1045 
1046  return m_LayerSupport->IsLayerSupported(LayerType::Permute,
1047  infos,
1048  descriptor,
1049  EmptyOptional(),
1050  EmptyOptional(),
1051  reasonIfUnsupported);
1052 }
1053 
1055  const TensorInfo& output,
1056  const Pooling2dDescriptor& descriptor,
1057  Optional<std::string&> reasonIfUnsupported)
1058 {
1059  TensorInfos infos{input, output};
1060 
1061  return m_LayerSupport->IsLayerSupported(LayerType::Pooling2d,
1062  infos,
1063  descriptor,
1064  EmptyOptional(),
1065  EmptyOptional(),
1066  reasonIfUnsupported);
1067 }
1068 
1070  const TensorInfo& output,
1071  const Pooling3dDescriptor& descriptor,
1072  Optional<std::string&> reasonIfUnsupported)
1073 {
1074  TensorInfos infos{input, output};
1075 
1076  return m_LayerSupport->IsLayerSupported(LayerType::Pooling3d,
1077  infos,
1078  descriptor,
1079  EmptyOptional(),
1080  EmptyOptional(),
1081  reasonIfUnsupported);
1082 }
1083 
1085  const PreCompiledDescriptor& descriptor,
1086  Optional<std::string&> reasonIfUnsupported)
1087 {
1088  TensorInfos infos{input};
1089 
1090  return m_LayerSupport->IsLayerSupported(LayerType::PreCompiled,
1091  infos,
1092  descriptor,
1093  EmptyOptional(),
1094  EmptyOptional(),
1095  reasonIfUnsupported);
1096 }
1097 
1099  const TensorInfo& alpha,
1100  const TensorInfo& output,
1101  Optional<std::string&> reasonIfUnsupported)
1102 {
1103  TensorInfos infos{input, alpha, output};
1104 
1105  return m_LayerSupport->IsLayerSupported(LayerType::Prelu,
1106  infos,
1107  BaseDescriptor(),
1108  EmptyOptional(),
1109  EmptyOptional(),
1110  reasonIfUnsupported);
1111 }
1112 
1114  const TensorInfo& output,
1115  Optional<std::string&> reasonIfUnsupported)
1116 {
1117  TensorInfos infos{input, output};
1118 
1119  return m_LayerSupport->IsLayerSupported(LayerType::Quantize,
1120  infos,
1121  BaseDescriptor(),
1122  EmptyOptional(),
1123  EmptyOptional(),
1124  reasonIfUnsupported);
1125 }
1126 
1128  const TensorInfo& previousOutputIn,
1129  const TensorInfo& previousCellStateIn,
1130  const TensorInfo& outputStateOut,
1131  const TensorInfo& cellStateOut,
1132  const TensorInfo& output,
1133  const QLstmDescriptor& descriptor,
1134  const LstmInputParamsInfo& paramsInfo,
1135  Optional<std::string&> reasonIfUnsupported)
1136 {
1137  TensorInfos infos{input, previousOutputIn, previousCellStateIn, outputStateOut, cellStateOut, output};
1138 
1139  return m_LayerSupport->IsLayerSupported(LayerType::QLstm,
1140  infos,
1141  descriptor,
1142  paramsInfo,
1143  EmptyOptional(),
1144  reasonIfUnsupported);
1145 }
1146 
1148  const TensorInfo& previousCellStateIn,
1149  const TensorInfo& previousOutputIn,
1150  const TensorInfo& cellStateOut,
1151  const TensorInfo& output,
1152  const QuantizedLstmInputParamsInfo& paramsInfo,
1153  Optional<std::string&> reasonIfUnsupported)
1154 {
1155  TensorInfos infos{input, previousCellStateIn, previousOutputIn, cellStateOut, output};
1156 
1157  return m_LayerSupport->IsLayerSupported(LayerType::QuantizedLstm,
1158  infos,
1159  BaseDescriptor(),
1160  EmptyOptional(),
1161  paramsInfo,
1162  reasonIfUnsupported);
1163 }
1164 
1166  const TensorInfo& output,
1167  Optional<std::string&> reasonIfUnsupported)
1168 {
1169  TensorInfos infos{input, output};
1170 
1171  return m_LayerSupport->IsLayerSupported(LayerType::Rank,
1172  infos,
1173  BaseDescriptor(),
1174  EmptyOptional(),
1175  EmptyOptional(),
1176  reasonIfUnsupported);
1177 }
1178 
1180  const TensorInfo& output,
1181  const ReduceDescriptor& descriptor,
1182  Optional<std::string&> reasonIfUnsupported)
1183 {
1184  TensorInfos infos{input, output};
1185 
1186  return m_LayerSupport->IsLayerSupported(LayerType::Reduce,
1187  infos,
1188  descriptor,
1189  EmptyOptional(),
1190  EmptyOptional(),
1191  reasonIfUnsupported);
1192 }
1193 
1195  const TensorInfo& output,
1196  const ReshapeDescriptor& descriptor,
1197  Optional<std::string&> reasonIfUnsupported)
1198 {
1199  TensorInfos infos{input, output};
1200 
1201  return m_LayerSupport->IsLayerSupported(LayerType::Reshape,
1202  infos,
1203  descriptor,
1204  EmptyOptional(),
1205  EmptyOptional(),
1206  reasonIfUnsupported);
1207 }
1208 
1210  const TensorInfo& output,
1211  const ResizeDescriptor& descriptor,
1212  Optional<std::string&> reasonIfUnsupported)
1213 {
1214  TensorInfos infos{input, output};
1215 
1216  return m_LayerSupport->IsLayerSupported(LayerType::Resize,
1217  infos,
1218  descriptor,
1219  EmptyOptional(),
1220  EmptyOptional(),
1221  reasonIfUnsupported);
1222 }
1223 
1225  const armnn::TensorInfo &input1,
1226  const armnn::TensorInfo &output,
1227  Optional<std::string &> reasonIfUnsupported)
1228 {
1229  TensorInfos infos{input0, input1, output};
1230 
1231  return m_LayerSupport->IsLayerSupported(LayerType::ReverseV2,
1232  infos,
1233  BaseDescriptor(),
1234  EmptyOptional(),
1235  EmptyOptional(),
1236  reasonIfUnsupported);
1237 }
1238 
1240  const TensorInfo& output,
1241  Optional<std::string&> reasonIfUnsupported)
1242 {
1243  TensorInfos infos{input, output};
1244 
1245  return m_LayerSupport->IsLayerSupported(LayerType::Shape,
1246  infos,
1247  BaseDescriptor(),
1248  EmptyOptional(),
1249  EmptyOptional(),
1250  reasonIfUnsupported);
1251 }
1252 
1254  const TensorInfo& output,
1255  const SliceDescriptor& descriptor,
1256  Optional<std::string&> reasonIfUnsupported)
1257 {
1258  TensorInfos infos{input, output};
1259 
1260  return m_LayerSupport->IsLayerSupported(LayerType::Slice,
1261  infos,
1262  descriptor,
1263  EmptyOptional(),
1264  EmptyOptional(),
1265  reasonIfUnsupported);
1266 }
1267 
1269  const TensorInfo& output,
1270  const SoftmaxDescriptor& descriptor,
1271  Optional<std::string&> reasonIfUnsupported)
1272 {
1273  TensorInfos infos{input, output};
1274 
1275  return m_LayerSupport->IsLayerSupported(LayerType::Softmax,
1276  infos,
1277  descriptor,
1278  EmptyOptional(),
1279  EmptyOptional(),
1280  reasonIfUnsupported);
1281 }
1282 
1284  const TensorInfo& output,
1285  const SpaceToBatchNdDescriptor& descriptor,
1286  Optional<std::string&> reasonIfUnsupported)
1287 {
1288  TensorInfos infos{input, output};
1289 
1290  return m_LayerSupport->IsLayerSupported(LayerType::SpaceToBatchNd,
1291  infos,
1292  descriptor,
1293  EmptyOptional(),
1294  EmptyOptional(),
1295  reasonIfUnsupported);
1296 }
1297 
1299  const TensorInfo& output,
1300  const SpaceToDepthDescriptor& descriptor,
1301  Optional<std::string&> reasonIfUnsupported)
1302 {
1303  TensorInfos infos{input, output};
1304 
1305  return m_LayerSupport->IsLayerSupported(LayerType::SpaceToDepth,
1306  infos,
1307  descriptor,
1308  EmptyOptional(),
1309  EmptyOptional(),
1310  reasonIfUnsupported);
1311 }
1312 
1314  const std::vector<std::reference_wrapper<TensorInfo>>& outputs,
1315  const ViewsDescriptor& descriptor,
1316  Optional<std::string&> reasonIfUnsupported)
1317 {
1318  TensorInfos infos{input};
1319  for (TensorInfo outInfo : outputs)
1320  {
1321  infos.push_back(outInfo);
1322  }
1323 
1324  return m_LayerSupport->IsLayerSupported(LayerType::Splitter,
1325  infos,
1326  descriptor,
1327  EmptyOptional(),
1328  EmptyOptional(),
1329  reasonIfUnsupported);
1330 }
1331 
1332 bool LayerSupportHandle::IsStackSupported(const std::vector<const TensorInfo*>& inputs,
1333  const TensorInfo& output,
1334  const StackDescriptor& descriptor,
1335  Optional<std::string&> reasonIfUnsupported)
1336 {
1337  TensorInfos infos;
1338  for (const TensorInfo* inputInfo : inputs)
1339  {
1340  infos.push_back(*inputInfo);
1341  }
1342  infos.push_back(output);
1343 
1344  return m_LayerSupport->IsLayerSupported(LayerType::Stack,
1345  infos,
1346  descriptor,
1347  EmptyOptional(),
1348  EmptyOptional(),
1349  reasonIfUnsupported);
1350 }
1351 
1352 bool LayerSupportHandle::IsStandInSupported(const std::vector<const TensorInfo*>& inputs,
1353  const std::vector<const TensorInfo*>& outputs,
1354  const StandInDescriptor& descriptor,
1355  Optional<std::string&> reasonIfUnsupported)
1356 {
1357  TensorInfos infos;
1358  for (const TensorInfo* inputInfo : inputs)
1359  {
1360  infos.push_back(*inputInfo);
1361  }
1362  for (const TensorInfo* outputInfo : outputs)
1363  {
1364  infos.push_back(*outputInfo);
1365  }
1366 
1367  return m_LayerSupport->IsLayerSupported(LayerType::StandIn,
1368  infos,
1369  descriptor,
1370  EmptyOptional(),
1371  EmptyOptional(),
1372  reasonIfUnsupported);
1373 }
1374 
1375 
1377  const TensorInfo& output,
1378  const StridedSliceDescriptor& descriptor,
1379  Optional<std::string&> reasonIfUnsupported)
1380 {
1381  TensorInfos infos{input, output};
1382 
1383  return m_LayerSupport->IsLayerSupported(LayerType::StridedSlice,
1384  infos,
1385  descriptor,
1386  EmptyOptional(),
1387  EmptyOptional(),
1388  reasonIfUnsupported);
1389 }
1390 
1392  const TensorInfo& input1,
1393  const TensorInfo& output,
1394  Optional<std::string&> reasonIfUnsupported)
1395 {
1396  TensorInfos infos{input0, input1, output};
1397 
1398  return m_LayerSupport->IsLayerSupported(LayerType::Subtraction,
1399  infos,
1400  BaseDescriptor(),
1401  EmptyOptional(),
1402  EmptyOptional(),
1403  reasonIfUnsupported);
1404 }
1405 
1407  const TensorInfo& input1,
1408  const TensorInfo& output0,
1409  const TensorInfo& output1,
1410  Optional<std::string&> reasonIfUnsupported)
1411 {
1412  TensorInfos infos{input0, input1, output0, output1};
1413 
1414  return m_LayerSupport->IsLayerSupported(LayerType::Switch,
1415  infos,
1416  BaseDescriptor(),
1417  EmptyOptional(),
1418  EmptyOptional(),
1419  reasonIfUnsupported);
1420 }
1421 
1423  const TensorInfo& output,
1424  const armnn::TileDescriptor &descriptor,
1425  Optional<std::string&> reasonIfUnsupported)
1426 {
1427  TensorInfos infos{input, output};
1428 
1429  return m_LayerSupport->IsLayerSupported(LayerType::Tile,
1430  infos,
1431  descriptor,
1432  EmptyOptional(),
1433  EmptyOptional(),
1434  reasonIfUnsupported);
1435 }
1436 
1438  const TensorInfo& input,
1439  const TensorInfo& output,
1440  const TransposeConvolution2dDescriptor& descriptor,
1441  const TensorInfo& weights,
1442  const Optional<TensorInfo>& biases,
1443  Optional<std::string&> reasonIfUnsupported)
1444 {
1445  TensorInfo biasesVal = biases.has_value() ? biases.value() : TensorInfo();
1446  TensorInfos infos{input, output, weights, biasesVal};
1447 
1448  return m_LayerSupport->IsLayerSupported(LayerType::TransposeConvolution2d,
1449  infos,
1450  descriptor,
1451  EmptyOptional(),
1452  EmptyOptional(),
1453  reasonIfUnsupported);
1454 }
1455 
1457  const TensorInfo& output,
1458  const TransposeDescriptor& descriptor,
1459  Optional<std::string&> reasonIfUnsupported)
1460 {
1461  TensorInfos infos{input, output};
1462 
1463  return m_LayerSupport->IsLayerSupported(LayerType::Transpose,
1464  infos,
1465  descriptor,
1466  EmptyOptional(),
1467  EmptyOptional(),
1468  reasonIfUnsupported);
1469 }
1470 
1472  const TensorInfo& outputStateIn,
1473  const TensorInfo& cellStateIn,
1474  const TensorInfo& outputStateOut,
1475  const TensorInfo& cellStateOut,
1476  const TensorInfo& output,
1477  const LstmDescriptor& descriptor,
1478  const LstmInputParamsInfo& paramsInfo,
1479  Optional<std::string&> reasonIfUnsupported)
1480 {
1481  TensorInfos infos{input, outputStateIn, cellStateIn, outputStateOut, cellStateOut, output};
1482 
1483  return m_LayerSupport->IsLayerSupported(LayerType::UnidirectionalSequenceLstm,
1484  infos,
1485  descriptor,
1486  paramsInfo,
1487  EmptyOptional(),
1488  reasonIfUnsupported);
1489 }
1490 
1491 }
BackendHelper.hpp
armnn::BatchNormalizationDescriptor
A BatchNormalizationDescriptor for the BatchNormalizationLayer.
Definition: Descriptors.hpp:828
armnn::LayerType::SpaceToDepth
@ SpaceToDepth
armnn::FullyConnectedDescriptor::m_ConstantWeights
bool m_ConstantWeights
Enable/disable constant weights and biases.
Definition: Descriptors.hpp:530
armnn::ViewsDescriptor
A ViewsDescriptor for the SplitterLayer.
Definition: Descriptors.hpp:244
armnn::LayerType::Permute
@ Permute
armnn::ActivationDescriptor
An ActivationDescriptor for the ActivationLayer.
Definition: Descriptors.hpp:36
armnn::LayerSupportHandle::IsSpaceToDepthSupported
bool IsSpaceToDepthSupported(const TensorInfo &input, const TensorInfo &output, const SpaceToDepthDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:1298
armnn::FullyConnectedDescriptor
A FullyConnectedDescriptor for the FullyConnectedLayer.
Definition: Descriptors.hpp:507
armnn::BackendOptions::Var::AsInt
int AsInt() const
Definition: BackendOptions.hpp:120
armnn::LayerSupportHandle::IsStackSupported
bool IsStackSupported(const std::vector< const TensorInfo * > &inputs, const TensorInfo &output, const StackDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:1332
armnn::LayerType::Splitter
@ Splitter
armnn::LayerType::BatchNormalization
@ BatchNormalization
armnn::QLstmDescriptor
A QLstmDescriptor for the QLstmLayer.
Definition: Descriptors.hpp:1359
armnn::LayerSupportHandle::IsDetectionPostProcessSupported
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())
Definition: BackendHelper.cpp:524
armnn::Optional
Definition: Optional.hpp:270
armnn::BackendId::IsUndefined
bool IsUndefined() const
Definition: BackendId.hpp:141
armnn::LayerSupportHandle::IsOutputSupported
bool IsOutputSupported(const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:1011
armnn::BackendOptions::BackendOption::GetName
std::string GetName() const
Definition: BackendOptions.hpp:251
armnn::LayerSupportHandle::IsMemImportSupported
bool IsMemImportSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:937
armnn::DepthwiseConvolution2dDescriptor::m_BiasEnabled
bool m_BiasEnabled
Enable/disable bias.
Definition: Descriptors.hpp:708
armnn::BackendOptions::BackendOption::GetValue
Var GetValue() const
Definition: BackendOptions.hpp:252
armnn::LayerSupportHandle::IsMultiplicationSupported
bool IsMultiplicationSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:981
armnn::Pooling3dDescriptor
A Pooling3dDescriptor for the Pooling3dLayer.
Definition: Descriptors.hpp:431
armnn::LayerSupportHandle::IsTransposeConvolution2dSupported
bool IsTransposeConvolution2dSupported(const TensorInfo &input, const TensorInfo &output, const TransposeConvolution2dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:1437
armnn::LayerSupportHandle::IsArgMinMaxSupported
bool IsArgMinMaxSupported(const TensorInfo &input, const TensorInfo &output, const ArgMinMaxDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:184
armnn::ResizeDescriptor
A ResizeDescriptor for the ResizeLayer.
Definition: Descriptors.hpp:964
armnn::ArgMinMaxDescriptor
An ArgMinMaxDescriptor for ArgMinMaxLayer.
Definition: Descriptors.hpp:67
armnn::InstanceNormalizationDescriptor
An InstanceNormalizationDescriptor for InstanceNormalizationLayer.
Definition: Descriptors.hpp:847
armnn::LayerSupportHandle::IsMeanSupported
bool IsMeanSupported(const TensorInfo &input, const TensorInfo &output, const MeanDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:908
armnn::GatherDescriptor
A GatherDescriptor for the GatherLayer.
Definition: Descriptors.hpp:944
armnn::LayerSupportHandle::IsShapeSupported
bool IsShapeSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:1239
armnn::LayerType::InstanceNormalization
@ InstanceNormalization
armnn::LayerType::ConvertFp16ToFp32
@ ConvertFp16ToFp32
armnn::LayerSupportHandle::IsDepthToSpaceSupported
bool IsDepthToSpaceSupported(const TensorInfo &input, const TensorInfo &output, const DepthToSpaceDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:441
armnn::TensorInfo
Definition: Tensor.hpp:152
armnn::LayerType::Floor
@ Floor
armnn::L2NormalizationDescriptor
A L2NormalizationDescriptor for the L2NormalizationLayer.
Definition: Descriptors.hpp:809
armnn::BackendOptions::Var::AsFloat
float AsFloat() const
Definition: BackendOptions.hpp:122
armnn::LayerSupportHandle::IsMinimumSupported
bool IsMinimumSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:966
armnn::LayerSupportHandle::IsFullyConnectedSupported
bool IsFullyConnectedSupported(const TensorInfo &input, const TensorInfo &output, const TensorInfo &weights, const TensorInfo &biases, const FullyConnectedDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:687
armnn::LayerType::Transpose
@ Transpose
armnn::NormalizationDescriptor
A NormalizationDescriptor for the NormalizationLayer.
Definition: Descriptors.hpp:769
armnn::LayerType::Comparison
@ Comparison
armnn::LayerSupportHandle::IsPermuteSupported
bool IsPermuteSupported(const TensorInfo &input, const TensorInfo &output, const PermuteDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:1039
BackendId.hpp
armnn::LayerType::StridedSlice
@ StridedSlice
armnn::ChannelShuffleDescriptor
A ChannelShuffleDescriptor for the ChannelShuffle operator.
Definition: Descriptors.hpp:1541
armnn::LayerSupportHandle::IsNormalizationSupported
bool IsNormalizationSupported(const TensorInfo &input, const TensorInfo &output, const NormalizationDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:996
armnn::LayerSupportHandle::IsReverseV2Supported
bool IsReverseV2Supported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:1224
armnn::BackendOptions::BackendOption
Definition: BackendOptions.hpp:215
armnn::LayerSupportHandle::IsLogicalBinarySupported
bool IsLogicalBinarySupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, const LogicalBinaryDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:826
armnn::LayerSupportHandle::IsStridedSliceSupported
bool IsStridedSliceSupported(const TensorInfo &input, const TensorInfo &output, const StridedSliceDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:1376
armnn::LayerType::Tile
@ Tile
armnn::LayerSupportHandle::IsGatherNdSupported
bool IsGatherNdSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:767
armnn::LayerSupportHandle::IsElementwiseBinarySupported
bool IsElementwiseBinarySupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, const ElementwiseBinaryDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:613
armnn::LayerSupportHandle::IsPooling2dSupported
bool IsPooling2dSupported(const TensorInfo &input, const TensorInfo &output, const Pooling2dDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:1054
armnn::LayerType::Stack
@ Stack
BackendRegistry.hpp
armnn::StackDescriptor
A StackDescriptor for the StackLayer.
Definition: Descriptors.hpp:1230
armnn::LayerType::Normalization
@ Normalization
armnn::LayerSupportHandle::IsSoftmaxSupported
bool IsSoftmaxSupported(const TensorInfo &input, const TensorInfo &output, const SoftmaxDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:1268
armnn::LayerType::QuantizedLstm
@ QuantizedLstm
armnn::LayerType::Reduce
@ Reduce
armnn::LayerSupportHandle::IsGatherSupported
bool IsGatherSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, const GatherDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:751
armnn::GetILayerSupportByBackendId
LayerSupportHandle GetILayerSupportByBackendId(const armnn::BackendId &backend)
Convenience function to retrieve the ILayerSupportHandle for a backend.
Definition: BackendHelper.cpp:23
armnn::LayerType::ElementwiseUnary
@ ElementwiseUnary
armnn::TensorInfo::IsConstant
bool IsConstant() const
Definition: Tensor.cpp:509
ILayerSupport.hpp
armnn::BackendOptions::Var::IsUnsignedInt
bool IsUnsignedInt() const
Definition: BackendOptions.hpp:114
armnn::BackendRegistry
Definition: BackendRegistry.hpp:35
armnn::LayerType::GatherNd
@ GatherNd
armnn::LayerSupportHandle::IsInputSupported
bool IsInputSupported(const TensorInfo &input, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:782
armnn::LayerType::ElementwiseBinary
@ ElementwiseBinary
armnn::LayerSupportHandle::IsLogSoftmaxSupported
bool IsLogSoftmaxSupported(const TensorInfo &input, const TensorInfo &output, const LogSoftmaxDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:857
armnn::TensorInfos
std::vector< TensorInfo > TensorInfos
Definition: BackendHelper.cpp:152
armnn::LayerSupportHandle::IsL2NormalizationSupported
bool IsL2NormalizationSupported(const TensorInfo &input, const TensorInfo &output, const L2NormalizationDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:811
armnn::LayerSupportHandle::IsDebugSupported
bool IsDebugSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:427
armnn::LayerSupportHandle::IsBatchToSpaceNdSupported
bool IsBatchToSpaceNdSupported(const TensorInfo &input, const TensorInfo &output, const BatchToSpaceNdDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:234
armnn::QuantizedLstmInputParamsInfo
Definition: QuantizedLstmParams.hpp:119
armnn::LayerType::ConvertFp32ToFp16
@ ConvertFp32ToFp16
ARMNN_LOG
#define ARMNN_LOG(severity)
Definition: Logging.hpp:212
armnn::ElementwiseBinaryDescriptor
A ElementwiseBinaryDescriptor for the ElementwiseBinaryLayer.
Definition: Descriptors.hpp:109
armnn::LayerSupportHandle::IsComparisonSupported
bool IsComparisonSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, const ComparisonDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:278
armnn::LayerType::Slice
@ Slice
armnn::LayerSupportHandle::IsPadSupported
bool IsPadSupported(const TensorInfo &input, const TensorInfo &output, const PadDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:1024
LstmParams.hpp
armnn::BackendOptions::Var::IsInt
bool IsInt() const
Definition: BackendOptions.hpp:113
armnn::LayerSupportHandle::IsDepthwiseConvolutionSupported
bool IsDepthwiseConvolutionSupported(const TensorInfo &input, const TensorInfo &output, const DepthwiseConvolution2dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:456
armnn::LayerType::ChannelShuffle
@ ChannelShuffle
armnn::LayerSupportHandle::IsSplitterSupported
bool IsSplitterSupported(const TensorInfo &input, const std::vector< std::reference_wrapper< TensorInfo >> &outputs, const ViewsDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:1313
armnn::LayerType::Subtraction
@ Subtraction
armnn::LayerType::Prelu
@ Prelu
armnn::FullyConnectedDescriptor::m_BiasEnabled
bool m_BiasEnabled
Enable/disable bias.
Definition: Descriptors.hpp:526
armnn::LayerSupportHandle::IsSliceSupported
bool IsSliceSupported(const TensorInfo &input, const TensorInfo &output, const SliceDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:1253
armnn::LayerType::LogicalBinary
@ LogicalBinary
armnn::LayerType::Concat
@ Concat
armnn::PadDescriptor
A PadDescriptor for the PadLayer.
Definition: Descriptors.hpp:1175
armnn::BackendOptions::Var::IsString
bool IsString() const
Definition: BackendOptions.hpp:116
armnn::TransposeDescriptor
A TransposeDescriptor for the TransposeLayer.
Definition: Descriptors.hpp:1469
armnn::LayerType::TransposeConvolution2d
@ TransposeConvolution2d
armnn::LayerType::Merge
@ Merge
armnn::EmptyOptional
EmptyOptional is used to initialize the Optional class in case we want to have default value for an O...
Definition: Optional.hpp:32
armnn::SliceDescriptor
A SliceDescriptor for the SliceLayer.
Definition: Descriptors.hpp:1207
armnn::LayerType::StandIn
@ StandIn
armnn::LayerType::Debug
@ Debug
IBackendInternal.hpp
armnn::LayerType::Softmax
@ Softmax
armnn::LayerSupportHandle::IsBatchMatMulSupported
bool IsBatchMatMulSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, const BatchMatMulDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:199
armnn::BackendRegistryInstance
BackendRegistry & BackendRegistryInstance()
Definition: BackendRegistry.cpp:15
armnn::Convolution2dDescriptor::m_BiasEnabled
bool m_BiasEnabled
Enable/disable bias.
Definition: Descriptors.hpp:582
armnn::ReshapeDescriptor
A ReshapeDescriptor for the ReshapeLayer.
Definition: Descriptors.hpp:1002
armnn::LayerSupportHandle::IsRankSupported
bool IsRankSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:1165
armnn::LayerSupportHandle::IsTransposeSupported
bool IsTransposeSupported(const TensorInfo &input, const TensorInfo &output, const TransposeDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:1456
armnn::LayerType::Quantize
@ Quantize
armnn::LayerSupportHandle::IsMemCopySupported
bool IsMemCopySupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:923
armnn::LayerSupportHandle::IsTileSupported
bool IsTileSupported(const TensorInfo &input, const TensorInfo &output, const TileDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:1422
armnn::LayerSupportHandle::IsUnidirectionalSequenceLstmSupported
bool IsUnidirectionalSequenceLstmSupported(const TensorInfo &input, const TensorInfo &outputStateIn, const TensorInfo &cellStateIn, const TensorInfo &outputStateOut, const TensorInfo &cellStateOut, const TensorInfo &output, const LstmDescriptor &descriptor, const LstmInputParamsInfo &paramsInfo, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:1471
armnn::BackendOptions::Var::AsBool
bool AsBool() const
Value getters.
Definition: BackendOptions.hpp:119
armnn::LayerType::Multiplication
@ Multiplication
armnn::PermuteDescriptor
A PermuteDescriptor for the PermuteLayer.
Definition: Descriptors.hpp:149
armnn::BatchMatMulDescriptor
A BatchMatMulDescriptor for the BatchMatMul operator.
Definition: Descriptors.hpp:1563
armnn::LayerSupportHandle::IsCastSupported
bool IsCastSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:249
armnn::LayerType::Addition
@ Addition
armnn::SpaceToBatchNdDescriptor
A SpaceToBatchNdDescriptor for the SpaceToBatchNdLayer.
Definition: Descriptors.hpp:1022
armnn::Convolution3dDescriptor
A Convolution3dDescriptor for the Convolution3dLayer.
Definition: Descriptors.hpp:588
armnn::LayerType::DepthToSpace
@ DepthToSpace
armnn::BaseDescriptor
Base class for all descriptors.
Definition: Descriptors.hpp:22
armnn::BackendRegistry::IsBackendRegistered
bool IsBackendRegistered(const BackendId &id) const
Definition: BackendRegistry.cpp:52
armnn::LayerSupportHandle::IsFloorSupported
bool IsFloorSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:673
armnn::LayerSupportHandle::IsDivisionSupported
bool IsDivisionSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:598
armnn::LayerType::DetectionPostProcess
@ DetectionPostProcess
armnn::LayerType::MemImport
@ MemImport
armnn::LayerType::Pooling2d
@ Pooling2d
armnn::LayerSupportHandle::IsPooling3dSupported
bool IsPooling3dSupported(const TensorInfo &input, const TensorInfo &output, const Pooling3dDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:1069
armnn::LayerType::Division
@ Division
armnn::LayerSupportHandle::IsMergeSupported
bool IsMergeSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:951
armnn::HasCapability
bool HasCapability(const std::string &name, const BackendCapabilities &capabilities)
Convenience function to check if a capability exists in a BackendCapabilites struct.
Definition: BackendHelper.cpp:65
armnn::BackendOptions::Var::AsUnsignedInt
unsigned int AsUnsignedInt() const
Definition: BackendOptions.hpp:121
armnn::LayerSupportHandle::IsConcatSupported
bool IsConcatSupported(const std::vector< const TensorInfo * > inputs, const TensorInfo &output, const OriginsDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:294
armnn::LayerType::Shape
@ Shape
armnn::BackendRegistry::GetFactory
FactoryFunction GetFactory(const BackendId &id) const
Definition: BackendRegistry.cpp:57
armnn::BatchToSpaceNdDescriptor
A BatchToSpaceNdDescriptor for the BatchToSpaceNdLayer.
Definition: Descriptors.hpp:875
armnn::LayerSupportHandle::IsLogicalUnarySupported
bool IsLogicalUnarySupported(const TensorInfo &input, const TensorInfo &output, const ElementwiseUnaryDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:842
armnn::Convolution2dDescriptor
A Convolution2dDescriptor for the Convolution2dLayer.
Definition: Descriptors.hpp:534
armnn::LayerSupportHandle::IsFakeQuantizationSupported
bool IsFakeQuantizationSupported(const TensorInfo &input, const FakeQuantizationDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:644
armnn::LayerSupportHandle::IsConvolution3dSupported
bool IsConvolution3dSupported(const TensorInfo &input, const TensorInfo &output, const Convolution3dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:409
armnn::ComparisonDescriptor
A ComparisonDescriptor for the ComparisonLayer.
Definition: Descriptors.hpp:89
armnn::BackendOptions::Var::AsString
std::string AsString() const
Definition: BackendOptions.hpp:123
armnn::FillDescriptor
A FillDescriptor for the FillLayer.
Definition: Descriptors.hpp:925
armnn::LayerSupportHandle
Definition: BackendHelper.hpp:29
armnn::LayerSupportHandle::IsDilatedDepthwiseConvolutionSupported
bool IsDilatedDepthwiseConvolutionSupported(const TensorInfo &input, const TensorInfo &output, const DepthwiseConvolution2dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:544
armnn::LayerSupportHandle::IsConvolution2dSupported
bool IsConvolution2dSupported(const TensorInfo &input, const TensorInfo &output, const Convolution2dDescriptor &descriptor, const TensorInfo &weights, const Optional< TensorInfo > &biases, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:355
armnn::BackendOptions::GetOption
const BackendOption & GetOption(size_t idx) const
Definition: BackendOptions.hpp:285
armnn::BackendOptions::Var::IsFloat
bool IsFloat() const
Definition: BackendOptions.hpp:115
armnn::LayerType::FullyConnected
@ FullyConnected
armnn::LayerType::Gather
@ Gather
armnn::StandInDescriptor
A StandInDescriptor for the StandIn layer.
Definition: Descriptors.hpp:1260
armnn::LayerSupportHandle::IsInstanceNormalizationSupported
bool IsInstanceNormalizationSupported(const TensorInfo &input, const TensorInfo &output, const InstanceNormalizationDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:795
armnn::LayerType::Pooling3d
@ Pooling3d
armnn::LayerType::LogSoftmax
@ LogSoftmax
armnn::LayerType::BatchMatMul
@ BatchMatMul
armnn::LayerType::DepthwiseConvolution2d
@ DepthwiseConvolution2d
armnn::BackendOptions
Struct for the users to pass backend specific options.
Definition: BackendOptions.hpp:22
armnn::LayerType::Cast
@ Cast
armnn::LayerSupportHandle::IsMaximumSupported
bool IsMaximumSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:893
armnn::LayerType::BatchToSpaceNd
@ BatchToSpaceNd
armnn::LstmDescriptor
An LstmDescriptor for the LstmLayer.
Definition: Descriptors.hpp:1081
armnn::StridedSliceDescriptor
A StridedSliceDescriptor for the StridedSliceLayer.
Definition: Descriptors.hpp:1282
armnn::LayerType::Switch
@ Switch
armnn::LayerSupportHandle::IsBackendRegistered
bool IsBackendRegistered() const
Definition: BackendHelper.cpp:142
armnn::LayerSupportHandle::IsPreCompiledSupported
bool IsPreCompiledSupported(const TensorInfo &input, const PreCompiledDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:1084
Tensor.hpp
armnn::LayerSupportHandle::IsBatchNormalizationSupported
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())
Definition: BackendHelper.cpp:215
armnn::LogicalBinaryDescriptor
A LogicalBinaryDescriptor for the LogicalBinaryLayer.
Definition: Descriptors.hpp:1497
armnn::BackendOptions::Var::IsBool
bool IsBool() const
Type getters.
Definition: BackendOptions.hpp:112
armnn::LayerType::Reshape
@ Reshape
armnn::LayerType::SpaceToBatchNd
@ SpaceToBatchNd
armnn::LayerSupportHandle::IsChannelShuffleSupported
bool IsChannelShuffleSupported(const TensorInfo &input, const TensorInfo &output, const ChannelShuffleDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:263
armnn::LayerType::Fill
@ Fill
armnn::LayerType::L2Normalization
@ L2Normalization
armnn::LayerSupportHandle::IsPreluSupported
bool IsPreluSupported(const TensorInfo &input, const TensorInfo &alpha, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:1098
armnn::LayerType::Minimum
@ Minimum
armnn::LayerType::PreCompiled
@ PreCompiled
armnn::LayerType::UnidirectionalSequenceLstm
@ UnidirectionalSequenceLstm
BackendOptions.hpp
armnn::BackendId
Definition: BackendId.hpp:75
armnn::LayerType::ReverseV2
@ ReverseV2
armnn::BackendOptions::GetOptionCount
size_t GetOptionCount() const noexcept
Definition: BackendOptions.hpp:284
armnn::LayerSupportHandle::IsDequantizeSupported
bool IsDequantizeSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:510
armnn::OriginsDescriptor
An OriginsDescriptor for the ConcatLayer.
Definition: Descriptors.hpp:201
armnn::GetNumberOfCacheFiles
unsigned int GetNumberOfCacheFiles(const armnn::BackendId &backend)
Returns the number of cached files if backend supports caching.
Definition: BackendHelper.cpp:130
armnn::LayerType::MemCopy
@ MemCopy
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition: 01_00_quick_start.dox:6
armnn::ElementwiseUnaryDescriptor
A ElementwiseUnaryDescriptor for the ElementwiseUnaryLayer.
Definition: Descriptors.hpp:129
armnn::TransposeConvolution2dDescriptor
A TransposeConvolution2dDescriptor for the TransposeConvolution2dLayer.
Definition: Descriptors.hpp:1419
Types.hpp
armnn::LayerType::ArgMinMax
@ ArgMinMax
armnn::LayerType::Pad
@ Pad
QuantizedLstmParams.hpp
armnn::LayerSupportHandle::IsSpaceToBatchNdSupported
bool IsSpaceToBatchNdSupported(const TensorInfo &input, const TensorInfo &output, const SpaceToBatchNdDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:1283
armnn::LstmInputParamsInfo
Definition: LstmParams.hpp:63
armnn::LayerSupportHandle::IsLstmSupported
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())
Definition: BackendHelper.cpp:872
armnn::LayerType::Rank
@ Rank
armnn::LayerType::Mean
@ Mean
armnn::LayerSupportHandle::IsConvertFp16ToFp32Supported
bool IsConvertFp16ToFp32Supported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:327
armnn::LayerSupportHandle::IsReshapeSupported
bool IsReshapeSupported(const TensorInfo &input, const TensorInfo &output, const ReshapeDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:1194
armnn::LayerSupportHandle::IsConvertFp32ToFp16Supported
bool IsConvertFp32ToFp16Supported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:341
armnn::BoostLogSeverityMapping::warning
@ warning
armnn::LayerSupportHandle::IsSubtractionSupported
bool IsSubtractionSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:1391
armnn::LayerType::Input
@ Input
armnn::LayerType::Resize
@ Resize
armnn::DetectionPostProcessDescriptor
Definition: Descriptors.hpp:713
armnn::PreCompiledDescriptor
A PreCompiledDescriptor for the PreCompiledLayer.
Definition: Descriptors.hpp:1346
armnn::LayerSupportHandle::IsQuantizedLstmSupported
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())
Definition: BackendHelper.cpp:1147
armnn::LayerType::Convolution2d
@ Convolution2d
armnn::Pooling2dDescriptor
A Pooling2dDescriptor for the Pooling2dLayer.
Definition: Descriptors.hpp:371
armnn::LayerType::FakeQuantization
@ FakeQuantization
armnn::LayerType::Maximum
@ Maximum
armnn::LayerType::Activation
@ Activation
armnn::DepthwiseConvolution2dDescriptor
A DepthwiseConvolution2dDescriptor for the DepthwiseConvolution2dLayer.
Definition: Descriptors.hpp:659
armnn::LayerSupportHandle::IsConstantSupported
bool IsConstantSupported(const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:314
armnn::LayerType::Lstm
@ Lstm
armnn::LayerSupportHandle::IsQLstmSupported
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())
Definition: BackendHelper.cpp:1127
armnn::LayerType::Dequantize
@ Dequantize
armnn::LayerType::Convolution3d
@ Convolution3d
armnn::ReduceDescriptor
A ReduceDescriptor for the REDUCE operators.
Definition: Descriptors.hpp:1517
armnn::LayerSupportHandle::IsSwitchSupported
bool IsSwitchSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output0, const TensorInfo &output1, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:1406
armnn::FakeQuantizationDescriptor
A FakeQuantizationDescriptor for the FakeQuantizationLayer.
Definition: Descriptors.hpp:906
armnn::LayerSupportHandle::IsReduceSupported
bool IsReduceSupported(const TensorInfo &input, const TensorInfo &output, const ReduceDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:1179
armnn::LayerSupportHandle::IsStandInSupported
bool IsStandInSupported(const std::vector< const TensorInfo * > &inputs, const std::vector< const TensorInfo * > &outputs, const StandInDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:1352
armnn::MeanDescriptor
A MeanDescriptor for the MeanLayer.
Definition: Descriptors.hpp:1151
armnn::LayerSupportHandle::IsQuantizeSupported
bool IsQuantizeSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:1113
armnn::LayerType::QLstm
@ QLstm
armnn::OptionalReferenceSwitch< std::is_reference< T >::value, T >::value
const T & value() const
Definition: Optional.hpp:146
armnn::TileDescriptor
Definition: Descriptors.hpp:1619
armnn::LayerSupportHandle::IsAdditionSupported
bool IsAdditionSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:169
armnn::SoftmaxDescriptor
A SoftmaxDescriptor for the SoftmaxLayer.
Definition: Descriptors.hpp:177
armnn::LayerSupportHandle::IsElementwiseUnarySupported
bool IsElementwiseUnarySupported(const TensorInfo &input, const TensorInfo &output, const ElementwiseUnaryDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:629
armnn::LayerSupportHandle::IsResizeSupported
bool IsResizeSupported(const TensorInfo &input, const TensorInfo &output, const ResizeDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:1209
armnn::SpaceToDepthDescriptor
A SpaceToDepthDescriptor for the SpaceToDepthLayer.
Definition: Descriptors.hpp:1054
armnn::OptionalBase::has_value
bool has_value() const noexcept
Definition: Optional.hpp:53
armnn::LayerType::Output
@ Output
armnn::LayerType::Constant
@ Constant
armnn::LayerSupportHandle::IsActivationSupported
bool IsActivationSupported(const TensorInfo &input, const TensorInfo &output, const ActivationDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:154
armnn::GetCapability
Optional< const BackendOptions::BackendOption > GetCapability(const std::string &backendCapabilityName, const BackendCapabilities &capabilities)
Returns a BackendCapability if the backend lists the capability The BackendCapability must then be in...
Definition: BackendHelper.cpp:37
armnn::LayerSupportHandle::IsFillSupported
bool IsFillSupported(const TensorInfo &input, const TensorInfo &output, const FillDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:658
armnn::HasMatchingCapability
bool HasMatchingCapability(const BackendOptions::BackendOption &capability, const BackendCapabilities &capabilities)
Convenience function to check if a given capability matches a capability in a BackendCapabilities str...
Definition: BackendHelper.cpp:85