27 using LayerList = std::list<Layer*>;
28 using Iterator = LayerList::const_iterator;
30 const TensorInfo OverrideDataType(
const TensorInfo& info, Optional<DataType> type)
37 return TensorInfo(info.GetShape(),
39 info.GetQuantizationScale(),
40 info.GetQuantizationOffset(),
53 switch(weightsType.
value())
65 ARMNN_ASSERT_MSG(
false,
"GetBiasTypeFromWeightsType(): Unsupported data type.");
71 bool IWorkloadFactory::IsLayerConfigurationSupported(
const BackendId& backendId,
72 const IConnectableLayer& connectableLayer,
73 Optional<DataType> dataType,
74 std::string& outReasonIfUnsupported,
77 Optional<std::string&> reason = outReasonIfUnsupported;
79 const Layer& layer = *(PolymorphicDowncast<const Layer*>(&connectableLayer));
82 if (!backendRegistry.IsBackendRegistered(backendId))
85 ss << connectableLayer.GetName() <<
" is not supported on " << backendId
86 <<
" because this backend is not registered.";
88 outReasonIfUnsupported = ss.str();
92 auto backendFactory = backendRegistry.GetFactory(backendId);
93 auto backendObject = backendFactory();
94 auto layerSupportObject = LayerSupportHandle(backendObject->GetLayerSupport(modelOptions), backendId);
96 switch(layer.GetType())
100 auto cLayer = PolymorphicDowncast<const ActivationLayer*>(&layer);
101 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
102 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
103 result = layerSupportObject.IsActivationSupported(
104 OverrideDataType(input, dataType),
105 OverrideDataType(output, dataType),
106 cLayer->GetParameters(),
112 const TensorInfo& input0 = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
113 const TensorInfo& input1 = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
114 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
115 result = layerSupportObject.IsAdditionSupported(
116 OverrideDataType(input0, dataType),
117 OverrideDataType(input1, dataType),
118 OverrideDataType(output, dataType),
124 auto cLayer = PolymorphicDowncast<const ArgMinMaxLayer*>(&layer);
125 const ArgMinMaxDescriptor& descriptor = cLayer->GetParameters();
127 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
128 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
129 result = layerSupportObject.IsArgMinMaxSupported(
130 OverrideDataType(input, dataType),
138 auto cLayer = PolymorphicDowncast<const BatchMatMulLayer*>(&layer);
139 const BatchMatMulDescriptor& descriptor = cLayer->GetParameters();
141 const TensorInfo& input0 = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
142 const TensorInfo& input1 = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
143 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
144 result = layerSupportObject.IsBatchMatMulSupported(
145 OverrideDataType(input0, dataType),
146 OverrideDataType(input1, dataType),
147 OverrideDataType(output, dataType),
154 auto cLayer = PolymorphicDowncast<const BatchNormalizationLayer*>(&layer);
155 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
156 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
157 const TensorInfo& mean = cLayer->m_Mean->GetTensorInfo();
158 const TensorInfo& var = cLayer->m_Variance->GetTensorInfo();
159 const TensorInfo& beta = cLayer->m_Beta->GetTensorInfo();
160 const TensorInfo& gamma = cLayer->m_Gamma->GetTensorInfo();
161 result = layerSupportObject.IsBatchNormalizationSupported(
162 OverrideDataType(input, dataType),
163 OverrideDataType(output, dataType),
164 OverrideDataType(mean, dataType),
165 OverrideDataType(var, dataType),
166 OverrideDataType(beta, dataType),
167 OverrideDataType(gamma, dataType),
168 cLayer->GetParameters(),
174 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
175 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
176 auto cLayer = PolymorphicDowncast<const BatchToSpaceNdLayer*>(&layer);
178 result = layerSupportObject.IsBatchToSpaceNdSupported(OverrideDataType(input, dataType),
179 OverrideDataType(output, dataType),
180 cLayer->GetParameters(),
186 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
187 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
189 result = layerSupportObject.IsCastSupported(OverrideDataType(input, dataType),
190 OverrideDataType(output, dataType),
196 auto cLayer = PolymorphicDowncast<const ChannelShuffleLayer*>(&layer);
198 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
199 const TensorInfo& output = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
201 const ChannelShuffleDescriptor descriptor = cLayer->GetParameters();
203 result = layerSupportObject.IsChannelShuffleSupported(OverrideDataType(input, dataType),
204 OverrideDataType(output, dataType),
211 auto cLayer = PolymorphicDowncast<const ComparisonLayer*>(&layer);
213 const TensorInfo& input0 = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
214 const TensorInfo& input1 = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
215 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
217 result = layerSupportObject.IsComparisonSupported(OverrideDataType(input0, dataType),
218 OverrideDataType(input1, dataType),
220 cLayer->GetParameters(),
226 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
227 result = layerSupportObject.IsConstantSupported(OverrideDataType(output, dataType), reason);
232 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
233 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
234 result = layerSupportObject.IsConvertBf16ToFp32Supported(input, output, reason);
239 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
240 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
241 result = layerSupportObject.IsConvertFp16ToFp32Supported(input, output, reason);
246 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
247 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
248 result = layerSupportObject.IsConvertFp32ToBf16Supported(input, output, reason);
253 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
254 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
255 result = layerSupportObject.IsConvertFp32ToFp16Supported(input, output, reason);
260 auto cLayer = PolymorphicDowncast<const Convolution2dLayer*>(&layer);
262 const TensorInfo input = OverrideDataType(layer.GetInputSlot(0).GetConnection()->GetTensorInfo(),
264 const TensorInfo output = OverrideDataType(layer.GetOutputSlot(0).GetTensorInfo(), dataType);
266 "Convolution2dLayer: Weights should be connected as a Constant Layer.");
267 const TensorInfo weights = OverrideDataType(layer.GetInputSlot(1).GetConnection()->GetTensorInfo(),
270 const Convolution2dDescriptor& descriptor = cLayer->GetParameters();
273 Optional<TensorInfo> biases;
274 if (descriptor.m_BiasEnabled)
277 "Convolution2dLayer: Bias should be connected as a Constant Layer.");
278 biases = OverrideDataType(layer.GetInputSlot(2).GetConnection()->GetTensorInfo(),
282 result = layerSupportObject.IsConvolution2dSupported(
293 auto cLayer = PolymorphicDowncast<const Convolution3dLayer*>(&layer);
295 const TensorInfo input = OverrideDataType(layer.GetInputSlot(0).GetConnection()->GetTensorInfo(),
297 const TensorInfo output = OverrideDataType(layer.GetOutputSlot(0).GetTensorInfo(), dataType);
300 "Convolution3dLayer: Weights should be connected as a Constant Layer.");
301 const TensorInfo weights = OverrideDataType(layer.GetInputSlot(1).GetConnection()->GetTensorInfo(),
304 const Convolution3dDescriptor& descriptor = cLayer->GetParameters();
307 Optional<TensorInfo> biases;
308 if (descriptor.m_BiasEnabled)
310 biases = OverrideDataType(layer.GetInputSlot(2).GetConnection()->GetTensorInfo(),
314 result = layerSupportObject.IsConvolution3dSupported(
325 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
326 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
328 result = layerSupportObject.IsDebugSupported(OverrideDataType(input, dataType),
329 OverrideDataType(output, dataType),
335 auto cLayer = PolymorphicDowncast<const DepthToSpaceLayer*>(&layer);
337 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
338 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
340 result = layerSupportObject.IsDepthToSpaceSupported(OverrideDataType(input, dataType),
341 OverrideDataType(output, dataType),
342 cLayer->GetParameters(),
348 auto cLayer = PolymorphicDowncast<const DepthwiseConvolution2dLayer*>(&layer);
349 const TensorInfo& input = OverrideDataType(layer.GetInputSlot(0).GetConnection()->GetTensorInfo(),
351 const TensorInfo& output = OverrideDataType(layer.GetOutputSlot(0).GetTensorInfo(), dataType);
352 const TensorInfo& weights = OverrideDataType(layer.GetInputSlot(1).GetConnection()->GetTensorInfo(),
355 ARMNN_ASSERT(cLayer->GetInputSlot(1).GetConnection() !=
nullptr);
357 const DepthwiseConvolution2dDescriptor& descriptor = cLayer->GetParameters();
360 Optional<TensorInfo> biases;
361 if (descriptor.m_BiasEnabled)
363 biases = OverrideDataType(cLayer->GetInputSlot(2).GetConnection()->GetTensorInfo(),
367 result = layerSupportObject.IsDepthwiseConvolutionSupported(input,
377 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
378 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
380 result = layerSupportObject.IsDequantizeSupported(input,
381 OverrideDataType(output, dataType),
387 auto cLayer = PolymorphicDowncast<const DetectionPostProcessLayer*>(&layer);
388 const TensorInfo& boxEncodings = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
389 const TensorInfo& scores = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
390 const TensorInfo& anchors = cLayer->m_Anchors->GetTensorInfo();
392 const TensorInfo& detectionBoxes = layer.GetOutputSlot(0).GetTensorInfo();
393 const TensorInfo& detectionClasses = layer.GetOutputSlot(1).GetTensorInfo();
394 const TensorInfo& detectionScores = layer.GetOutputSlot(2).GetTensorInfo();
395 const TensorInfo& numDetections = layer.GetOutputSlot(3).GetTensorInfo();
397 const DetectionPostProcessDescriptor& descriptor = cLayer->GetParameters();
398 result = layerSupportObject.IsDetectionPostProcessSupported(boxEncodings,
411 auto cLayer = PolymorphicDowncast<const ElementwiseUnaryLayer*>(&layer);
413 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
414 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
416 result = layerSupportObject.IsElementwiseUnarySupported(OverrideDataType(input, dataType),
417 OverrideDataType(output, dataType),
418 cLayer->GetParameters(),
424 auto cLayer = PolymorphicDowncast<const FillLayer*>(&layer);
425 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
426 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
427 const FillDescriptor& descriptor = cLayer->GetParameters();
429 result = layerSupportObject.IsFillSupported(
430 OverrideDataType(input, dataType),
431 OverrideDataType(output, dataType),
438 auto cLayer = PolymorphicDowncast<const FakeQuantizationLayer*>(&layer);
439 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
440 result = layerSupportObject.IsFakeQuantizationSupported(OverrideDataType(input, dataType),
441 cLayer->GetParameters(),
447 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
448 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
449 result = layerSupportObject.IsFloorSupported(OverrideDataType(input, dataType),
450 OverrideDataType(output, dataType),
456 auto cLayer = PolymorphicDowncast<const FullyConnectedLayer*>(&layer);
457 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
458 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
460 const FullyConnectedDescriptor& descriptor = cLayer->GetParameters();
461 TensorInfo weightsInfo;
462 const TensorInfo* weightsInfoPtr =
nullptr;
464 weightsInfo = OverrideDataType(layer.GetInputSlot(1).GetConnection()->GetTensorInfo(), dataType);
465 weightsInfoPtr = &weightsInfo;
468 const TensorInfo* biasInfoPtr =
nullptr;
469 static const TensorInfo dummyBFloat16Bias(TensorShape({1,1,1,1}),
DataType::BFloat16);
470 static const TensorInfo dummyFloat16Bias(TensorShape({1,1,1,1}),
DataType::Float16);
471 static const TensorInfo dummyFloat32Bias(TensorShape({1,1,1,1}),
DataType::Float32);
474 if (descriptor.m_BiasEnabled)
476 biasInfo = OverrideDataType(layer.GetInputSlot(2).GetConnection()->GetTensorInfo(), dataType);
477 biasInfoPtr = &biasInfo;
482 switch(input.GetDataType())
486 biasInfoPtr = &dummyBFloat16Bias;
491 biasInfoPtr = &dummyFloat16Bias;
496 biasInfoPtr = &dummyFloat32Bias;
504 biasInfoPtr = &dummyQA8Bias;
513 result = layerSupportObject.IsFullyConnectedSupported(
514 OverrideDataType(input, dataType),
515 OverrideDataType(output, dataType),
524 const TensorInfo& input0 = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
525 const TensorInfo& input1 = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
526 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
527 auto cLayer = PolymorphicDowncast<const GatherLayer*>(&layer);
528 const GatherDescriptor& descriptor = cLayer->GetParameters();
529 result = layerSupportObject.IsGatherSupported(OverrideDataType(input0, dataType),
531 OverrideDataType(output, dataType),
538 const TensorInfo& input0 = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
539 const TensorInfo& input1 = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
540 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
541 result = layerSupportObject.IsGatherNdSupported(OverrideDataType(input0, dataType),
543 OverrideDataType(output, dataType),
549 const TensorInfo& input = layer.GetOutputSlot(0).GetTensorInfo();
550 result = layerSupportObject.IsInputSupported(OverrideDataType(input, dataType), reason);
555 auto cLayer = PolymorphicDowncast<const InstanceNormalizationLayer*>(&layer);
556 const InstanceNormalizationDescriptor& descriptor = cLayer->GetParameters();
558 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
559 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
561 result = layerSupportObject.IsInstanceNormalizationSupported(
562 OverrideDataType(input, dataType),
563 OverrideDataType(output, dataType),
570 auto cLayer = PolymorphicDowncast<const L2NormalizationLayer*>(&layer);
571 const L2NormalizationDescriptor& descriptor = cLayer->GetParameters();
573 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
574 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
576 result = layerSupportObject.IsL2NormalizationSupported(
577 OverrideDataType(input, dataType),
578 OverrideDataType(output, dataType),
585 auto cLayer = PolymorphicDowncast<const LogicalBinaryLayer*>(&layer);
587 const TensorInfo& input0 = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
588 const TensorInfo& input1 = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
589 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
591 result = layerSupportObject.IsLogicalBinarySupported(input0,
594 cLayer->GetParameters(),
600 auto cLayer = PolymorphicDowncast<const LogSoftmaxLayer*>(&layer);
602 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
603 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
605 result = layerSupportObject.IsLogSoftmaxSupported(OverrideDataType(input, dataType),
606 OverrideDataType(output, dataType),
607 cLayer->GetParameters(),
613 auto cLayer = PolymorphicDowncast<const LstmLayer*>(&layer);
614 const LstmDescriptor& descriptor = cLayer->GetParameters();
617 const TensorInfo& input = OverrideDataType(layer.GetInputSlot(0).GetConnection()->GetTensorInfo(),
619 const TensorInfo& outputStateIn = OverrideDataType(layer.GetInputSlot(1).GetConnection()->GetTensorInfo(),
621 const TensorInfo& cellStateIn = OverrideDataType(layer.GetInputSlot(2).GetConnection()->GetTensorInfo(),
624 const TensorInfo& scratchBuffer = OverrideDataType(layer.GetOutputSlot(0).GetTensorInfo(), dataType);
625 const TensorInfo& outputStateOut = OverrideDataType(layer.GetOutputSlot(1).GetTensorInfo(), dataType);
626 const TensorInfo& cellStateOut = OverrideDataType(layer.GetOutputSlot(2).GetTensorInfo(), dataType);
627 const TensorInfo& output = OverrideDataType(layer.GetOutputSlot(3).GetTensorInfo(), dataType);
630 const TensorInfo& inputToForgetWeights
631 = OverrideDataType(cLayer->m_BasicParameters.m_InputToForgetWeights->GetTensorInfo(), dataType);
632 const TensorInfo& inputToCellWeights
633 = OverrideDataType(cLayer->m_BasicParameters.m_InputToCellWeights->GetTensorInfo(), dataType);
634 const TensorInfo& inputToOutputWeights
635 = OverrideDataType(cLayer->m_BasicParameters.m_InputToOutputWeights->GetTensorInfo(), dataType);
636 const TensorInfo& recurrentToForgetWeights
637 = OverrideDataType(cLayer->m_BasicParameters.m_RecurrentToForgetWeights->GetTensorInfo(), dataType);
638 const TensorInfo& recurrentToCellWeights
639 = OverrideDataType(cLayer->m_BasicParameters.m_RecurrentToCellWeights->GetTensorInfo(), dataType);
640 const TensorInfo& recurrentToOutputWeights
641 = OverrideDataType(cLayer->m_BasicParameters.m_RecurrentToOutputWeights->GetTensorInfo(), dataType);
642 const TensorInfo& forgetGateBias
643 = OverrideDataType(cLayer->m_BasicParameters.m_ForgetGateBias->GetTensorInfo(), dataType);
644 const TensorInfo& cellBias
645 = OverrideDataType(cLayer->m_BasicParameters.m_CellBias->GetTensorInfo(), dataType);
646 const TensorInfo& outputGateBias
647 = OverrideDataType(cLayer->m_BasicParameters.m_OutputGateBias->GetTensorInfo(), dataType);
649 LstmInputParamsInfo paramsInfo;
651 paramsInfo.m_InputToForgetWeights = &inputToForgetWeights;
652 paramsInfo.m_InputToCellWeights = &inputToCellWeights;
653 paramsInfo.m_InputToOutputWeights = &inputToOutputWeights;
654 paramsInfo.m_RecurrentToForgetWeights = &recurrentToForgetWeights;
655 paramsInfo.m_RecurrentToCellWeights = &recurrentToCellWeights;
656 paramsInfo.m_RecurrentToOutputWeights = &recurrentToOutputWeights;
657 paramsInfo.m_ForgetGateBias = &forgetGateBias;
658 paramsInfo.m_CellBias = &cellBias;
659 paramsInfo.m_OutputGateBias = &outputGateBias;
663 TensorInfo optInputToInputWeights;
664 TensorInfo optRecurrentToInputWeights;
665 TensorInfo optCellToInputWeights;
666 TensorInfo optInputGateBias;
667 TensorInfo optProjectionWeights;
668 TensorInfo optProjectionBias;
669 TensorInfo optCellToForgetWeights;
670 TensorInfo optCellToOutputWeights;
671 TensorInfo optInputLayerNormWeights;
672 TensorInfo optForgetLayerNormWeights;
673 TensorInfo optCellLayerNormWeights;
674 TensorInfo optOutputLayerNormWeights;
676 if(!descriptor.m_CifgEnabled)
678 optInputToInputWeights =
679 OverrideDataType(cLayer->m_CifgParameters.m_InputToInputWeights->GetTensorInfo(), dataType);
680 paramsInfo.m_InputToInputWeights = &optInputToInputWeights;
682 optRecurrentToInputWeights =
683 OverrideDataType(cLayer->m_CifgParameters.m_RecurrentToInputWeights->GetTensorInfo(), dataType);
684 paramsInfo.m_RecurrentToInputWeights = &optRecurrentToInputWeights;
686 OverrideDataType(cLayer->m_CifgParameters.m_InputGateBias->GetTensorInfo(), dataType);
687 paramsInfo.m_InputGateBias = &optInputGateBias;
690 if(descriptor.m_ProjectionEnabled)
692 optProjectionWeights =
693 OverrideDataType(cLayer->m_ProjectionParameters.m_ProjectionWeights->GetTensorInfo(), dataType);
694 paramsInfo.m_ProjectionWeights = &optProjectionWeights;
695 if (cLayer->m_ProjectionParameters.m_ProjectionBias !=
nullptr)
698 OverrideDataType(cLayer->m_ProjectionParameters.m_ProjectionBias->GetTensorInfo(), dataType);
699 paramsInfo.m_ProjectionBias = &optProjectionBias;
703 if(descriptor.m_PeepholeEnabled)
705 if(!descriptor.m_CifgEnabled)
707 optCellToInputWeights =
708 OverrideDataType(cLayer->m_PeepholeParameters.m_CellToInputWeights->GetTensorInfo(),
710 paramsInfo.m_CellToInputWeights = &optCellToInputWeights;
712 optCellToForgetWeights =
713 OverrideDataType(cLayer->m_PeepholeParameters.m_CellToForgetWeights->GetTensorInfo(), dataType);
714 paramsInfo.m_CellToForgetWeights = &optCellToForgetWeights;
715 optCellToOutputWeights =
716 OverrideDataType(cLayer->m_PeepholeParameters.m_CellToOutputWeights->GetTensorInfo(), dataType);
717 paramsInfo.m_CellToOutputWeights = &optCellToOutputWeights;
720 if(descriptor.m_LayerNormEnabled)
722 if (!descriptor.m_CifgEnabled)
724 optInputLayerNormWeights = OverrideDataType(
725 cLayer->m_LayerNormParameters.m_InputLayerNormWeights->GetTensorInfo(), dataType);
726 paramsInfo.m_InputLayerNormWeights = &optInputLayerNormWeights;
729 optForgetLayerNormWeights = OverrideDataType(
730 cLayer->m_LayerNormParameters.m_ForgetLayerNormWeights->GetTensorInfo(), dataType);
731 paramsInfo.m_ForgetLayerNormWeights = &optForgetLayerNormWeights;
733 optCellLayerNormWeights = OverrideDataType(
734 cLayer->m_LayerNormParameters.m_CellLayerNormWeights->GetTensorInfo(), dataType);
735 paramsInfo.m_CellLayerNormWeights = &optCellLayerNormWeights;
737 optOutputLayerNormWeights = OverrideDataType(
738 cLayer->m_LayerNormParameters.m_OutputLayerNormWeights->GetTensorInfo(), dataType);
739 paramsInfo.m_OutputLayerNormWeights = &optOutputLayerNormWeights;
742 result = layerSupportObject.IsLstmSupported(
757 const TensorInfo& input0 = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
758 const TensorInfo& input1 = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
759 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
761 result = layerSupportObject.IsMaximumSupported(OverrideDataType(input0, dataType),
762 OverrideDataType(input1, dataType),
763 OverrideDataType(output, dataType),
769 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
770 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
772 result = layerSupportObject.IsMemCopySupported(OverrideDataType(input, dataType),
773 OverrideDataType(output, dataType),
779 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
780 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
782 result = layerSupportObject.IsMemImportSupported(OverrideDataType(input, dataType),
783 OverrideDataType(output, dataType),
789 const TensorInfo& input0 = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
790 const TensorInfo& input1 = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
791 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
793 result = layerSupportObject.IsMergeSupported(OverrideDataType(input0, dataType),
794 OverrideDataType(input1, dataType),
795 OverrideDataType(output, dataType),
801 auto cLayer = PolymorphicDowncast<const ConcatLayer*>(&layer);
804 auto getTensorInfo = [&dataType](
const InputSlot& slot)
806 return OverrideDataType(slot.GetConnectedOutputSlot()->GetTensorInfo(), dataType);
811 std::vector<TensorInfo> inputs(beginI, endI);
813 auto getTensorInfoPtr = [](
const TensorInfo&
info)
820 std::vector<const TensorInfo*> inputPtrs(beginPtr, endPtr);
822 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
824 result = layerSupportObject.IsConcatSupported(inputPtrs, output, cLayer->GetParameters(), reason);
831 const TensorInfo& input0 = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
832 const TensorInfo& input1 = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
833 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
834 result = layerSupportObject.IsMultiplicationSupported(
835 OverrideDataType(input0, dataType),
836 OverrideDataType(input1, dataType),
837 OverrideDataType(output, dataType),
843 auto cLayer = PolymorphicDowncast<const NormalizationLayer*>(&layer);
844 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
845 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
846 result = layerSupportObject.IsNormalizationSupported(OverrideDataType(input, dataType),
847 OverrideDataType(output, dataType),
848 cLayer->GetParameters(),
854 const TensorInfo& output = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
855 result = layerSupportObject.IsOutputSupported(OverrideDataType(output, dataType), reason);
860 auto cLayer = PolymorphicDowncast<const PermuteLayer*>(&layer);
861 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
862 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
863 result = layerSupportObject.IsPermuteSupported(OverrideDataType(input, dataType),
864 OverrideDataType(output, dataType),
865 cLayer->GetParameters(),
871 auto cLayer = PolymorphicDowncast<const PadLayer*>(&layer);
872 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
873 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
874 result = layerSupportObject.IsPadSupported(
875 OverrideDataType(input, dataType),
876 OverrideDataType(output, dataType),
877 cLayer->GetParameters(),
883 auto cLayer = PolymorphicDowncast<const Pooling2dLayer*>(&layer);
884 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
885 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
886 result = layerSupportObject.IsPooling2dSupported(OverrideDataType(input, dataType),
887 OverrideDataType(output, dataType),
888 cLayer->GetParameters(),
894 auto cLayer = PolymorphicDowncast<const Pooling3dLayer*>(&layer);
895 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
896 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
897 result = layerSupportObject.IsPooling3dSupported(OverrideDataType(input, dataType),
898 OverrideDataType(output, dataType),
899 cLayer->GetParameters(),
905 auto cLayer = PolymorphicDowncast<const PreCompiledLayer*>(&layer);
906 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
907 result = layerSupportObject.IsPreCompiledSupported(OverrideDataType(input, dataType),
908 cLayer->GetParameters(),
914 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
915 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
916 result = layerSupportObject.IsQuantizeSupported(input, output, reason);
921 auto cLayer = PolymorphicDowncast<const QLstmLayer*>(&layer);
922 const QLstmDescriptor& descriptor = cLayer->GetParameters();
925 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
926 const TensorInfo& previousOutputIn = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
927 const TensorInfo& previousCellStateIn = layer.GetInputSlot(2).GetConnection()->GetTensorInfo();
930 const TensorInfo& outputStateOut = layer.GetOutputSlot(0).GetTensorInfo();
931 const TensorInfo& cellStateOut = layer.GetOutputSlot(1).GetTensorInfo();
932 const TensorInfo& output = layer.GetOutputSlot(2).GetTensorInfo();
935 LstmInputParamsInfo paramsInfo;
938 ARMNN_ASSERT(cLayer->m_BasicParameters.m_InputToForgetWeights.get() !=
nullptr);
939 ARMNN_ASSERT(cLayer->m_BasicParameters.m_InputToCellWeights.get() !=
nullptr);
940 ARMNN_ASSERT(cLayer->m_BasicParameters.m_InputToOutputWeights.get() !=
nullptr);
941 paramsInfo.m_InputToForgetWeights = &cLayer->m_BasicParameters.m_InputToForgetWeights->GetTensorInfo();
942 paramsInfo.m_InputToCellWeights = &cLayer->m_BasicParameters.m_InputToCellWeights->GetTensorInfo();
943 paramsInfo.m_InputToOutputWeights = &cLayer->m_BasicParameters.m_InputToOutputWeights->GetTensorInfo();
945 paramsInfo.m_RecurrentToForgetWeights =
946 &cLayer->m_BasicParameters.m_RecurrentToForgetWeights->GetTensorInfo();
947 paramsInfo.m_RecurrentToCellWeights =
948 &cLayer->m_BasicParameters.m_RecurrentToCellWeights->GetTensorInfo();
949 paramsInfo.m_RecurrentToOutputWeights =
950 &cLayer->m_BasicParameters.m_RecurrentToOutputWeights->GetTensorInfo();
952 paramsInfo.m_ForgetGateBias = &cLayer->m_BasicParameters.m_ForgetGateBias->GetTensorInfo();
953 paramsInfo.m_CellBias = &cLayer->m_BasicParameters.m_CellBias->GetTensorInfo();
954 paramsInfo.m_OutputGateBias = &cLayer->m_BasicParameters.m_OutputGateBias->GetTensorInfo();
956 if(!descriptor.m_CifgEnabled)
958 paramsInfo.m_InputToInputWeights = &cLayer->m_CifgParameters.m_InputToInputWeights->GetTensorInfo();
959 paramsInfo.m_RecurrentToInputWeights =
960 &cLayer->m_CifgParameters.m_RecurrentToInputWeights->GetTensorInfo();
961 paramsInfo.m_InputGateBias = &cLayer->m_CifgParameters.m_InputGateBias->GetTensorInfo();
964 if(descriptor.m_ProjectionEnabled)
966 paramsInfo.m_ProjectionWeights = &cLayer->m_ProjectionParameters.m_ProjectionWeights->GetTensorInfo();
969 if (cLayer->m_ProjectionParameters.m_ProjectionBias !=
nullptr)
971 paramsInfo.m_ProjectionBias = &cLayer->m_ProjectionParameters.m_ProjectionBias->GetTensorInfo();
975 if(descriptor.m_PeepholeEnabled)
977 if (!descriptor.m_CifgEnabled)
979 paramsInfo.m_CellToInputWeights =
980 &cLayer->m_PeepholeParameters.m_CellToInputWeights->GetTensorInfo();
983 paramsInfo.m_CellToForgetWeights =
984 &cLayer->m_PeepholeParameters.m_CellToForgetWeights->GetTensorInfo();
985 paramsInfo.m_CellToOutputWeights = &cLayer->m_PeepholeParameters.m_CellToOutputWeights->GetTensorInfo();
988 if(descriptor.m_LayerNormEnabled)
990 if (!descriptor.m_CifgEnabled)
992 paramsInfo.m_InputLayerNormWeights =
993 &cLayer->m_LayerNormParameters.m_InputLayerNormWeights->GetTensorInfo();
996 paramsInfo.m_ForgetLayerNormWeights =
997 &cLayer->m_LayerNormParameters.m_ForgetLayerNormWeights->GetTensorInfo();
998 paramsInfo.m_CellLayerNormWeights =
999 &cLayer->m_LayerNormParameters.m_CellLayerNormWeights->GetTensorInfo();
1000 paramsInfo.m_OutputLayerNormWeights =
1001 &cLayer->m_LayerNormParameters.m_OutputLayerNormWeights->GetTensorInfo();
1004 result = layerSupportObject.IsQLstmSupported(input,
1006 previousCellStateIn,
1017 auto cLayer = PolymorphicDowncast<const QuantizedLstmLayer*>(&layer);
1020 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1021 const TensorInfo& previousCellStateIn = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
1022 const TensorInfo& previousOutputIn = layer.GetInputSlot(2).GetConnection()->GetTensorInfo();
1025 const TensorInfo& cellStateOut = layer.GetOutputSlot(0).GetTensorInfo();
1026 const TensorInfo& output = layer.GetOutputSlot(1).GetTensorInfo();
1029 QuantizedLstmInputParamsInfo paramsInfo;
1031 paramsInfo.m_InputToInputWeights =
1032 &cLayer->m_QuantizedLstmParameters.m_InputToInputWeights->GetTensorInfo();
1033 paramsInfo.m_InputToForgetWeights =
1034 &cLayer->m_QuantizedLstmParameters.m_InputToForgetWeights->GetTensorInfo();
1035 paramsInfo.m_InputToCellWeights =
1036 &cLayer->m_QuantizedLstmParameters.m_InputToCellWeights->GetTensorInfo();
1037 paramsInfo.m_InputToOutputWeights =
1038 &cLayer->m_QuantizedLstmParameters.m_InputToOutputWeights->GetTensorInfo();
1040 paramsInfo.m_RecurrentToInputWeights =
1041 &cLayer->m_QuantizedLstmParameters.m_RecurrentToInputWeights->GetTensorInfo();
1042 paramsInfo.m_RecurrentToForgetWeights =
1043 &cLayer->m_QuantizedLstmParameters.m_RecurrentToForgetWeights->GetTensorInfo();
1044 paramsInfo.m_RecurrentToCellWeights =
1045 &cLayer->m_QuantizedLstmParameters.m_RecurrentToCellWeights->GetTensorInfo();
1046 paramsInfo.m_RecurrentToOutputWeights =
1047 &cLayer->m_QuantizedLstmParameters.m_RecurrentToOutputWeights->GetTensorInfo();
1049 paramsInfo.m_InputGateBias =
1050 &cLayer->m_QuantizedLstmParameters.m_InputGateBias->GetTensorInfo();
1051 paramsInfo.m_ForgetGateBias =
1052 &cLayer->m_QuantizedLstmParameters.m_ForgetGateBias->GetTensorInfo();
1053 paramsInfo.m_CellBias =
1054 &cLayer->m_QuantizedLstmParameters.m_CellBias->GetTensorInfo();
1055 paramsInfo.m_OutputGateBias =
1056 &cLayer->m_QuantizedLstmParameters.m_OutputGateBias->GetTensorInfo();;
1058 result = layerSupportObject.IsQuantizedLstmSupported(input,
1059 previousCellStateIn,
1069 const TensorInfo& input0 = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1070 const TensorInfo& input1 = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
1071 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1072 result = layerSupportObject.IsDivisionSupported(
1073 OverrideDataType(input0, dataType),
1074 OverrideDataType(input1, dataType),
1075 OverrideDataType(output, dataType),
1081 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1082 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1083 result = layerSupportObject.IsRankSupported(OverrideDataType(input, dataType),
1084 OverrideDataType(output, dataType),
1090 auto cLayer = PolymorphicDowncast<const ReshapeLayer*>(&layer);
1091 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1092 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1093 result = layerSupportObject.IsReshapeSupported(OverrideDataType(input, dataType),
1094 OverrideDataType(output, dataType),
1095 cLayer->GetParameters(),
1101 auto cLayer = PolymorphicDowncast<const ResizeLayer*>(&layer);
1102 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1103 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1104 result = layerSupportObject.IsResizeSupported(OverrideDataType(input, dataType),
1105 OverrideDataType(output, dataType),
1106 cLayer->GetParameters(),
1112 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1113 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1115 result = layerSupportObject.IsShapeSupported(OverrideDataType(input, dataType),
1116 OverrideDataType(output, dataType),
1122 auto cLayer = PolymorphicDowncast<const SliceLayer*>(&layer);
1124 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1125 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1127 result = layerSupportObject.IsSliceSupported(OverrideDataType(input, dataType),
1128 OverrideDataType(output, dataType),
1129 cLayer->GetParameters(),
1135 auto cLayer = PolymorphicDowncast<const SoftmaxLayer*>(&layer);
1136 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1137 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1138 result = layerSupportObject.IsSoftmaxSupported(OverrideDataType(input, dataType),
1139 OverrideDataType(output, dataType),
1140 cLayer->GetParameters(),
1146 auto cLayer = PolymorphicDowncast<const SpaceToBatchNdLayer*>(&layer);
1147 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1148 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1149 result = layerSupportObject.IsSpaceToBatchNdSupported(OverrideDataType(input, dataType),
1150 OverrideDataType(output, dataType),
1151 cLayer->GetParameters(),
1157 auto cLayer = PolymorphicDowncast<const SpaceToDepthLayer*>(&layer);
1159 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1160 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1162 result = layerSupportObject.IsSpaceToDepthSupported(OverrideDataType(input, dataType),
1163 OverrideDataType(output, dataType),
1164 cLayer->GetParameters(),
1170 auto cLayer = PolymorphicDowncast<const SplitterLayer*>(&layer);
1171 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1174 auto getTensorInfo = [&dataType](
const OutputSlot& slot)
1176 return OverrideDataType(slot.GetTensorInfo(), dataType);
1180 std::vector<TensorInfo> outputs(beginI, endI);
1182 const std::vector<std::reference_wrapper<TensorInfo>> outputPtrs(outputs.begin(), outputs.end());
1184 result = layerSupportObject.IsSplitterSupported(OverrideDataType(input, dataType),
1186 cLayer->GetParameters(),
1192 auto cLayer = PolymorphicDowncast<const StackLayer*>(&layer);
1195 auto getTensorInfo = [&dataType](
const InputSlot& slot)
1197 return OverrideDataType(slot.GetConnectedOutputSlot()->GetTensorInfo(), dataType);
1201 std::vector<TensorInfo> inputs(beginI, endI);
1203 auto getTensorInfoPtr = [](
const TensorInfo&
info)
1209 std::vector<const TensorInfo*> inputPtrs(beginPtr, endPtr);
1211 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1213 result = layerSupportObject.IsStackSupported(inputPtrs, output, cLayer->GetParameters(), reason);
1219 auto cLayer = PolymorphicDowncast<const StandInLayer*>(&layer);
1222 auto getTensorInfoIn = [&dataType](
const InputSlot& slot)
1224 return OverrideDataType(slot.GetConnectedOutputSlot()->GetTensorInfo(), dataType);
1226 auto getTensorInfoOut = [&dataType](
const OutputSlot& slot)
1228 return OverrideDataType(slot.GetTensorInfo(), dataType);
1232 std::vector<TensorInfo> inputs(beginI, endI);
1236 std::vector<TensorInfo> outputs(beginO, endO);
1239 auto getTensorInfoPtr = [](
const TensorInfo&
info)
1245 std::vector<const TensorInfo*> inputPtrs(beginPtrI, endPtrI);
1249 std::vector<const TensorInfo*> outputPtrs(beginPtrO, endPtrO);
1252 result = layerSupportObject.IsStandInSupported(inputPtrs,
1254 cLayer->GetParameters(),
1260 auto cLayer = PolymorphicDowncast<const StridedSliceLayer*>(&layer);
1261 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1262 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1263 result = layerSupportObject.IsStridedSliceSupported(OverrideDataType(input, dataType),
1264 OverrideDataType(output, dataType),
1265 cLayer->GetParameters(),
1271 const TensorInfo& input0 = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1272 const TensorInfo& input1 = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
1273 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1274 result = layerSupportObject.IsSubtractionSupported(
1275 OverrideDataType(input0, dataType),
1276 OverrideDataType(input1, dataType),
1277 OverrideDataType(output, dataType),
1283 const TensorInfo& input0 = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1284 const TensorInfo& input1 = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
1285 const TensorInfo& output0 = layer.GetOutputSlot(0).GetTensorInfo();
1286 const TensorInfo& output1 = layer.GetOutputSlot(1).GetTensorInfo();
1287 result = layerSupportObject.IsSwitchSupported(OverrideDataType(input0, dataType),
1288 OverrideDataType(input1, dataType),
1289 OverrideDataType(output0, dataType),
1290 OverrideDataType(output1, dataType),
1296 auto cLayer = PolymorphicDowncast<const MeanLayer*>(&layer);
1297 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1298 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1299 result = layerSupportObject.IsMeanSupported(
1300 OverrideDataType(input, dataType),
1301 OverrideDataType(output, dataType),
1302 cLayer->GetParameters(),
1308 const TensorInfo& input0 = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1309 const TensorInfo& input1 = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
1310 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1311 result = layerSupportObject.IsMinimumSupported(OverrideDataType(input0, dataType),
1312 OverrideDataType(input1, dataType),
1313 OverrideDataType(output, dataType),
1319 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1320 const TensorInfo& alpha = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
1321 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1322 result = layerSupportObject.IsPreluSupported(OverrideDataType(input, dataType),
1323 OverrideDataType(alpha, dataType),
1324 OverrideDataType(output, dataType),
1330 auto cLayer = PolymorphicDowncast<const TransposeLayer*>(&layer);
1331 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1332 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1333 result = layerSupportObject.IsTransposeSupported(OverrideDataType(input, dataType),
1334 OverrideDataType(output, dataType),
1335 cLayer->GetParameters(),
1341 auto cLayer = PolymorphicDowncast<const TransposeConvolution2dLayer*>(&layer);
1343 const TensorInfo input = OverrideDataType(layer.GetInputSlot(0).GetConnection()->GetTensorInfo(),
1345 const TensorInfo output = OverrideDataType(layer.GetOutputSlot(0).GetTensorInfo(), dataType);
1347 const TransposeConvolution2dDescriptor& descriptor = cLayer->GetParameters();
1349 Optional<TensorInfo> biases;
1350 if (descriptor.m_BiasEnabled)
1353 biases = OverrideDataType(cLayer->m_Bias->GetTensorInfo(),
1358 const TensorInfo weights = OverrideDataType(cLayer->m_Weight->GetTensorInfo(), dataType);
1360 result = layerSupportObject.IsTransposeConvolution2dSupported(input,
1371 auto cLayer = PolymorphicDowncast<const ReduceLayer*>(&layer);
1372 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1373 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1375 result = layerSupportObject.IsReduceSupported(OverrideDataType(input, dataType),
1376 OverrideDataType(output, dataType),
1377 cLayer->GetParameters(),
1383 auto cLayer = PolymorphicDowncast<const UnidirectionalSequenceLstmLayer*>(&layer);
1387 const TensorInfo& input = OverrideDataType(layer.GetInputSlot(0).GetConnection()->GetTensorInfo(),
1389 const TensorInfo& outputStateIn = OverrideDataType(layer.GetInputSlot(1).GetConnection()->GetTensorInfo(),
1391 const TensorInfo& cellStateIn = OverrideDataType(layer.GetInputSlot(2).GetConnection()->GetTensorInfo(),
1394 const TensorInfo& outputStateOut = OverrideDataType(layer.GetOutputSlot(0).GetTensorInfo(), dataType);
1395 const TensorInfo& cellStateOut = OverrideDataType(layer.GetOutputSlot(1).GetTensorInfo(), dataType);
1396 const TensorInfo& output = OverrideDataType(layer.GetOutputSlot(2).GetTensorInfo(), dataType);
1399 const TensorInfo& inputToForgetWeights
1400 = OverrideDataType(cLayer->m_BasicParameters.m_InputToForgetWeights->GetTensorInfo(), dataType);
1401 const TensorInfo& inputToCellWeights
1402 = OverrideDataType(cLayer->m_BasicParameters.m_InputToCellWeights->GetTensorInfo(), dataType);
1403 const TensorInfo& inputToOutputWeights
1404 = OverrideDataType(cLayer->m_BasicParameters.m_InputToOutputWeights->GetTensorInfo(), dataType);
1405 const TensorInfo& recurrentToForgetWeights
1406 = OverrideDataType(cLayer->m_BasicParameters.m_RecurrentToForgetWeights->GetTensorInfo(), dataType);
1407 const TensorInfo& recurrentToCellWeights
1408 = OverrideDataType(cLayer->m_BasicParameters.m_RecurrentToCellWeights->GetTensorInfo(), dataType);
1409 const TensorInfo& recurrentToOutputWeights
1410 = OverrideDataType(cLayer->m_BasicParameters.m_RecurrentToOutputWeights->GetTensorInfo(), dataType);
1411 const TensorInfo& forgetGateBias
1412 = OverrideDataType(cLayer->m_BasicParameters.m_ForgetGateBias->GetTensorInfo(), dataType);
1413 const TensorInfo& cellBias
1414 = OverrideDataType(cLayer->m_BasicParameters.m_CellBias->GetTensorInfo(), dataType);
1415 const TensorInfo& outputGateBias
1416 = OverrideDataType(cLayer->m_BasicParameters.m_OutputGateBias->GetTensorInfo(), dataType);
1418 LstmInputParamsInfo paramsInfo;
1420 paramsInfo.m_InputToForgetWeights = &inputToForgetWeights;
1421 paramsInfo.m_InputToCellWeights = &inputToCellWeights;
1422 paramsInfo.m_InputToOutputWeights = &inputToOutputWeights;
1423 paramsInfo.m_RecurrentToForgetWeights = &recurrentToForgetWeights;
1424 paramsInfo.m_RecurrentToCellWeights = &recurrentToCellWeights;
1425 paramsInfo.m_RecurrentToOutputWeights = &recurrentToOutputWeights;
1426 paramsInfo.m_ForgetGateBias = &forgetGateBias;
1427 paramsInfo.m_CellBias = &cellBias;
1428 paramsInfo.m_OutputGateBias = &outputGateBias;
1431 TensorInfo optInputToInputWeights;
1432 TensorInfo optRecurrentToInputWeights;
1433 TensorInfo optCellToInputWeights;
1434 TensorInfo optInputGateBias;
1435 TensorInfo optProjectionWeights;
1436 TensorInfo optProjectionBias;
1437 TensorInfo optCellToForgetWeights;
1438 TensorInfo optCellToOutputWeights;
1439 TensorInfo optInputLayerNormWeights;
1440 TensorInfo optForgetLayerNormWeights;
1441 TensorInfo optCellLayerNormWeights;
1442 TensorInfo optOutputLayerNormWeights;
1444 if(!descriptor.m_CifgEnabled)
1446 optInputToInputWeights =
1447 OverrideDataType(cLayer->m_CifgParameters.m_InputToInputWeights->GetTensorInfo(), dataType);
1448 paramsInfo.m_InputToInputWeights = &optInputToInputWeights;
1450 optRecurrentToInputWeights =
1451 OverrideDataType(cLayer->m_CifgParameters.m_RecurrentToInputWeights->GetTensorInfo(), dataType);
1452 paramsInfo.m_RecurrentToInputWeights = &optRecurrentToInputWeights;
1454 OverrideDataType(cLayer->m_CifgParameters.m_InputGateBias->GetTensorInfo(), dataType);
1455 paramsInfo.m_InputGateBias = &optInputGateBias;
1458 if(descriptor.m_ProjectionEnabled)
1460 optProjectionWeights =
1461 OverrideDataType(cLayer->m_ProjectionParameters.m_ProjectionWeights->GetTensorInfo(), dataType);
1462 paramsInfo.m_ProjectionWeights = &optProjectionWeights;
1463 if (cLayer->m_ProjectionParameters.m_ProjectionBias !=
nullptr)
1466 OverrideDataType(cLayer->m_ProjectionParameters.m_ProjectionBias->GetTensorInfo(), dataType);
1467 paramsInfo.m_ProjectionBias = &optProjectionBias;
1471 if(descriptor.m_PeepholeEnabled)
1473 if(!descriptor.m_CifgEnabled)
1475 optCellToInputWeights =
1476 OverrideDataType(cLayer->m_PeepholeParameters.m_CellToInputWeights->GetTensorInfo(),
1478 paramsInfo.m_CellToInputWeights = &optCellToInputWeights;
1480 optCellToForgetWeights =
1481 OverrideDataType(cLayer->m_PeepholeParameters.m_CellToForgetWeights->GetTensorInfo(), dataType);
1482 paramsInfo.m_CellToForgetWeights = &optCellToForgetWeights;
1483 optCellToOutputWeights =
1484 OverrideDataType(cLayer->m_PeepholeParameters.m_CellToOutputWeights->GetTensorInfo(), dataType);
1485 paramsInfo.m_CellToOutputWeights = &optCellToOutputWeights;
1488 if(descriptor.m_LayerNormEnabled)
1490 if (!descriptor.m_CifgEnabled)
1492 optInputLayerNormWeights = OverrideDataType(
1493 cLayer->m_LayerNormParameters.m_InputLayerNormWeights->GetTensorInfo(), dataType);
1494 paramsInfo.m_InputLayerNormWeights = &optInputLayerNormWeights;
1497 optForgetLayerNormWeights = OverrideDataType(
1498 cLayer->m_LayerNormParameters.m_ForgetLayerNormWeights->GetTensorInfo(), dataType);
1499 paramsInfo.m_ForgetLayerNormWeights = &optForgetLayerNormWeights;
1501 optCellLayerNormWeights = OverrideDataType(
1502 cLayer->m_LayerNormParameters.m_CellLayerNormWeights->GetTensorInfo(), dataType);
1503 paramsInfo.m_CellLayerNormWeights = &optCellLayerNormWeights;
1505 optOutputLayerNormWeights = OverrideDataType(
1506 cLayer->m_LayerNormParameters.m_OutputLayerNormWeights->GetTensorInfo(), dataType);
1507 paramsInfo.m_OutputLayerNormWeights = &optOutputLayerNormWeights;
1510 result = layerSupportObject.IsUnidirectionalSequenceLstmSupported(input,
1523 ARMNN_ASSERT_MSG(
false,
"WorkloadFactory did not recognise type of layer.");
1524 reason.value() =
"Unrecognised layer type";
1535 std::string& outReasonIfUnsupported)
1537 return IsLayerConfigurationSupported(backendId, connectableLayer, dataType, outReasonIfUnsupported);
1542 std::string& outReasonIfUnsupported)
1544 auto layer = PolymorphicDowncast<const Layer*>(&connectableLayer);
1545 return IsLayerConfigurationSupported(layer->GetBackendId(), connectableLayer, dataType, outReasonIfUnsupported);
1551 std::string& outReasonIfUnsupported,
1554 auto layer = PolymorphicDowncast<const Layer*>(&connectableLayer);
1555 return IsLayerConfigurationSupported(layer->GetBackendId(),
1558 outReasonIfUnsupported,
1565 std::string& outReasonIfUnsupported,
1568 return IsLayerConfigurationSupported(backendId,
1571 outReasonIfUnsupported,
1583 auto activationQueueDescriptor = PolymorphicDowncast<const ActivationQueueDescriptor*>(&descriptor);
1584 return CreateActivation(*activationQueueDescriptor, info);
1588 auto additionQueueDescriptor = PolymorphicDowncast<const AdditionQueueDescriptor*>(&descriptor);
1589 return CreateAddition(*additionQueueDescriptor, info);
1593 auto argMinMaxQueueDescriptor = PolymorphicDowncast<const ArgMinMaxQueueDescriptor*>(&descriptor);
1594 return CreateArgMinMax(*argMinMaxQueueDescriptor, info);
1598 auto batchNormQueueDescriptor = PolymorphicDowncast<const BatchNormalizationQueueDescriptor*>(&descriptor);
1599 return CreateBatchNormalization(*batchNormQueueDescriptor, info);
1603 auto batchToSpaceNdQueueDescriptor
1604 = PolymorphicDowncast<const BatchToSpaceNdQueueDescriptor*>(&descriptor);
1605 return CreateBatchToSpaceNd(*batchToSpaceNdQueueDescriptor, info);
1609 auto castQueueDescriptor = PolymorphicDowncast<const CastQueueDescriptor*>(&descriptor);
1610 return CreateCast(*castQueueDescriptor, info);
1614 auto channelShuffleQueueDescriptor
1615 = PolymorphicDowncast<const ChannelShuffleQueueDescriptor*>(&descriptor);
1616 return CreateChannelShuffle(*channelShuffleQueueDescriptor, info);
1620 auto comparisonQueueDescriptor = PolymorphicDowncast<const ComparisonQueueDescriptor*>(&descriptor);
1621 return CreateComparison(*comparisonQueueDescriptor, info);
1625 auto concatQueueDescriptor = PolymorphicDowncast<const ConcatQueueDescriptor*>(&descriptor);
1626 return CreateConcat(*concatQueueDescriptor, info);
1630 auto constantQueueDescriptor = PolymorphicDowncast<const ConstantQueueDescriptor*>(&descriptor);
1631 return CreateConstant(*constantQueueDescriptor, info);
1635 auto convertBf16ToFp32QueueDescriptor
1636 = PolymorphicDowncast<const ConvertBf16ToFp32QueueDescriptor*>(&descriptor);
1637 return CreateConvertBf16ToFp32(*convertBf16ToFp32QueueDescriptor, info);
1641 auto convertFp16ToFp32QueueDescriptor
1642 = PolymorphicDowncast<const ConvertFp16ToFp32QueueDescriptor*>(&descriptor);
1643 return CreateConvertFp16ToFp32(*convertFp16ToFp32QueueDescriptor, info);
1647 auto convertFp32ToBf16QueueDescriptor
1648 = PolymorphicDowncast<const ConvertFp32ToBf16QueueDescriptor*>(&descriptor);
1649 return CreateConvertFp32ToBf16(*convertFp32ToBf16QueueDescriptor, info);
1653 auto convertFp32ToFp16QueueDescriptor
1654 = PolymorphicDowncast<const ConvertFp32ToFp16QueueDescriptor*>(&descriptor);
1655 return CreateConvertFp32ToFp16(*convertFp32ToFp16QueueDescriptor, info);
1659 auto convolution2dQueueDescriptor = PolymorphicDowncast<const Convolution2dQueueDescriptor*>(&descriptor);
1660 return CreateConvolution2d(*convolution2dQueueDescriptor, info);
1664 auto convolution3dQueueDescriptor = PolymorphicDowncast<const Convolution3dQueueDescriptor*>(&descriptor);
1665 return CreateConvolution3d(*convolution3dQueueDescriptor, info);
1669 auto debugQueueDescriptor = PolymorphicDowncast<const DebugQueueDescriptor*>(&descriptor);
1670 return CreateDebug(*debugQueueDescriptor, info);
1674 auto depthToSpaceQueueDescriptor = PolymorphicDowncast<const DepthToSpaceQueueDescriptor*>(&descriptor);
1675 return CreateDepthToSpace(*depthToSpaceQueueDescriptor, info);
1679 auto depthwiseConvolution2DQueueDescriptor
1680 = PolymorphicDowncast<const DepthwiseConvolution2dQueueDescriptor*>(&descriptor);
1681 return CreateDepthwiseConvolution2d(*depthwiseConvolution2DQueueDescriptor, info);
1685 auto dequantizeQueueDescriptor = PolymorphicDowncast<const DequantizeQueueDescriptor*>(&descriptor);
1686 return CreateDequantize(*dequantizeQueueDescriptor, info);
1690 auto detectionPostProcessQueueDescriptor
1691 = PolymorphicDowncast<const DetectionPostProcessQueueDescriptor*>(&descriptor);
1692 return CreateDetectionPostProcess(*detectionPostProcessQueueDescriptor, info);
1696 auto divisionQueueDescriptor = PolymorphicDowncast<const DivisionQueueDescriptor*>(&descriptor);
1697 return CreateDivision(*divisionQueueDescriptor, info);
1701 auto elementwiseUnaryQueueDescriptor
1702 = PolymorphicDowncast<const ElementwiseUnaryQueueDescriptor*>(&descriptor);
1703 return CreateElementwiseUnary(*elementwiseUnaryQueueDescriptor, info);
1708 auto fakeQuantizationQueueDescriptor
1709 = PolymorphicDowncast<const FakeQuantizationQueueDescriptor*>(&descriptor);
1710 return CreateFakeQuantization(*fakeQuantizationQueueDescriptor, info);
1714 auto fillQueueDescriptor = PolymorphicDowncast<const FillQueueDescriptor*>(&descriptor);
1715 return CreateFill(*fillQueueDescriptor, info);
1719 auto floorQueueDescriptor = PolymorphicDowncast<const FloorQueueDescriptor*>(&descriptor);
1720 return CreateFloor(*floorQueueDescriptor, info);
1724 auto fullyConnectedQueueDescriptor
1725 = PolymorphicDowncast<const FullyConnectedQueueDescriptor*>(&descriptor);
1726 return CreateFullyConnected(*fullyConnectedQueueDescriptor, info);
1730 auto gatherQueueDescriptor = PolymorphicDowncast<const GatherQueueDescriptor*>(&descriptor);
1731 return CreateGather(*gatherQueueDescriptor, info);
1735 auto inputQueueDescriptor = PolymorphicDowncast<const InputQueueDescriptor*>(&descriptor);
1740 auto instanceNormalizationQueueDescriptor
1741 = PolymorphicDowncast<const InstanceNormalizationQueueDescriptor*>(&descriptor);
1742 return CreateInstanceNormalization(*instanceNormalizationQueueDescriptor, info);
1746 auto l2NormalizationQueueDescriptor
1747 = PolymorphicDowncast<const L2NormalizationQueueDescriptor*>(&descriptor);
1748 return CreateL2Normalization(*l2NormalizationQueueDescriptor, info);
1752 auto logicalBinaryQueueDescriptor = PolymorphicDowncast<const LogicalBinaryQueueDescriptor*>(&descriptor);
1753 return CreateLogicalBinary(*logicalBinaryQueueDescriptor, info);
1757 auto logSoftmaxQueueDescriptor = PolymorphicDowncast<const LogSoftmaxQueueDescriptor*>(&descriptor);
1758 return CreateLogSoftmax(*logSoftmaxQueueDescriptor, info);
1762 auto lstmQueueDescriptor = PolymorphicDowncast<const LstmQueueDescriptor*>(&descriptor);
1763 return CreateLstm(*lstmQueueDescriptor, info);
1767 auto maximumQueueDescriptor = PolymorphicDowncast<const MaximumQueueDescriptor*>(&descriptor);
1768 return CreateMaximum(*maximumQueueDescriptor, info);
1772 auto meanQueueDescriptor = PolymorphicDowncast<const MeanQueueDescriptor*>(&descriptor);
1773 return CreateMean(*meanQueueDescriptor, info);
1777 auto memCopyQueueDescriptor = PolymorphicDowncast<const MemCopyQueueDescriptor*>(&descriptor);
1778 return CreateMemCopy(*memCopyQueueDescriptor, info);
1782 auto memImportQueueDescriptor = PolymorphicDowncast<const MemImportQueueDescriptor*>(&descriptor);
1783 return CreateMemImport(*memImportQueueDescriptor, info);
1787 auto minimumQueueDescriptor = PolymorphicDowncast<const MinimumQueueDescriptor*>(&descriptor);
1788 return CreateMinimum(*minimumQueueDescriptor, info);
1792 auto multiplicationQueueDescriptor
1793 = PolymorphicDowncast<const MultiplicationQueueDescriptor*>(&descriptor);
1794 return CreateMultiplication(*multiplicationQueueDescriptor, info);
1798 auto normalizationQueueDescriptor = PolymorphicDowncast<const NormalizationQueueDescriptor*>(&descriptor);
1799 return CreateNormalization(*normalizationQueueDescriptor, info);
1803 auto outputQueueDescriptor = PolymorphicDowncast<const OutputQueueDescriptor*>(&descriptor);
1804 return CreateOutput(*outputQueueDescriptor, info);
1808 auto padQueueDescriptor = PolymorphicDowncast<const PadQueueDescriptor*>(&descriptor);
1809 return CreatePad(*padQueueDescriptor, info);
1813 auto permuteQueueDescriptor = PolymorphicDowncast<const PermuteQueueDescriptor*>(&descriptor);
1814 return CreatePermute(*permuteQueueDescriptor, info);
1818 auto pooling2dQueueDescriptor = PolymorphicDowncast<const Pooling2dQueueDescriptor*>(&descriptor);
1819 return CreatePooling2d(*pooling2dQueueDescriptor, info);
1823 auto pooling3dQueueDescriptor = PolymorphicDowncast<const Pooling3dQueueDescriptor*>(&descriptor);
1824 return CreatePooling3d(*pooling3dQueueDescriptor, info);
1828 auto preCompiledQueueDescriptor = PolymorphicDowncast<const PreCompiledQueueDescriptor*>(&descriptor);
1829 return CreatePreCompiled(*preCompiledQueueDescriptor, info);
1833 auto preluQueueDescriptor = PolymorphicDowncast<const PreluQueueDescriptor*>(&descriptor);
1834 return CreatePrelu(*preluQueueDescriptor, info);
1838 auto qlstmQueueDescriptor = PolymorphicDowncast<const QLstmQueueDescriptor*>(&descriptor);
1839 return CreateQLstm(*qlstmQueueDescriptor, info);
1843 auto quantizeQueueDescriptor = PolymorphicDowncast<const QuantizeQueueDescriptor*>(&descriptor);
1844 return CreateQuantize(*quantizeQueueDescriptor, info);
1848 auto rankQueueDescriptor = PolymorphicDowncast<const RankQueueDescriptor*>(&descriptor);
1849 return CreateRank(*rankQueueDescriptor, info);
1853 auto reduceQueueDescriptor = PolymorphicDowncast<const ReduceQueueDescriptor*>(&descriptor);
1854 return CreateReduce(*reduceQueueDescriptor, info);
1858 auto reshapeQueueDescriptor = PolymorphicDowncast<const ReshapeQueueDescriptor*>(&descriptor);
1859 return CreateReshape(*reshapeQueueDescriptor, info);
1863 auto resizeQueueDescriptor = PolymorphicDowncast<const ResizeQueueDescriptor*>(&descriptor);
1864 return CreateResize(*resizeQueueDescriptor, info);
1868 auto shapeQueueDescriptor = PolymorphicDowncast<const ShapeQueueDescriptor*>(&descriptor);
1869 return CreateShape(*shapeQueueDescriptor, info);
1873 auto sliceQueueDescriptor = PolymorphicDowncast<const SliceQueueDescriptor*>(&descriptor);
1874 return CreateSlice(*sliceQueueDescriptor, info);
1878 auto softmaxQueueDescriptor = PolymorphicDowncast<const SoftmaxQueueDescriptor*>(&descriptor);
1879 return CreateSoftmax(*softmaxQueueDescriptor, info);
1883 auto spaceToBatchNdQueueDescriptor
1884 = PolymorphicDowncast<const SpaceToBatchNdQueueDescriptor*>(&descriptor);
1885 return CreateSpaceToBatchNd(*spaceToBatchNdQueueDescriptor, info);
1889 auto spaceToDepthQueueDescriptor = PolymorphicDowncast<const SpaceToDepthQueueDescriptor*>(&descriptor);
1890 return CreateSpaceToDepth(*spaceToDepthQueueDescriptor, info);
1894 auto splitterQueueDescriptor = PolymorphicDowncast<const SplitterQueueDescriptor*>(&descriptor);
1895 return CreateSplitter(*splitterQueueDescriptor, info);
1899 auto stackQueueDescriptor = PolymorphicDowncast<const StackQueueDescriptor*>(&descriptor);
1900 return CreateStack(*stackQueueDescriptor, info);
1904 auto stridedSliceQueueDescriptor = PolymorphicDowncast<const StridedSliceQueueDescriptor*>(&descriptor);
1905 return CreateStridedSlice(*stridedSliceQueueDescriptor, info);
1909 auto subtractionQueueDescriptor = PolymorphicDowncast<const SubtractionQueueDescriptor*>(&descriptor);
1910 return CreateSubtraction(*subtractionQueueDescriptor, info);
1914 auto transposeQueueDescriptor = PolymorphicDowncast<const TransposeQueueDescriptor*>(&descriptor);
1915 return CreateTranspose(*transposeQueueDescriptor, info);
1919 auto transposeConvolution2dQueueDescriptor
1920 = PolymorphicDowncast<const TransposeConvolution2dQueueDescriptor*>(&descriptor);
1921 return CreateTransposeConvolution2d(*transposeConvolution2dQueueDescriptor, info);
1925 auto unidirectionalSequenceLstmQueueDescriptor
1926 = PolymorphicDowncast<const UnidirectionalSequenceLstmQueueDescriptor*>(&descriptor);
1927 return CreateUnidirectionalSequenceLstm(*unidirectionalSequenceLstmQueueDescriptor, info);
1938 return std::unique_ptr<IWorkload>();
1944 return std::unique_ptr<IWorkload>();
1950 return std::unique_ptr<IWorkload>();
1953 std::unique_ptr<IWorkload> IWorkloadFactory::CreateBatchNormalization(
1956 return std::unique_ptr<IWorkload>();
1962 return std::unique_ptr<IWorkload>();
1968 return std::unique_ptr<IWorkload>();
1974 return std::unique_ptr<IWorkload>();
1980 return std::unique_ptr<IWorkload>();
1986 return std::unique_ptr<IWorkload>();
1992 return std::unique_ptr<IWorkload>();
1998 return std::unique_ptr<IWorkload>();
2004 return std::unique_ptr<IWorkload>();
2010 return std::unique_ptr<IWorkload>();
2016 return std::unique_ptr<IWorkload>();
2022 return std::unique_ptr<IWorkload>();
2028 return std::unique_ptr<IWorkload>();
2034 return std::unique_ptr<IWorkload>();
2040 return std::unique_ptr<IWorkload>();
2043 std::unique_ptr<IWorkload> IWorkloadFactory::CreateDepthwiseConvolution2d(
2046 return std::unique_ptr<IWorkload>();
2049 std::unique_ptr<IWorkload> IWorkloadFactory::CreateDequantize(
2052 return std::unique_ptr<IWorkload>();
2055 std::unique_ptr<IWorkload> IWorkloadFactory::CreateDetectionPostProcess(
2058 return std::unique_ptr<IWorkload>();
2064 return std::unique_ptr<IWorkload>();
2070 return std::unique_ptr<IWorkload>();
2076 return std::unique_ptr<IWorkload>();
2082 return std::unique_ptr<IWorkload>();
2088 return std::unique_ptr<IWorkload>();
2094 return std::unique_ptr<IWorkload>();
2100 return std::unique_ptr<IWorkload>();
2103 std::unique_ptr<IWorkload> IWorkloadFactory::CreateInstanceNormalization(
2107 return std::unique_ptr<IWorkload>();
2113 return std::unique_ptr<IWorkload>();
2119 return std::unique_ptr<IWorkload>();
2125 return std::unique_ptr<IWorkload>();
2131 return std::unique_ptr<IWorkload>();
2137 return std::unique_ptr<IWorkload>();
2143 return std::unique_ptr<IWorkload>();
2149 return std::unique_ptr<IWorkload>();
2155 return std::unique_ptr<IWorkload>();
2161 return std::unique_ptr<IWorkload>();
2167 return std::unique_ptr<IWorkload>();
2173 return std::unique_ptr<IWorkload>();
2179 return std::unique_ptr<IWorkload>();
2185 return std::unique_ptr<IWorkload>();
2191 return std::unique_ptr<IWorkload>();
2197 return std::unique_ptr<IWorkload>();
2203 return std::unique_ptr<IWorkload>();
2209 return std::unique_ptr<IWorkload>();
2215 return std::unique_ptr<IWorkload>();
2221 return std::unique_ptr<IWorkload>();
2227 return std::unique_ptr<IWorkload>();
2233 return std::unique_ptr<IWorkload>();
2239 return std::unique_ptr<IWorkload>();
2245 return std::unique_ptr<IWorkload>();
2250 return std::unique_ptr<IWorkload>();
2256 return std::unique_ptr<IWorkload>();
2262 return std::unique_ptr<IWorkload>();
2268 return std::unique_ptr<IWorkload>();
2274 return std::unique_ptr<IWorkload>();
2280 return std::unique_ptr<IWorkload>();
2286 return std::unique_ptr<IWorkload>();
2292 return std::unique_ptr<IWorkload>();
2298 return std::unique_ptr<IWorkload>();
2304 return std::unique_ptr<IWorkload>();
2310 return std::unique_ptr<IWorkload>();
2316 return std::unique_ptr<IWorkload>();
2322 return std::unique_ptr<IWorkload>();
2328 return std::unique_ptr<IWorkload>();
2334 return std::unique_ptr<IWorkload>();
2337 std::unique_ptr<IWorkload> IWorkloadFactory::CreateTransposeConvolution2d(
2341 return std::unique_ptr<IWorkload>();
2344 std::unique_ptr<IWorkload> IWorkloadFactory::CreateUnidirectionalSequenceLstm(
2348 return std::unique_ptr<IWorkload>();
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
#define ARMNN_NO_DEPRECATE_WARN_BEGIN
std::vector< BackendOptions > ModelOptions
constexpr TransformIterator< Function, Iterator > MakeTransformIterator(Iterator i, Function f)
BackendRegistry & BackendRegistryInstance()
Copyright (c) 2021 ARM Limited and Contributors.
armnn::Optional< armnn::DataType > GetBiasTypeFromWeightsType(armnn::Optional< armnn::DataType > weightsType)
virtual std::unique_ptr< IWorkload > CreateInput(const InputQueueDescriptor &descriptor, const WorkloadInfo &info) const =0
#define ARMNN_NO_DEPRECATE_WARN_END
#define ARMNN_ASSERT_MSG(COND, MSG)
#define ARMNN_ASSERT(COND)
LstmDescriptor UnidirectionalSequenceLstmDescriptor
static bool IsLayerSupported(const BackendId &backendId, const IConnectableLayer &layer, Optional< DataType > dataType, std::string &outReasonIfUnsupported)
EmptyOptional is used to initialize the Optional class in case we want to have default value for an O...
Contains information about TensorInfos of a layer.
virtual std::unique_ptr< IWorkload > CreateWorkload(LayerType type, const QueueDescriptor &descriptor, const WorkloadInfo &info) const
Depthwise Convolution 2D layer workload data.
LayerType
When adding a new layer, adapt also the LastLayer enum value in the enum class LayerType below...