ArmNN
 24.02
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 
249 
251  const TensorInfo& output,
252  const armnn::BroadcastToDescriptor& descriptor,
253  Optional<std::string&> reasonIfUnsupported)
254 {
255  TensorInfos infos{input, output};
256 
257  return m_LayerSupport->IsLayerSupported(LayerType::BroadcastTo,
258  infos,
259  descriptor,
260  EmptyOptional(),
261  EmptyOptional(),
262  reasonIfUnsupported.value());
263 }
264 
266  const TensorInfo& output,
267  Optional<std::string&> reasonIfUnsupported)
268 {
269  TensorInfos infos{input, output};
270 
271  return m_LayerSupport->IsLayerSupported(LayerType::Cast,
272  infos,
273  BaseDescriptor(),
274  EmptyOptional(),
275  EmptyOptional(),
276  reasonIfUnsupported);
277 }
278 
280  const TensorInfo &output,
281  const ChannelShuffleDescriptor &descriptor,
282  Optional<std::string &> reasonIfUnsupported)
283 {
284  TensorInfos infos{input, output};
285 
286  return m_LayerSupport->IsLayerSupported(LayerType::ChannelShuffle,
287  infos,
288  descriptor,
289  EmptyOptional(),
290  EmptyOptional(),
291  reasonIfUnsupported);
292 }
293 
295  const TensorInfo& input1,
296  const TensorInfo& output,
297  const ComparisonDescriptor& descriptor,
298  Optional<std::string&> reasonIfUnsupported)
299 {
300  TensorInfos infos{input0, input1, output};
301 
302  return m_LayerSupport->IsLayerSupported(LayerType::Comparison,
303  infos,
304  descriptor,
305  EmptyOptional(),
306  EmptyOptional(),
307  reasonIfUnsupported);
308 }
309 
310 bool LayerSupportHandle::IsConcatSupported(const std::vector<const TensorInfo*> inputs,
311  const TensorInfo& output,
312  const OriginsDescriptor& descriptor,
313  Optional<std::string&> reasonIfUnsupported)
314 {
315  TensorInfos infos;
316  for (const TensorInfo* inputInfo : inputs)
317  {
318  infos.push_back(*inputInfo);
319  }
320  infos.push_back(output);
321 
322  return m_LayerSupport->IsLayerSupported(LayerType::Concat,
323  infos,
324  descriptor,
325  EmptyOptional(),
326  EmptyOptional(),
327  reasonIfUnsupported);
328 }
329 
331  Optional<std::string&> reasonIfUnsupported)
332 {
333  TensorInfos infos{output};
334 
335  return m_LayerSupport->IsLayerSupported(LayerType::Constant,
336  infos,
337  BaseDescriptor(),
338  EmptyOptional(),
339  EmptyOptional(),
340  reasonIfUnsupported);
341 }
342 
344  const TensorInfo& output,
345  Optional<std::string&> reasonIfUnsupported)
346 {
347  TensorInfos infos{input, output};
348 
349  return m_LayerSupport->IsLayerSupported(LayerType::ConvertFp16ToFp32,
350  infos,
351  BaseDescriptor(),
352  EmptyOptional(),
353  EmptyOptional(),
354  reasonIfUnsupported);
355 }
356 
358  const TensorInfo& output,
359  Optional<std::string&> reasonIfUnsupported)
360 {
361  TensorInfos infos{input, output};
362 
363  return m_LayerSupport->IsLayerSupported(LayerType::ConvertFp32ToFp16,
364  infos,
365  BaseDescriptor(),
366  EmptyOptional(),
367  EmptyOptional(),
368  reasonIfUnsupported);
369 }
370 
372  const TensorInfo& output,
373  const Convolution2dDescriptor& descriptor,
374  const TensorInfo& weights,
375  const Optional<TensorInfo>& biases,
376  Optional<std::string&> reasonIfUnsupported)
377 {
378  TensorInfo biasesVal = biases.has_value() ? biases.value() : TensorInfo();
379  TensorInfos infos{input, output, weights, biasesVal};
380 
382  if (!m_BackendId.IsUndefined())
383  {
384  capability = GetCapability("NonConstWeights", m_BackendId);
385  if (!capability.has_value() || capability.value().GetValue().AsBool() == false)
386  {
387  if (!weights.IsConstant())
388  {
389  if (reasonIfUnsupported.has_value())
390  {
391  reasonIfUnsupported.value() =
392  "Backend is not capable of supporting dynamic weights (NonConstWeights) and "
393  "Convolution2d weights are set as dynamic (non constant). ";
394  }
395  return false;
396  }
397  if (descriptor.m_BiasEnabled && !biasesVal.IsConstant())
398  {
399  if (reasonIfUnsupported.has_value())
400  {
401  reasonIfUnsupported.value() =
402  "Backend is not capable of supporting dynamic biases (NonConstWeights) and "
403  "Convolution2d biases are set as dynamic (non constant). ";
404  }
405  return false;
406  }
407 
408  // At the first stage we will only print a warning. this is to give
409  // backend developers a chance to adopt and read weights from input slots.
410  ARMNN_LOG(warning) << "The backend makes use of a deprecated interface to read constant tensors. "
411  "If you are a backend developer please find more information in our "
412  "doxygen documentation on github https://github.com/ARM-software/armnn "
413  "under the keyword 'ConstTensorsAsInputs'.";
414  }
415  }
416 
417  return m_LayerSupport->IsLayerSupported(LayerType::Convolution2d,
418  infos,
419  descriptor,
420  EmptyOptional(),
421  EmptyOptional(),
422  reasonIfUnsupported);
423 }
424 
426  const TensorInfo& output,
427  const Convolution3dDescriptor& descriptor,
428  const TensorInfo& weights,
429  const Optional<TensorInfo>& biases,
430  Optional<std::string&> reasonIfUnsupported)
431 {
432  TensorInfo biasesVal = biases.has_value() ? biases.value() : TensorInfo();
433  TensorInfos infos{input, output, weights, biasesVal};
434 
435  return m_LayerSupport->IsLayerSupported(LayerType::Convolution3d,
436  infos,
437  descriptor,
438  EmptyOptional(),
439  EmptyOptional(),
440  reasonIfUnsupported);
441 }
442 
444  const TensorInfo& output,
445  Optional<std::string&> reasonIfUnsupported)
446 {
447  TensorInfos infos{input, output};
448 
449  return m_LayerSupport->IsLayerSupported(LayerType::Debug,
450  infos,
451  BaseDescriptor(),
452  EmptyOptional(),
453  EmptyOptional(),
454  reasonIfUnsupported);
455 }
456 
458  const TensorInfo& output,
459  const DepthToSpaceDescriptor& descriptor,
460  Optional<std::string&> reasonIfUnsupported)
461 {
462  TensorInfos infos{input, output};
463 
464  return m_LayerSupport->IsLayerSupported(LayerType::DepthToSpace,
465  infos,
466  descriptor,
467  EmptyOptional(),
468  EmptyOptional(),
469  reasonIfUnsupported);
470 }
471 
473  const TensorInfo& input,
474  const TensorInfo& output,
475  const DepthwiseConvolution2dDescriptor& descriptor,
476  const TensorInfo& weights,
477  const Optional<TensorInfo>& biases,
478  Optional<std::string&> reasonIfUnsupported)
479 {
480  TensorInfo biasesVal = biases.has_value() ? biases.value() : TensorInfo();
481  TensorInfos infos{input, output, weights, biasesVal};
482 
484  if (!m_BackendId.IsUndefined())
485  {
486  capability = GetCapability("NonConstWeights", m_BackendId);
487  if (!capability.has_value() || capability.value().GetValue().AsBool() == false)
488  {
489  if (!weights.IsConstant())
490  {
491  if (reasonIfUnsupported.has_value())
492  {
493  reasonIfUnsupported.value() =
494  "Backend is not capable of supporting dynamic weights (NonConstWeights) and "
495  "DepthwiseConvolution2d weights are set as dynamic (non constant). ";
496  }
497  return false;
498  }
499  if (descriptor.m_BiasEnabled && !biasesVal.IsConstant())
500  {
501  if (reasonIfUnsupported.has_value())
502  {
503  reasonIfUnsupported.value() =
504  "Backend is not capable of supporting dynamic biases (NonConstWeights) and "
505  "DepthwiseConvolution2d biases are set as dynamic (non constant). ";
506  }
507  return false;
508  }
509  // At the first stage we will only print a warning. this is to give
510  // backend developers a chance to adopt and read weights from input slots.
511  ARMNN_LOG(warning) << "The backend makes use of a deprecated interface to read constant tensors. "
512  "If you are a backend developer please find more information in our "
513  "doxygen documentation on github https://github.com/ARM-software/armnn "
514  "under the keyword 'ConstTensorsAsInputs'.";
515  }
516  }
517 
518  return m_LayerSupport->IsLayerSupported(LayerType::DepthwiseConvolution2d,
519  infos,
520  descriptor,
521  EmptyOptional(),
522  EmptyOptional(),
523  reasonIfUnsupported);
524 }
525 
527  const TensorInfo& output,
528  Optional<std::string&> reasonIfUnsupported)
529 {
530  TensorInfos infos{input, output};
531 
532  return m_LayerSupport->IsLayerSupported(LayerType::Dequantize,
533  infos,
534  BaseDescriptor(),
535  EmptyOptional(),
536  EmptyOptional(),
537  reasonIfUnsupported);
538 }
539 
541  const TensorInfo& scores,
542  const TensorInfo& anchors,
543  const TensorInfo& detectionBoxes,
544  const TensorInfo& detectionClasses,
545  const TensorInfo& detectionScores,
546  const TensorInfo& numDetections,
547  const DetectionPostProcessDescriptor& descriptor,
548  Optional<std::string&> reasonIfUnsupported)
549 {
550  TensorInfos infos{boxEncodings, scores, anchors, detectionBoxes, detectionClasses, detectionScores, numDetections};
551 
552  return m_LayerSupport->IsLayerSupported(LayerType::DetectionPostProcess,
553  infos,
554  descriptor,
555  EmptyOptional(),
556  EmptyOptional(),
557  reasonIfUnsupported);
558 }
559 
561  const TensorInfo& input,
562  const TensorInfo& output,
563  const DepthwiseConvolution2dDescriptor& descriptor,
564  const TensorInfo& weights,
565  const Optional<TensorInfo>& biases,
566  Optional<std::string&> reasonIfUnsupported)
567 {
568  TensorInfo biasesVal = biases.has_value() ? biases.value() : TensorInfo();
569  TensorInfos infos{input, output, weights, biasesVal};
570 
572  if (!m_BackendId.IsUndefined())
573  {
574  capability = GetCapability("NonConstWeights", m_BackendId);
575  if (!capability.has_value() || capability.value().GetValue().AsBool() == false)
576  {
577  if (!weights.IsConstant())
578  {
579  if (reasonIfUnsupported.has_value())
580  {
581  reasonIfUnsupported.value() =
582  "Backend is not capable of supporting dynamic weights (NonConstWeights) and "
583  "DilatedDepthwiseConvolution2d weights are set as dynamic (non constant). ";
584  }
585  return false;
586  }
587  if (descriptor.m_BiasEnabled && !biasesVal.IsConstant())
588  {
589  if (reasonIfUnsupported.has_value())
590  {
591  reasonIfUnsupported.value() =
592  "Backend is not capable of supporting dynamic biases (NonConstWeights) and "
593  "DilatedDepthwiseConvolution2d biases are set as dynamic (non constant). ";
594  }
595  return false;
596  }
597  // At the first stage we will only print a warning. this is to give
598  // backend developers a chance to adopt and read weights from input slots.
599  ARMNN_LOG(warning) << "The backend makes use of a deprecated interface to read constant tensors. "
600  "If you are a backend developer please find more information in our "
601  "doxygen documentation on github https://github.com/ARM-software/armnn "
602  "under the keyword 'ConstTensorsAsInputs'.";
603  }
604  }
605 
606  return m_LayerSupport->IsLayerSupported(LayerType::DepthwiseConvolution2d,
607  infos,
608  descriptor,
609  EmptyOptional(),
610  EmptyOptional(),
611  reasonIfUnsupported);
612 }
613 
615  const TensorInfo& input1,
616  const TensorInfo& output,
617  Optional<std::string&> reasonIfUnsupported)
618 {
619  TensorInfos infos{input0, input1, output};
620 
621  return m_LayerSupport->IsLayerSupported(LayerType::Division,
622  infos,
623  BaseDescriptor(),
624  EmptyOptional(),
625  EmptyOptional(),
626  reasonIfUnsupported);
627 }
628 
630  const TensorInfo &input1,
631  const TensorInfo &output,
632  const ElementwiseBinaryDescriptor &descriptor,
633  Optional<std::string &> reasonIfUnsupported)
634 {
635  TensorInfos infos{input0, input1, output};
636 
637  return m_LayerSupport->IsLayerSupported(LayerType::ElementwiseBinary,
638  infos,
639  descriptor,
640  EmptyOptional(),
641  EmptyOptional(),
642  reasonIfUnsupported);
643 }
644 
646  const TensorInfo& output,
647  const ElementwiseUnaryDescriptor& descriptor,
648  Optional<std::string&> reasonIfUnsupported)
649 {
650  TensorInfos infos{input, output};
651 
652  return m_LayerSupport->IsLayerSupported(LayerType::ElementwiseUnary,
653  infos,
654  descriptor,
655  EmptyOptional(),
656  EmptyOptional(),
657  reasonIfUnsupported);
658 }
659 
661  const FakeQuantizationDescriptor& descriptor,
662  Optional<std::string&> reasonIfUnsupported)
663 {
664  TensorInfos infos{input};
665 
666  return m_LayerSupport->IsLayerSupported(LayerType::FakeQuantization,
667  infos,
668  descriptor,
669  EmptyOptional(),
670  EmptyOptional(),
671  reasonIfUnsupported);
672 }
673 
675  const TensorInfo& output,
676  const FillDescriptor& descriptor,
677  Optional<std::string&> reasonIfUnsupported)
678 {
679  TensorInfos infos{input, output};
680 
681  return m_LayerSupport->IsLayerSupported(LayerType::Fill,
682  infos,
683  descriptor,
684  EmptyOptional(),
685  EmptyOptional(),
686  reasonIfUnsupported);
687 }
688 
690  const TensorInfo& output,
691  Optional<std::string&> reasonIfUnsupported)
692 {
693  TensorInfos infos{input, output};
694 
695  return m_LayerSupport->IsLayerSupported(LayerType::Floor,
696  infos,
697  BaseDescriptor(),
698  EmptyOptional(),
699  EmptyOptional(),
700  reasonIfUnsupported);
701 }
702 
704  const TensorInfo& output,
705  const TensorInfo& weights,
706  const TensorInfo& biases,
707  const FullyConnectedDescriptor& descriptor,
708  Optional<std::string&> reasonIfUnsupported)
709 {
710  TensorInfos infos{input, output, weights, biases};
711 
713  if (!m_BackendId.IsUndefined())
714  {
715  capability = GetCapability("NonConstWeights", m_BackendId);
716  if (!capability.has_value() || capability.value().GetValue().AsBool() == false)
717  {
718  if (!descriptor.m_ConstantWeights)
719  {
720  if (reasonIfUnsupported.has_value())
721  {
722  reasonIfUnsupported.value() =
723  "Backend is not capable of supporting dynamic weights (NonConstWeights) and "
724  "FullyConnected descriptor indicates that weights are dynamic (non constant). ";
725  }
726  return false;
727  }
728  if (!weights.IsConstant())
729  {
730  if (reasonIfUnsupported.has_value())
731  {
732  reasonIfUnsupported.value() =
733  "Backend is not capable of supporting dynamic weights (NonConstWeights) and "
734  "FullyConnected weights are set as dynamic (non constant). ";
735  }
736 
737  return false;
738  }
739  if (descriptor.m_BiasEnabled && !biases.IsConstant())
740  {
741  if (reasonIfUnsupported.has_value())
742  {
743  reasonIfUnsupported.value() =
744  "Backend is not capable of supporting dynamic biases (NonConstWeights) and "
745  "FullyConnected biases are set as dynamic (non constant). ";
746  }
747  return false;
748  }
749 
750  // At the first stage we will only print a warning. this is to give
751  // backend developers a chance to adopt and read weights from input slots.
752  ARMNN_LOG(warning) << "The backend makes use of a deprecated interface to read constant tensors. "
753  "If you are a backend developer please find more information in our "
754  "doxygen documentation on github https://github.com/ARM-software/armnn "
755  "under the keyword 'ConstTensorsAsInputs'.";
756  }
757  }
758 
759  return m_LayerSupport->IsLayerSupported(LayerType::FullyConnected,
760  infos,
761  descriptor,
762  EmptyOptional(),
763  EmptyOptional(),
764  reasonIfUnsupported);
765 }
766 
767 bool LayerSupportHandle::IsFusedSupported(const std::vector<std::reference_wrapper<TensorInfo>>& inputs,
768  const std::vector<std::reference_wrapper<TensorInfo>>& outputs,
769  const FusedDescriptor& descriptor,
770  Optional<std::string&> reasonIfUnsupported)
771 {
772  TensorInfos infos;
773  infos.reserve(inputs.size() + outputs.size());
774  for (TensorInfo inInfo : inputs)
775  {
776  infos.emplace_back(inInfo);
777  }
778  for (TensorInfo outInfo : outputs)
779  {
780  infos.emplace_back(outInfo);
781  }
782 
783  return m_LayerSupport->IsLayerSupported(LayerType::Fused,
784  infos,
785  descriptor,
786  EmptyOptional(),
787  EmptyOptional(),
788  reasonIfUnsupported);
789 }
790 
792  const TensorInfo& input1,
793  const TensorInfo& output,
794  const GatherDescriptor& descriptor,
795  Optional<std::string&> reasonIfUnsupported)
796 {
797  TensorInfos infos{input0, input1, output};
798 
799  return m_LayerSupport->IsLayerSupported(LayerType::Gather,
800  infos,
801  descriptor,
802  EmptyOptional(),
803  EmptyOptional(),
804  reasonIfUnsupported);
805 }
806 
808  const TensorInfo& input1,
809  const TensorInfo& output,
810  Optional<std::string&> reasonIfUnsupported)
811 {
812  TensorInfos infos{input0, input1, output};
813 
814  return m_LayerSupport->IsLayerSupported(LayerType::GatherNd,
815  infos,
816  BaseDescriptor(),
817  EmptyOptional(),
818  EmptyOptional(),
819  reasonIfUnsupported);
820 }
821 
823  Optional<std::string&> reasonIfUnsupported)
824 {
825  TensorInfos infos{input};
826 
827  return m_LayerSupport->IsLayerSupported(LayerType::Input,
828  infos,
829  BaseDescriptor(),
830  EmptyOptional(),
831  EmptyOptional(),
832  reasonIfUnsupported);
833 }
834 
836  const TensorInfo& input,
837  const TensorInfo& output,
838  const InstanceNormalizationDescriptor& descriptor,
839  Optional<std::string&> reasonIfUnsupported)
840 {
841  TensorInfos infos{input, output};
842 
843  return m_LayerSupport->IsLayerSupported(LayerType::InstanceNormalization,
844  infos,
845  descriptor,
846  EmptyOptional(),
847  EmptyOptional(),
848  reasonIfUnsupported);
849 }
850 
852  const TensorInfo& output,
853  const L2NormalizationDescriptor& descriptor,
854  Optional<std::string&> reasonIfUnsupported)
855 {
856  TensorInfos infos{input, output};
857 
858  return m_LayerSupport->IsLayerSupported(LayerType::L2Normalization,
859  infos,
860  descriptor,
861  EmptyOptional(),
862  EmptyOptional(),
863  reasonIfUnsupported);
864 }
865 
867  const TensorInfo& input1,
868  const TensorInfo& output,
869  const LogicalBinaryDescriptor& descriptor,
870  Optional<std::string&> reasonIfUnsupported)
871 {
872  TensorInfos infos{input0, input1, output};
873 
874  return m_LayerSupport->IsLayerSupported(LayerType::LogicalBinary,
875  infos,
876  descriptor,
877  EmptyOptional(),
878  EmptyOptional(),
879  reasonIfUnsupported);
880 }
881 
883  const TensorInfo& output,
884  const ElementwiseUnaryDescriptor& descriptor,
885  Optional<std::string&> reasonIfUnsupported)
886 {
887  TensorInfos infos{input, output};
888 
889  return m_LayerSupport->IsLayerSupported(LayerType::ElementwiseUnary,
890  infos,
891  descriptor,
892  EmptyOptional(),
893  EmptyOptional(),
894  reasonIfUnsupported);
895 }
896 
898  const TensorInfo& output,
899  const LogSoftmaxDescriptor& descriptor,
900  Optional<std::string&> reasonIfUnsupported)
901 {
902  TensorInfos infos{input, output};
903 
904  return m_LayerSupport->IsLayerSupported(LayerType::LogSoftmax,
905  infos,
906  descriptor,
907  EmptyOptional(),
908  EmptyOptional(),
909  reasonIfUnsupported);
910 }
911 
913  const TensorInfo& outputStateIn,
914  const TensorInfo& cellStateIn,
915  const TensorInfo& scratchBuffer,
916  const TensorInfo& outputStateOut,
917  const TensorInfo& cellStateOut,
918  const TensorInfo& output,
919  const LstmDescriptor& descriptor,
920  const LstmInputParamsInfo& paramsInfo,
921  Optional<std::string&> reasonIfUnsupported)
922 {
923  TensorInfos infos{input, outputStateIn, cellStateIn, scratchBuffer, outputStateOut, cellStateOut, output};
924 
925  return m_LayerSupport->IsLayerSupported(LayerType::Lstm,
926  infos,
927  descriptor,
928  paramsInfo,
929  EmptyOptional(),
930  reasonIfUnsupported);
931 }
932 
934  const TensorInfo& input1,
935  const TensorInfo& output,
936  Optional<std::string&> reasonIfUnsupported)
937 {
938  TensorInfos infos{input0, input1, output};
939 
940  return m_LayerSupport->IsLayerSupported(LayerType::Maximum,
941  infos,
942  BaseDescriptor(),
943  EmptyOptional(),
944  EmptyOptional(),
945  reasonIfUnsupported);
946 }
947 
949  const TensorInfo& output,
950  const MeanDescriptor& descriptor,
951  Optional<std::string&> reasonIfUnsupported)
952 {
953  TensorInfos infos{input, output};
954 
955  return m_LayerSupport->IsLayerSupported(LayerType::Mean,
956  infos,
957  descriptor,
958  EmptyOptional(),
959  EmptyOptional(),
960  reasonIfUnsupported);
961 }
962 
964  const TensorInfo& output,
965  Optional<std::string&> reasonIfUnsupported)
966 {
967  TensorInfos infos{input, output};
968 
969  return m_LayerSupport->IsLayerSupported(LayerType::MemCopy,
970  infos,
971  BaseDescriptor(),
972  EmptyOptional(),
973  EmptyOptional(),
974  reasonIfUnsupported);
975 }
976 
978  const TensorInfo& output,
979  Optional<std::string&> reasonIfUnsupported)
980 {
981  TensorInfos infos{input, output};
982 
983  return m_LayerSupport->IsLayerSupported(LayerType::MemImport,
984  infos,
985  BaseDescriptor(),
986  EmptyOptional(),
987  EmptyOptional(),
988  reasonIfUnsupported);
989 }
990 
992  const TensorInfo& input1,
993  const TensorInfo& output,
994  Optional<std::string&> reasonIfUnsupported)
995 {
996  TensorInfos infos{input0, input1, output};
997 
998  return m_LayerSupport->IsLayerSupported(LayerType::Merge,
999  infos,
1000  BaseDescriptor(),
1001  EmptyOptional(),
1002  EmptyOptional(),
1003  reasonIfUnsupported);
1004 }
1005 
1007  const TensorInfo& input1,
1008  const TensorInfo& output,
1009  Optional<std::string&> reasonIfUnsupported)
1010 {
1011  TensorInfos infos{input0, input1, output};
1012 
1013  return m_LayerSupport->IsLayerSupported(LayerType::Minimum,
1014  infos,
1015  BaseDescriptor(),
1016  EmptyOptional(),
1017  EmptyOptional(),
1018  reasonIfUnsupported);
1019 }
1020 
1022  const TensorInfo& input1,
1023  const TensorInfo& output,
1024  Optional<std::string&> reasonIfUnsupported)
1025 {
1026  TensorInfos infos{input0, input1, output};
1027 
1028  return m_LayerSupport->IsLayerSupported(LayerType::Multiplication,
1029  infos,
1030  BaseDescriptor(),
1031  EmptyOptional(),
1032  EmptyOptional(),
1033  reasonIfUnsupported);
1034 }
1035 
1037  const TensorInfo& output,
1038  const NormalizationDescriptor& descriptor,
1039  Optional<std::string&> reasonIfUnsupported)
1040 {
1041  TensorInfos infos{input, output};
1042 
1043  return m_LayerSupport->IsLayerSupported(LayerType::Normalization,
1044  infos,
1045  descriptor,
1046  EmptyOptional(),
1047  EmptyOptional(),
1048  reasonIfUnsupported);
1049 }
1050 
1052  Optional<std::string&> reasonIfUnsupported)
1053 {
1054  TensorInfos infos{output};
1055 
1056  return m_LayerSupport->IsLayerSupported(LayerType::Output,
1057  infos,
1058  BaseDescriptor(),
1059  EmptyOptional(),
1060  EmptyOptional(),
1061  reasonIfUnsupported);
1062 }
1063 
1065  const TensorInfo& output,
1066  const PadDescriptor& descriptor,
1067  Optional<std::string&> reasonIfUnsupported)
1068 {
1069  TensorInfos infos{input, output};
1070 
1071  return m_LayerSupport->IsLayerSupported(LayerType::Pad,
1072  infos,
1073  descriptor,
1074  EmptyOptional(),
1075  EmptyOptional(),
1076  reasonIfUnsupported);
1077 }
1078 
1080  const TensorInfo& output,
1081  const PermuteDescriptor& descriptor,
1082  Optional<std::string&> reasonIfUnsupported)
1083 {
1084  TensorInfos infos{input, output};
1085 
1086  return m_LayerSupport->IsLayerSupported(LayerType::Permute,
1087  infos,
1088  descriptor,
1089  EmptyOptional(),
1090  EmptyOptional(),
1091  reasonIfUnsupported);
1092 }
1093 
1095  const TensorInfo& output,
1096  const Pooling2dDescriptor& descriptor,
1097  Optional<std::string&> reasonIfUnsupported)
1098 {
1099  TensorInfos infos{input, output};
1100 
1101  return m_LayerSupport->IsLayerSupported(LayerType::Pooling2d,
1102  infos,
1103  descriptor,
1104  EmptyOptional(),
1105  EmptyOptional(),
1106  reasonIfUnsupported);
1107 }
1108 
1110  const TensorInfo& output,
1111  const Pooling3dDescriptor& descriptor,
1112  Optional<std::string&> reasonIfUnsupported)
1113 {
1114  TensorInfos infos{input, output};
1115 
1116  return m_LayerSupport->IsLayerSupported(LayerType::Pooling3d,
1117  infos,
1118  descriptor,
1119  EmptyOptional(),
1120  EmptyOptional(),
1121  reasonIfUnsupported);
1122 }
1123 
1125  const PreCompiledDescriptor& descriptor,
1126  Optional<std::string&> reasonIfUnsupported)
1127 {
1128  TensorInfos infos{input};
1129 
1130  return m_LayerSupport->IsLayerSupported(LayerType::PreCompiled,
1131  infos,
1132  descriptor,
1133  EmptyOptional(),
1134  EmptyOptional(),
1135  reasonIfUnsupported);
1136 }
1137 
1139  const TensorInfo& alpha,
1140  const TensorInfo& output,
1141  Optional<std::string&> reasonIfUnsupported)
1142 {
1143  TensorInfos infos{input, alpha, output};
1144 
1145  return m_LayerSupport->IsLayerSupported(LayerType::Prelu,
1146  infos,
1147  BaseDescriptor(),
1148  EmptyOptional(),
1149  EmptyOptional(),
1150  reasonIfUnsupported);
1151 }
1152 
1154  const TensorInfo& output,
1155  Optional<std::string&> reasonIfUnsupported)
1156 {
1157  TensorInfos infos{input, output};
1158 
1159  return m_LayerSupport->IsLayerSupported(LayerType::Quantize,
1160  infos,
1161  BaseDescriptor(),
1162  EmptyOptional(),
1163  EmptyOptional(),
1164  reasonIfUnsupported);
1165 }
1166 
1168  const TensorInfo& previousOutputIn,
1169  const TensorInfo& previousCellStateIn,
1170  const TensorInfo& outputStateOut,
1171  const TensorInfo& cellStateOut,
1172  const TensorInfo& output,
1173  const QLstmDescriptor& descriptor,
1174  const LstmInputParamsInfo& paramsInfo,
1175  Optional<std::string&> reasonIfUnsupported)
1176 {
1177  TensorInfos infos{input, previousOutputIn, previousCellStateIn, outputStateOut, cellStateOut, output};
1178 
1179  return m_LayerSupport->IsLayerSupported(LayerType::QLstm,
1180  infos,
1181  descriptor,
1182  paramsInfo,
1183  EmptyOptional(),
1184  reasonIfUnsupported);
1185 }
1186 
1188  const TensorInfo& previousCellStateIn,
1189  const TensorInfo& previousOutputIn,
1190  const TensorInfo& cellStateOut,
1191  const TensorInfo& output,
1192  const QuantizedLstmInputParamsInfo& paramsInfo,
1193  Optional<std::string&> reasonIfUnsupported)
1194 {
1195  TensorInfos infos{input, previousCellStateIn, previousOutputIn, cellStateOut, output};
1196 
1197  return m_LayerSupport->IsLayerSupported(LayerType::QuantizedLstm,
1198  infos,
1199  BaseDescriptor(),
1200  EmptyOptional(),
1201  paramsInfo,
1202  reasonIfUnsupported);
1203 }
1204 
1206  const TensorInfo& output,
1207  Optional<std::string&> reasonIfUnsupported)
1208 {
1209  TensorInfos infos{input, output};
1210 
1211  return m_LayerSupport->IsLayerSupported(LayerType::Rank,
1212  infos,
1213  BaseDescriptor(),
1214  EmptyOptional(),
1215  EmptyOptional(),
1216  reasonIfUnsupported);
1217 }
1218 
1220  const TensorInfo& output,
1221  const ReduceDescriptor& descriptor,
1222  Optional<std::string&> reasonIfUnsupported)
1223 {
1224  TensorInfos infos{input, output};
1225 
1226  return m_LayerSupport->IsLayerSupported(LayerType::Reduce,
1227  infos,
1228  descriptor,
1229  EmptyOptional(),
1230  EmptyOptional(),
1231  reasonIfUnsupported);
1232 }
1233 
1235  const TensorInfo& output,
1236  const ReshapeDescriptor& descriptor,
1237  Optional<std::string&> reasonIfUnsupported)
1238 {
1239  TensorInfos infos{input, output};
1240 
1241  return m_LayerSupport->IsLayerSupported(LayerType::Reshape,
1242  infos,
1243  descriptor,
1244  EmptyOptional(),
1245  EmptyOptional(),
1246  reasonIfUnsupported);
1247 }
1248 
1250  const TensorInfo& output,
1251  const ResizeDescriptor& descriptor,
1252  Optional<std::string&> reasonIfUnsupported)
1253 {
1254  TensorInfos infos{input, output};
1255 
1256  return m_LayerSupport->IsLayerSupported(LayerType::Resize,
1257  infos,
1258  descriptor,
1259  EmptyOptional(),
1260  EmptyOptional(),
1261  reasonIfUnsupported);
1262 }
1263 
1265  const armnn::TensorInfo &input1,
1266  const armnn::TensorInfo &output,
1267  Optional<std::string &> reasonIfUnsupported)
1268 {
1269  TensorInfos infos{input0, input1, output};
1270 
1271  return m_LayerSupport->IsLayerSupported(LayerType::ReverseV2,
1272  infos,
1273  BaseDescriptor(),
1274  EmptyOptional(),
1275  EmptyOptional(),
1276  reasonIfUnsupported);
1277 }
1278 
1280  const TensorInfo& output,
1281  Optional<std::string&> reasonIfUnsupported)
1282 {
1283  TensorInfos infos{input, output};
1284 
1285  return m_LayerSupport->IsLayerSupported(LayerType::Shape,
1286  infos,
1287  BaseDescriptor(),
1288  EmptyOptional(),
1289  EmptyOptional(),
1290  reasonIfUnsupported);
1291 }
1292 
1294  const TensorInfo& output,
1295  const SliceDescriptor& descriptor,
1296  Optional<std::string&> reasonIfUnsupported)
1297 {
1298  TensorInfos infos{input, output};
1299 
1300  return m_LayerSupport->IsLayerSupported(LayerType::Slice,
1301  infos,
1302  descriptor,
1303  EmptyOptional(),
1304  EmptyOptional(),
1305  reasonIfUnsupported);
1306 }
1307 
1309  const TensorInfo& output,
1310  const SoftmaxDescriptor& descriptor,
1311  Optional<std::string&> reasonIfUnsupported)
1312 {
1313  TensorInfos infos{input, output};
1314 
1315  return m_LayerSupport->IsLayerSupported(LayerType::Softmax,
1316  infos,
1317  descriptor,
1318  EmptyOptional(),
1319  EmptyOptional(),
1320  reasonIfUnsupported);
1321 }
1322 
1324  const TensorInfo& output,
1325  const SpaceToBatchNdDescriptor& descriptor,
1326  Optional<std::string&> reasonIfUnsupported)
1327 {
1328  TensorInfos infos{input, output};
1329 
1330  return m_LayerSupport->IsLayerSupported(LayerType::SpaceToBatchNd,
1331  infos,
1332  descriptor,
1333  EmptyOptional(),
1334  EmptyOptional(),
1335  reasonIfUnsupported);
1336 }
1337 
1339  const TensorInfo& output,
1340  const SpaceToDepthDescriptor& descriptor,
1341  Optional<std::string&> reasonIfUnsupported)
1342 {
1343  TensorInfos infos{input, output};
1344 
1345  return m_LayerSupport->IsLayerSupported(LayerType::SpaceToDepth,
1346  infos,
1347  descriptor,
1348  EmptyOptional(),
1349  EmptyOptional(),
1350  reasonIfUnsupported);
1351 }
1352 
1354  const std::vector<std::reference_wrapper<TensorInfo>>& outputs,
1355  const ViewsDescriptor& descriptor,
1356  Optional<std::string&> reasonIfUnsupported)
1357 {
1358  TensorInfos infos{input};
1359  for (TensorInfo outInfo : outputs)
1360  {
1361  infos.push_back(outInfo);
1362  }
1363 
1364  return m_LayerSupport->IsLayerSupported(LayerType::Splitter,
1365  infos,
1366  descriptor,
1367  EmptyOptional(),
1368  EmptyOptional(),
1369  reasonIfUnsupported);
1370 }
1371 
1372 bool LayerSupportHandle::IsStackSupported(const std::vector<const TensorInfo*>& inputs,
1373  const TensorInfo& output,
1374  const StackDescriptor& descriptor,
1375  Optional<std::string&> reasonIfUnsupported)
1376 {
1377  TensorInfos infos;
1378  for (const TensorInfo* inputInfo : inputs)
1379  {
1380  infos.push_back(*inputInfo);
1381  }
1382  infos.push_back(output);
1383 
1384  return m_LayerSupport->IsLayerSupported(LayerType::Stack,
1385  infos,
1386  descriptor,
1387  EmptyOptional(),
1388  EmptyOptional(),
1389  reasonIfUnsupported);
1390 }
1391 
1392 bool LayerSupportHandle::IsStandInSupported(const std::vector<const TensorInfo*>& inputs,
1393  const std::vector<const TensorInfo*>& outputs,
1394  const StandInDescriptor& descriptor,
1395  Optional<std::string&> reasonIfUnsupported)
1396 {
1397  TensorInfos infos;
1398  for (const TensorInfo* inputInfo : inputs)
1399  {
1400  infos.push_back(*inputInfo);
1401  }
1402  for (const TensorInfo* outputInfo : outputs)
1403  {
1404  infos.push_back(*outputInfo);
1405  }
1406 
1407  return m_LayerSupport->IsLayerSupported(LayerType::StandIn,
1408  infos,
1409  descriptor,
1410  EmptyOptional(),
1411  EmptyOptional(),
1412  reasonIfUnsupported);
1413 }
1414 
1415 
1417  const TensorInfo& output,
1418  const StridedSliceDescriptor& descriptor,
1419  Optional<std::string&> reasonIfUnsupported)
1420 {
1421  TensorInfos infos{input, output};
1422 
1423  return m_LayerSupport->IsLayerSupported(LayerType::StridedSlice,
1424  infos,
1425  descriptor,
1426  EmptyOptional(),
1427  EmptyOptional(),
1428  reasonIfUnsupported);
1429 }
1430 
1432  const TensorInfo& input1,
1433  const TensorInfo& output,
1434  Optional<std::string&> reasonIfUnsupported)
1435 {
1436  TensorInfos infos{input0, input1, output};
1437 
1438  return m_LayerSupport->IsLayerSupported(LayerType::Subtraction,
1439  infos,
1440  BaseDescriptor(),
1441  EmptyOptional(),
1442  EmptyOptional(),
1443  reasonIfUnsupported);
1444 }
1445 
1447  const TensorInfo& input1,
1448  const TensorInfo& output0,
1449  const TensorInfo& output1,
1450  Optional<std::string&> reasonIfUnsupported)
1451 {
1452  TensorInfos infos{input0, input1, output0, output1};
1453 
1454  return m_LayerSupport->IsLayerSupported(LayerType::Switch,
1455  infos,
1456  BaseDescriptor(),
1457  EmptyOptional(),
1458  EmptyOptional(),
1459  reasonIfUnsupported);
1460 }
1461 
1463  const TensorInfo& output,
1464  const armnn::TileDescriptor &descriptor,
1465  Optional<std::string&> reasonIfUnsupported)
1466 {
1467  TensorInfos infos{input, output};
1468 
1469  return m_LayerSupport->IsLayerSupported(LayerType::Tile,
1470  infos,
1471  descriptor,
1472  EmptyOptional(),
1473  EmptyOptional(),
1474  reasonIfUnsupported);
1475 }
1476 
1478  const TensorInfo& input,
1479  const TensorInfo& output,
1480  const TransposeConvolution2dDescriptor& descriptor,
1481  const TensorInfo& weights,
1482  const Optional<TensorInfo>& biases,
1483  Optional<std::string&> reasonIfUnsupported)
1484 {
1485  TensorInfo biasesVal = biases.has_value() ? biases.value() : TensorInfo();
1486  TensorInfos infos{input, output, weights, biasesVal};
1487 
1488  return m_LayerSupport->IsLayerSupported(LayerType::TransposeConvolution2d,
1489  infos,
1490  descriptor,
1491  EmptyOptional(),
1492  EmptyOptional(),
1493  reasonIfUnsupported);
1494 }
1495 
1497  const TensorInfo& output,
1498  const TransposeDescriptor& descriptor,
1499  Optional<std::string&> reasonIfUnsupported)
1500 {
1501  TensorInfos infos{input, output};
1502 
1503  return m_LayerSupport->IsLayerSupported(LayerType::Transpose,
1504  infos,
1505  descriptor,
1506  EmptyOptional(),
1507  EmptyOptional(),
1508  reasonIfUnsupported);
1509 }
1510 
1512  const TensorInfo& outputStateIn,
1513  const TensorInfo& cellStateIn,
1514  const TensorInfo& outputStateOut,
1515  const TensorInfo& cellStateOut,
1516  const TensorInfo& output,
1517  const LstmDescriptor& descriptor,
1518  const LstmInputParamsInfo& paramsInfo,
1519  Optional<std::string&> reasonIfUnsupported)
1520 {
1521  TensorInfos infos{input, outputStateIn, cellStateIn, outputStateOut, cellStateOut, output};
1522 
1523  return m_LayerSupport->IsLayerSupported(LayerType::UnidirectionalSequenceLstm,
1524  infos,
1525  descriptor,
1526  paramsInfo,
1527  EmptyOptional(),
1528  reasonIfUnsupported);
1529 }
1530 
1531 }
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:1338
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:1372
armnn::LayerType::Splitter
@ Splitter
armnn::LayerType::BatchNormalization
@ BatchNormalization
armnn::QLstmDescriptor
A QLstmDescriptor for the QLstmLayer.
Definition: Descriptors.hpp:1380
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:540
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:1051
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:977
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:1021
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:1477
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:985
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:948
armnn::GatherDescriptor
A GatherDescriptor for the GatherLayer.
Definition: Descriptors.hpp:965
armnn::LayerSupportHandle::IsShapeSupported
bool IsShapeSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:1279
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:457
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:1006
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:703
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:1079
BackendId.hpp
armnn::LayerType::StridedSlice
@ StridedSlice
armnn::ChannelShuffleDescriptor
A ChannelShuffleDescriptor for the ChannelShuffle operator.
Definition: Descriptors.hpp:1562
armnn::LayerSupportHandle::IsNormalizationSupported
bool IsNormalizationSupported(const TensorInfo &input, const TensorInfo &output, const NormalizationDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:1036
armnn::LayerSupportHandle::IsReverseV2Supported
bool IsReverseV2Supported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:1264
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:866
armnn::LayerSupportHandle::IsStridedSliceSupported
bool IsStridedSliceSupported(const TensorInfo &input, const TensorInfo &output, const StridedSliceDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:1416
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:807
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:629
armnn::LayerSupportHandle::IsPooling2dSupported
bool IsPooling2dSupported(const TensorInfo &input, const TensorInfo &output, const Pooling2dDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:1094
armnn::LayerType::Stack
@ Stack
BackendRegistry.hpp
armnn::StackDescriptor
A StackDescriptor for the StackLayer.
Definition: Descriptors.hpp:1251
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:1308
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:791
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:822
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:897
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:851
armnn::LayerSupportHandle::IsDebugSupported
bool IsDebugSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:443
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:294
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:1064
LstmParams.hpp
armnn::BackendOptions::Var::IsInt
bool IsInt() const
Definition: BackendOptions.hpp:113
armnn::FusedDescriptor
A FusedDescriptor for the FusedLayer.
Definition: Descriptors.hpp:944
armnn::LayerSupportHandle::IsFusedSupported
bool IsFusedSupported(const std::vector< std::reference_wrapper< TensorInfo >> &inputs, const std::vector< std::reference_wrapper< TensorInfo >> &outputs, const FusedDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:767
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:472
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:1353
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:1293
armnn::LayerType::LogicalBinary
@ LogicalBinary
armnn::LayerType::Concat
@ Concat
armnn::PadDescriptor
A PadDescriptor for the PadLayer.
Definition: Descriptors.hpp:1196
armnn::BackendOptions::Var::IsString
bool IsString() const
Definition: BackendOptions.hpp:116
armnn::TransposeDescriptor
A TransposeDescriptor for the TransposeLayer.
Definition: Descriptors.hpp:1490
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:1228
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:1023
armnn::LayerSupportHandle::IsRankSupported
bool IsRankSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:1205
armnn::LayerSupportHandle::IsTransposeSupported
bool IsTransposeSupported(const TensorInfo &input, const TensorInfo &output, const TransposeDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:1496
armnn::LayerType::Quantize
@ Quantize
armnn::LayerSupportHandle::IsMemCopySupported
bool IsMemCopySupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:963
armnn::LayerSupportHandle::IsTileSupported
bool IsTileSupported(const TensorInfo &input, const TensorInfo &output, const TileDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:1462
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:1511
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:1584
armnn::LayerSupportHandle::IsCastSupported
bool IsCastSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:265
armnn::LayerType::Addition
@ Addition
armnn::SpaceToBatchNdDescriptor
A SpaceToBatchNdDescriptor for the SpaceToBatchNdLayer.
Definition: Descriptors.hpp:1043
armnn::Convolution3dDescriptor
A Convolution3dDescriptor for the Convolution3dLayer.
Definition: Descriptors.hpp:588
armnn::LayerType::DepthToSpace
@ DepthToSpace
armnn::LayerSupportHandle::IsBroadcastToSupported
bool IsBroadcastToSupported(const TensorInfo &input, const TensorInfo &output, const BroadcastToDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported)
Definition: BackendHelper.cpp:250
armnn::LayerType::BroadcastTo
@ BroadcastTo
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:689
armnn::LayerSupportHandle::IsDivisionSupported
bool IsDivisionSupported(const TensorInfo &input0, const TensorInfo &input1, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:614
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:1109
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:991
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:310
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:882
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:660
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:425
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:560
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:371
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:1281
armnn::LayerSupportHandle::IsInstanceNormalizationSupported
bool IsInstanceNormalizationSupported(const TensorInfo &input, const TensorInfo &output, const InstanceNormalizationDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:835
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:933
armnn::LayerType::BatchToSpaceNd
@ BatchToSpaceNd
armnn::LstmDescriptor
An LstmDescriptor for the LstmLayer.
Definition: Descriptors.hpp:1102
armnn::StridedSliceDescriptor
A StridedSliceDescriptor for the StridedSliceLayer.
Definition: Descriptors.hpp:1303
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:1124
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:1518
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:279
armnn::LayerType::Fill
@ Fill
armnn::LayerType::L2Normalization
@ L2Normalization
armnn::LayerType::Fused
@ Fused
armnn::LayerSupportHandle::IsPreluSupported
bool IsPreluSupported(const TensorInfo &input, const TensorInfo &alpha, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:1138
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:526
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:1440
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:1323
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:912
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:343
armnn::LayerSupportHandle::IsReshapeSupported
bool IsReshapeSupported(const TensorInfo &input, const TensorInfo &output, const ReshapeDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:1234
armnn::LayerSupportHandle::IsConvertFp32ToFp16Supported
bool IsConvertFp32ToFp16Supported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:357
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:1431
armnn::LayerType::Input
@ Input
armnn::LayerType::Resize
@ Resize
armnn::DetectionPostProcessDescriptor
Definition: Descriptors.hpp:713
armnn::PreCompiledDescriptor
A PreCompiledDescriptor for the PreCompiledLayer.
Definition: Descriptors.hpp:1367
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:1187
armnn::LayerType::Convolution2d
@ Convolution2d
armnn::Pooling2dDescriptor
A Pooling2dDescriptor for the Pooling2dLayer.
Definition: Descriptors.hpp:371
armnn::LayerType::FakeQuantization
@ FakeQuantization
armnn::LayerType::Maximum
@ Maximum
armnn::BroadcastToDescriptor
Definition: Descriptors.hpp:1659
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:330
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:1167
armnn::LayerType::Dequantize
@ Dequantize
armnn::LayerType::Convolution3d
@ Convolution3d
armnn::ReduceDescriptor
A ReduceDescriptor for the REDUCE operators.
Definition: Descriptors.hpp:1538
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:1446
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:1219
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:1392
armnn::MeanDescriptor
A MeanDescriptor for the MeanLayer.
Definition: Descriptors.hpp:1172
armnn::LayerSupportHandle::IsQuantizeSupported
bool IsQuantizeSupported(const TensorInfo &input, const TensorInfo &output, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:1153
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:1640
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:645
armnn::LayerSupportHandle::IsResizeSupported
bool IsResizeSupported(const TensorInfo &input, const TensorInfo &output, const ResizeDescriptor &descriptor, Optional< std::string & > reasonIfUnsupported=EmptyOptional())
Definition: BackendHelper.cpp:1249
armnn::SpaceToDepthDescriptor
A SpaceToDepthDescriptor for the SpaceToDepthLayer.
Definition: Descriptors.hpp:1075
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:674
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