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