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 BatchNormalizationLayer*>(&layer);
139 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
140 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
141 const TensorInfo& mean = cLayer->m_Mean->GetTensorInfo();
142 const TensorInfo& var = cLayer->m_Variance->GetTensorInfo();
143 const TensorInfo& beta = cLayer->m_Beta->GetTensorInfo();
144 const TensorInfo& gamma = cLayer->m_Gamma->GetTensorInfo();
145 result = layerSupportObject.IsBatchNormalizationSupported(
146 OverrideDataType(input, dataType),
147 OverrideDataType(output, dataType),
148 OverrideDataType(mean, dataType),
149 OverrideDataType(var, dataType),
150 OverrideDataType(beta, dataType),
151 OverrideDataType(gamma, dataType),
152 cLayer->GetParameters(),
158 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
159 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
160 auto cLayer = PolymorphicDowncast<const BatchToSpaceNdLayer*>(&layer);
162 result = layerSupportObject.IsBatchToSpaceNdSupported(OverrideDataType(input, dataType),
163 OverrideDataType(output, dataType),
164 cLayer->GetParameters(),
170 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
171 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
173 result = layerSupportObject.IsCastSupported(OverrideDataType(input, dataType),
174 OverrideDataType(output, dataType),
180 auto cLayer = PolymorphicDowncast<const ChannelShuffleLayer*>(&layer);
182 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
183 const TensorInfo& output = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
185 const ChannelShuffleDescriptor descriptor = cLayer->GetParameters();
187 result = layerSupportObject.IsChannelShuffleSupported(OverrideDataType(input, dataType),
188 OverrideDataType(output, dataType),
195 auto cLayer = PolymorphicDowncast<const ComparisonLayer*>(&layer);
197 const TensorInfo& input0 = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
198 const TensorInfo& input1 = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
199 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
201 result = layerSupportObject.IsComparisonSupported(OverrideDataType(input0, dataType),
202 OverrideDataType(input1, dataType),
204 cLayer->GetParameters(),
210 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
211 result = layerSupportObject.IsConstantSupported(OverrideDataType(output, dataType), reason);
216 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
217 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
218 result = layerSupportObject.IsConvertBf16ToFp32Supported(input, output, reason);
223 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
224 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
225 result = layerSupportObject.IsConvertFp16ToFp32Supported(input, output, reason);
230 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
231 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
232 result = layerSupportObject.IsConvertFp32ToBf16Supported(input, output, reason);
237 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
238 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
239 result = layerSupportObject.IsConvertFp32ToFp16Supported(input, output, reason);
244 auto cLayer = PolymorphicDowncast<const Convolution2dLayer*>(&layer);
246 const TensorInfo input = OverrideDataType(layer.GetInputSlot(0).GetConnection()->GetTensorInfo(),
248 const TensorInfo output = OverrideDataType(layer.GetOutputSlot(0).GetTensorInfo(), dataType);
250 "Convolution2dLayer: Weights should be connected as a Constant Layer.");
251 const TensorInfo weights = OverrideDataType(layer.GetInputSlot(1).GetConnection()->GetTensorInfo(),
254 const Convolution2dDescriptor& descriptor = cLayer->GetParameters();
257 Optional<TensorInfo> biases;
258 if (descriptor.m_BiasEnabled)
261 "Convolution2dLayer: Bias should be connected as a Constant Layer.");
262 biases = OverrideDataType(layer.GetInputSlot(2).GetConnection()->GetTensorInfo(),
266 result = layerSupportObject.IsConvolution2dSupported(
277 auto cLayer = PolymorphicDowncast<const Convolution3dLayer*>(&layer);
279 const TensorInfo input = OverrideDataType(layer.GetInputSlot(0).GetConnection()->GetTensorInfo(),
281 const TensorInfo output = OverrideDataType(layer.GetOutputSlot(0).GetTensorInfo(), dataType);
284 "Convolution3dLayer: Weights should be connected as a Constant Layer.");
285 const TensorInfo weights = OverrideDataType(layer.GetInputSlot(1).GetConnection()->GetTensorInfo(),
288 const Convolution3dDescriptor& descriptor = cLayer->GetParameters();
291 Optional<TensorInfo> biases;
292 if (descriptor.m_BiasEnabled)
294 biases = OverrideDataType(layer.GetInputSlot(2).GetConnection()->GetTensorInfo(),
298 result = layerSupportObject.IsConvolution3dSupported(
309 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
310 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
312 result = layerSupportObject.IsDebugSupported(OverrideDataType(input, dataType),
313 OverrideDataType(output, dataType),
319 auto cLayer = PolymorphicDowncast<const DepthToSpaceLayer*>(&layer);
321 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
322 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
324 result = layerSupportObject.IsDepthToSpaceSupported(OverrideDataType(input, dataType),
325 OverrideDataType(output, dataType),
326 cLayer->GetParameters(),
332 auto cLayer = PolymorphicDowncast<const DepthwiseConvolution2dLayer*>(&layer);
333 const TensorInfo& input = OverrideDataType(layer.GetInputSlot(0).GetConnection()->GetTensorInfo(),
335 const TensorInfo& output = OverrideDataType(layer.GetOutputSlot(0).GetTensorInfo(), dataType);
336 const TensorInfo& weights = OverrideDataType(layer.GetInputSlot(1).GetConnection()->GetTensorInfo(),
339 ARMNN_ASSERT(cLayer->GetInputSlot(1).GetConnection() !=
nullptr);
341 const DepthwiseConvolution2dDescriptor& descriptor = cLayer->GetParameters();
344 Optional<TensorInfo> biases;
345 if (descriptor.m_BiasEnabled)
347 biases = OverrideDataType(cLayer->GetInputSlot(2).GetConnection()->GetTensorInfo(),
351 result = layerSupportObject.IsDepthwiseConvolutionSupported(input,
361 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
362 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
364 result = layerSupportObject.IsDequantizeSupported(input,
365 OverrideDataType(output, dataType),
371 auto cLayer = PolymorphicDowncast<const DetectionPostProcessLayer*>(&layer);
372 const TensorInfo& boxEncodings = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
373 const TensorInfo& scores = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
374 const TensorInfo& anchors = cLayer->m_Anchors->GetTensorInfo();
376 const TensorInfo& detectionBoxes = layer.GetOutputSlot(0).GetTensorInfo();
377 const TensorInfo& detectionClasses = layer.GetOutputSlot(1).GetTensorInfo();
378 const TensorInfo& detectionScores = layer.GetOutputSlot(2).GetTensorInfo();
379 const TensorInfo& numDetections = layer.GetOutputSlot(3).GetTensorInfo();
381 const DetectionPostProcessDescriptor& descriptor = cLayer->GetParameters();
382 result = layerSupportObject.IsDetectionPostProcessSupported(boxEncodings,
395 auto cLayer = PolymorphicDowncast<const ElementwiseUnaryLayer*>(&layer);
397 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
398 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
400 result = layerSupportObject.IsElementwiseUnarySupported(OverrideDataType(input, dataType),
401 OverrideDataType(output, dataType),
402 cLayer->GetParameters(),
408 auto cLayer = PolymorphicDowncast<const FillLayer*>(&layer);
409 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
410 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
411 const FillDescriptor& descriptor = cLayer->GetParameters();
413 result = layerSupportObject.IsFillSupported(
414 OverrideDataType(input, dataType),
415 OverrideDataType(output, dataType),
422 auto cLayer = PolymorphicDowncast<const FakeQuantizationLayer*>(&layer);
423 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
424 result = layerSupportObject.IsFakeQuantizationSupported(OverrideDataType(input, dataType),
425 cLayer->GetParameters(),
431 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
432 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
433 result = layerSupportObject.IsFloorSupported(OverrideDataType(input, dataType),
434 OverrideDataType(output, dataType),
440 auto cLayer = PolymorphicDowncast<const FullyConnectedLayer*>(&layer);
441 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
442 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
444 const FullyConnectedDescriptor& descriptor = cLayer->GetParameters();
445 TensorInfo weightsInfo;
446 const TensorInfo* weightsInfoPtr =
nullptr;
448 weightsInfo = OverrideDataType(layer.GetInputSlot(1).GetConnection()->GetTensorInfo(), dataType);
449 weightsInfoPtr = &weightsInfo;
452 const TensorInfo* biasInfoPtr =
nullptr;
453 static const TensorInfo dummyBFloat16Bias(TensorShape({1,1,1,1}),
DataType::BFloat16);
454 static const TensorInfo dummyFloat16Bias(TensorShape({1,1,1,1}),
DataType::Float16);
455 static const TensorInfo dummyFloat32Bias(TensorShape({1,1,1,1}),
DataType::Float32);
458 if (descriptor.m_BiasEnabled)
460 biasInfo = OverrideDataType(layer.GetInputSlot(2).GetConnection()->GetTensorInfo(), dataType);
461 biasInfoPtr = &biasInfo;
466 switch(input.GetDataType())
470 biasInfoPtr = &dummyBFloat16Bias;
475 biasInfoPtr = &dummyFloat16Bias;
480 biasInfoPtr = &dummyFloat32Bias;
488 biasInfoPtr = &dummyQA8Bias;
497 result = layerSupportObject.IsFullyConnectedSupported(
498 OverrideDataType(input, dataType),
499 OverrideDataType(output, dataType),
508 const TensorInfo& input0 = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
509 const TensorInfo& input1 = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
510 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
511 auto cLayer = PolymorphicDowncast<const GatherLayer*>(&layer);
512 const GatherDescriptor& descriptor = cLayer->GetParameters();
513 result = layerSupportObject.IsGatherSupported(OverrideDataType(input0, dataType),
515 OverrideDataType(output, dataType),
522 const TensorInfo& input0 = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
523 const TensorInfo& input1 = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
524 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
525 result = layerSupportObject.IsGatherNdSupported(OverrideDataType(input0, dataType),
527 OverrideDataType(output, dataType),
533 const TensorInfo& input = layer.GetOutputSlot(0).GetTensorInfo();
534 result = layerSupportObject.IsInputSupported(OverrideDataType(input, dataType), reason);
539 auto cLayer = PolymorphicDowncast<const InstanceNormalizationLayer*>(&layer);
540 const InstanceNormalizationDescriptor& descriptor = cLayer->GetParameters();
542 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
543 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
545 result = layerSupportObject.IsInstanceNormalizationSupported(
546 OverrideDataType(input, dataType),
547 OverrideDataType(output, dataType),
554 auto cLayer = PolymorphicDowncast<const L2NormalizationLayer*>(&layer);
555 const L2NormalizationDescriptor& descriptor = cLayer->GetParameters();
557 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
558 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
560 result = layerSupportObject.IsL2NormalizationSupported(
561 OverrideDataType(input, dataType),
562 OverrideDataType(output, dataType),
569 auto cLayer = PolymorphicDowncast<const LogicalBinaryLayer*>(&layer);
571 const TensorInfo& input0 = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
572 const TensorInfo& input1 = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
573 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
575 result = layerSupportObject.IsLogicalBinarySupported(input0,
578 cLayer->GetParameters(),
584 auto cLayer = PolymorphicDowncast<const LogSoftmaxLayer*>(&layer);
586 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
587 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
589 result = layerSupportObject.IsLogSoftmaxSupported(OverrideDataType(input, dataType),
590 OverrideDataType(output, dataType),
591 cLayer->GetParameters(),
597 auto cLayer = PolymorphicDowncast<const LstmLayer*>(&layer);
598 const LstmDescriptor& descriptor = cLayer->GetParameters();
601 const TensorInfo& input = OverrideDataType(layer.GetInputSlot(0).GetConnection()->GetTensorInfo(),
603 const TensorInfo& outputStateIn = OverrideDataType(layer.GetInputSlot(1).GetConnection()->GetTensorInfo(),
605 const TensorInfo& cellStateIn = OverrideDataType(layer.GetInputSlot(2).GetConnection()->GetTensorInfo(),
608 const TensorInfo& scratchBuffer = OverrideDataType(layer.GetOutputSlot(0).GetTensorInfo(), dataType);
609 const TensorInfo& outputStateOut = OverrideDataType(layer.GetOutputSlot(1).GetTensorInfo(), dataType);
610 const TensorInfo& cellStateOut = OverrideDataType(layer.GetOutputSlot(2).GetTensorInfo(), dataType);
611 const TensorInfo& output = OverrideDataType(layer.GetOutputSlot(3).GetTensorInfo(), dataType);
614 const TensorInfo& inputToForgetWeights
615 = OverrideDataType(cLayer->m_BasicParameters.m_InputToForgetWeights->GetTensorInfo(), dataType);
616 const TensorInfo& inputToCellWeights
617 = OverrideDataType(cLayer->m_BasicParameters.m_InputToCellWeights->GetTensorInfo(), dataType);
618 const TensorInfo& inputToOutputWeights
619 = OverrideDataType(cLayer->m_BasicParameters.m_InputToOutputWeights->GetTensorInfo(), dataType);
620 const TensorInfo& recurrentToForgetWeights
621 = OverrideDataType(cLayer->m_BasicParameters.m_RecurrentToForgetWeights->GetTensorInfo(), dataType);
622 const TensorInfo& recurrentToCellWeights
623 = OverrideDataType(cLayer->m_BasicParameters.m_RecurrentToCellWeights->GetTensorInfo(), dataType);
624 const TensorInfo& recurrentToOutputWeights
625 = OverrideDataType(cLayer->m_BasicParameters.m_RecurrentToOutputWeights->GetTensorInfo(), dataType);
626 const TensorInfo& forgetGateBias
627 = OverrideDataType(cLayer->m_BasicParameters.m_ForgetGateBias->GetTensorInfo(), dataType);
628 const TensorInfo& cellBias
629 = OverrideDataType(cLayer->m_BasicParameters.m_CellBias->GetTensorInfo(), dataType);
630 const TensorInfo& outputGateBias
631 = OverrideDataType(cLayer->m_BasicParameters.m_OutputGateBias->GetTensorInfo(), dataType);
633 LstmInputParamsInfo paramsInfo;
635 paramsInfo.m_InputToForgetWeights = &inputToForgetWeights;
636 paramsInfo.m_InputToCellWeights = &inputToCellWeights;
637 paramsInfo.m_InputToOutputWeights = &inputToOutputWeights;
638 paramsInfo.m_RecurrentToForgetWeights = &recurrentToForgetWeights;
639 paramsInfo.m_RecurrentToCellWeights = &recurrentToCellWeights;
640 paramsInfo.m_RecurrentToOutputWeights = &recurrentToOutputWeights;
641 paramsInfo.m_ForgetGateBias = &forgetGateBias;
642 paramsInfo.m_CellBias = &cellBias;
643 paramsInfo.m_OutputGateBias = &outputGateBias;
647 TensorInfo optInputToInputWeights;
648 TensorInfo optRecurrentToInputWeights;
649 TensorInfo optCellToInputWeights;
650 TensorInfo optInputGateBias;
651 TensorInfo optProjectionWeights;
652 TensorInfo optProjectionBias;
653 TensorInfo optCellToForgetWeights;
654 TensorInfo optCellToOutputWeights;
655 TensorInfo optInputLayerNormWeights;
656 TensorInfo optForgetLayerNormWeights;
657 TensorInfo optCellLayerNormWeights;
658 TensorInfo optOutputLayerNormWeights;
660 if(!descriptor.m_CifgEnabled)
662 optInputToInputWeights =
663 OverrideDataType(cLayer->m_CifgParameters.m_InputToInputWeights->GetTensorInfo(), dataType);
664 paramsInfo.m_InputToInputWeights = &optInputToInputWeights;
666 optRecurrentToInputWeights =
667 OverrideDataType(cLayer->m_CifgParameters.m_RecurrentToInputWeights->GetTensorInfo(), dataType);
668 paramsInfo.m_RecurrentToInputWeights = &optRecurrentToInputWeights;
670 OverrideDataType(cLayer->m_CifgParameters.m_InputGateBias->GetTensorInfo(), dataType);
671 paramsInfo.m_InputGateBias = &optInputGateBias;
674 if(descriptor.m_ProjectionEnabled)
676 optProjectionWeights =
677 OverrideDataType(cLayer->m_ProjectionParameters.m_ProjectionWeights->GetTensorInfo(), dataType);
678 paramsInfo.m_ProjectionWeights = &optProjectionWeights;
679 if (cLayer->m_ProjectionParameters.m_ProjectionBias !=
nullptr)
682 OverrideDataType(cLayer->m_ProjectionParameters.m_ProjectionBias->GetTensorInfo(), dataType);
683 paramsInfo.m_ProjectionBias = &optProjectionBias;
687 if(descriptor.m_PeepholeEnabled)
689 if(!descriptor.m_CifgEnabled)
691 optCellToInputWeights =
692 OverrideDataType(cLayer->m_PeepholeParameters.m_CellToInputWeights->GetTensorInfo(),
694 paramsInfo.m_CellToInputWeights = &optCellToInputWeights;
696 optCellToForgetWeights =
697 OverrideDataType(cLayer->m_PeepholeParameters.m_CellToForgetWeights->GetTensorInfo(), dataType);
698 paramsInfo.m_CellToForgetWeights = &optCellToForgetWeights;
699 optCellToOutputWeights =
700 OverrideDataType(cLayer->m_PeepholeParameters.m_CellToOutputWeights->GetTensorInfo(), dataType);
701 paramsInfo.m_CellToOutputWeights = &optCellToOutputWeights;
704 if(descriptor.m_LayerNormEnabled)
706 if (!descriptor.m_CifgEnabled)
708 optInputLayerNormWeights = OverrideDataType(
709 cLayer->m_LayerNormParameters.m_InputLayerNormWeights->GetTensorInfo(), dataType);
710 paramsInfo.m_InputLayerNormWeights = &optInputLayerNormWeights;
713 optForgetLayerNormWeights = OverrideDataType(
714 cLayer->m_LayerNormParameters.m_ForgetLayerNormWeights->GetTensorInfo(), dataType);
715 paramsInfo.m_ForgetLayerNormWeights = &optForgetLayerNormWeights;
717 optCellLayerNormWeights = OverrideDataType(
718 cLayer->m_LayerNormParameters.m_CellLayerNormWeights->GetTensorInfo(), dataType);
719 paramsInfo.m_CellLayerNormWeights = &optCellLayerNormWeights;
721 optOutputLayerNormWeights = OverrideDataType(
722 cLayer->m_LayerNormParameters.m_OutputLayerNormWeights->GetTensorInfo(), dataType);
723 paramsInfo.m_OutputLayerNormWeights = &optOutputLayerNormWeights;
726 result = layerSupportObject.IsLstmSupported(
741 const TensorInfo& input0 = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
742 const TensorInfo& input1 = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
743 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
745 result = layerSupportObject.IsMaximumSupported(OverrideDataType(input0, dataType),
746 OverrideDataType(input1, dataType),
747 OverrideDataType(output, dataType),
753 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
754 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
756 result = layerSupportObject.IsMemCopySupported(OverrideDataType(input, dataType),
757 OverrideDataType(output, dataType),
763 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
764 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
766 result = layerSupportObject.IsMemImportSupported(OverrideDataType(input, dataType),
767 OverrideDataType(output, dataType),
773 const TensorInfo& input0 = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
774 const TensorInfo& input1 = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
775 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
777 result = layerSupportObject.IsMergeSupported(OverrideDataType(input0, dataType),
778 OverrideDataType(input1, dataType),
779 OverrideDataType(output, dataType),
785 auto cLayer = PolymorphicDowncast<const ConcatLayer*>(&layer);
788 auto getTensorInfo = [&dataType](
const InputSlot& slot)
790 return OverrideDataType(slot.GetConnectedOutputSlot()->GetTensorInfo(), dataType);
795 std::vector<TensorInfo> inputs(beginI, endI);
797 auto getTensorInfoPtr = [](
const TensorInfo&
info)
804 std::vector<const TensorInfo*> inputPtrs(beginPtr, endPtr);
806 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
808 result = layerSupportObject.IsConcatSupported(inputPtrs, output, cLayer->GetParameters(), reason);
815 const TensorInfo& input0 = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
816 const TensorInfo& input1 = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
817 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
818 result = layerSupportObject.IsMultiplicationSupported(
819 OverrideDataType(input0, dataType),
820 OverrideDataType(input1, dataType),
821 OverrideDataType(output, dataType),
827 auto cLayer = PolymorphicDowncast<const NormalizationLayer*>(&layer);
828 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
829 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
830 result = layerSupportObject.IsNormalizationSupported(OverrideDataType(input, dataType),
831 OverrideDataType(output, dataType),
832 cLayer->GetParameters(),
838 const TensorInfo& output = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
839 result = layerSupportObject.IsOutputSupported(OverrideDataType(output, dataType), reason);
844 auto cLayer = PolymorphicDowncast<const PermuteLayer*>(&layer);
845 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
846 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
847 result = layerSupportObject.IsPermuteSupported(OverrideDataType(input, dataType),
848 OverrideDataType(output, dataType),
849 cLayer->GetParameters(),
855 auto cLayer = PolymorphicDowncast<const PadLayer*>(&layer);
856 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
857 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
858 result = layerSupportObject.IsPadSupported(
859 OverrideDataType(input, dataType),
860 OverrideDataType(output, dataType),
861 cLayer->GetParameters(),
867 auto cLayer = PolymorphicDowncast<const Pooling2dLayer*>(&layer);
868 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
869 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
870 result = layerSupportObject.IsPooling2dSupported(OverrideDataType(input, dataType),
871 OverrideDataType(output, dataType),
872 cLayer->GetParameters(),
878 auto cLayer = PolymorphicDowncast<const Pooling3dLayer*>(&layer);
879 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
880 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
881 result = layerSupportObject.IsPooling3dSupported(OverrideDataType(input, dataType),
882 OverrideDataType(output, dataType),
883 cLayer->GetParameters(),
889 auto cLayer = PolymorphicDowncast<const PreCompiledLayer*>(&layer);
890 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
891 result = layerSupportObject.IsPreCompiledSupported(OverrideDataType(input, dataType),
892 cLayer->GetParameters(),
898 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
899 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
900 result = layerSupportObject.IsQuantizeSupported(input, output, reason);
905 auto cLayer = PolymorphicDowncast<const QLstmLayer*>(&layer);
906 const QLstmDescriptor& descriptor = cLayer->GetParameters();
909 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
910 const TensorInfo& previousOutputIn = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
911 const TensorInfo& previousCellStateIn = layer.GetInputSlot(2).GetConnection()->GetTensorInfo();
914 const TensorInfo& outputStateOut = layer.GetOutputSlot(0).GetTensorInfo();
915 const TensorInfo& cellStateOut = layer.GetOutputSlot(1).GetTensorInfo();
916 const TensorInfo& output = layer.GetOutputSlot(2).GetTensorInfo();
919 LstmInputParamsInfo paramsInfo;
922 ARMNN_ASSERT(cLayer->m_BasicParameters.m_InputToForgetWeights.get() !=
nullptr);
923 ARMNN_ASSERT(cLayer->m_BasicParameters.m_InputToCellWeights.get() !=
nullptr);
924 ARMNN_ASSERT(cLayer->m_BasicParameters.m_InputToOutputWeights.get() !=
nullptr);
925 paramsInfo.m_InputToForgetWeights = &cLayer->m_BasicParameters.m_InputToForgetWeights->GetTensorInfo();
926 paramsInfo.m_InputToCellWeights = &cLayer->m_BasicParameters.m_InputToCellWeights->GetTensorInfo();
927 paramsInfo.m_InputToOutputWeights = &cLayer->m_BasicParameters.m_InputToOutputWeights->GetTensorInfo();
929 paramsInfo.m_RecurrentToForgetWeights =
930 &cLayer->m_BasicParameters.m_RecurrentToForgetWeights->GetTensorInfo();
931 paramsInfo.m_RecurrentToCellWeights =
932 &cLayer->m_BasicParameters.m_RecurrentToCellWeights->GetTensorInfo();
933 paramsInfo.m_RecurrentToOutputWeights =
934 &cLayer->m_BasicParameters.m_RecurrentToOutputWeights->GetTensorInfo();
936 paramsInfo.m_ForgetGateBias = &cLayer->m_BasicParameters.m_ForgetGateBias->GetTensorInfo();
937 paramsInfo.m_CellBias = &cLayer->m_BasicParameters.m_CellBias->GetTensorInfo();
938 paramsInfo.m_OutputGateBias = &cLayer->m_BasicParameters.m_OutputGateBias->GetTensorInfo();
940 if(!descriptor.m_CifgEnabled)
942 paramsInfo.m_InputToInputWeights = &cLayer->m_CifgParameters.m_InputToInputWeights->GetTensorInfo();
943 paramsInfo.m_RecurrentToInputWeights =
944 &cLayer->m_CifgParameters.m_RecurrentToInputWeights->GetTensorInfo();
945 paramsInfo.m_InputGateBias = &cLayer->m_CifgParameters.m_InputGateBias->GetTensorInfo();
948 if(descriptor.m_ProjectionEnabled)
950 paramsInfo.m_ProjectionWeights = &cLayer->m_ProjectionParameters.m_ProjectionWeights->GetTensorInfo();
953 if (cLayer->m_ProjectionParameters.m_ProjectionBias !=
nullptr)
955 paramsInfo.m_ProjectionBias = &cLayer->m_ProjectionParameters.m_ProjectionBias->GetTensorInfo();
959 if(descriptor.m_PeepholeEnabled)
961 if (!descriptor.m_CifgEnabled)
963 paramsInfo.m_CellToInputWeights =
964 &cLayer->m_PeepholeParameters.m_CellToInputWeights->GetTensorInfo();
967 paramsInfo.m_CellToForgetWeights =
968 &cLayer->m_PeepholeParameters.m_CellToForgetWeights->GetTensorInfo();
969 paramsInfo.m_CellToOutputWeights = &cLayer->m_PeepholeParameters.m_CellToOutputWeights->GetTensorInfo();
972 if(descriptor.m_LayerNormEnabled)
974 if (!descriptor.m_CifgEnabled)
976 paramsInfo.m_InputLayerNormWeights =
977 &cLayer->m_LayerNormParameters.m_InputLayerNormWeights->GetTensorInfo();
980 paramsInfo.m_ForgetLayerNormWeights =
981 &cLayer->m_LayerNormParameters.m_ForgetLayerNormWeights->GetTensorInfo();
982 paramsInfo.m_CellLayerNormWeights =
983 &cLayer->m_LayerNormParameters.m_CellLayerNormWeights->GetTensorInfo();
984 paramsInfo.m_OutputLayerNormWeights =
985 &cLayer->m_LayerNormParameters.m_OutputLayerNormWeights->GetTensorInfo();
988 result = layerSupportObject.IsQLstmSupported(input,
1001 auto cLayer = PolymorphicDowncast<const QuantizedLstmLayer*>(&layer);
1004 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1005 const TensorInfo& previousCellStateIn = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
1006 const TensorInfo& previousOutputIn = layer.GetInputSlot(2).GetConnection()->GetTensorInfo();
1009 const TensorInfo& cellStateOut = layer.GetOutputSlot(0).GetTensorInfo();
1010 const TensorInfo& output = layer.GetOutputSlot(1).GetTensorInfo();
1013 QuantizedLstmInputParamsInfo paramsInfo;
1015 paramsInfo.m_InputToInputWeights =
1016 &cLayer->m_QuantizedLstmParameters.m_InputToInputWeights->GetTensorInfo();
1017 paramsInfo.m_InputToForgetWeights =
1018 &cLayer->m_QuantizedLstmParameters.m_InputToForgetWeights->GetTensorInfo();
1019 paramsInfo.m_InputToCellWeights =
1020 &cLayer->m_QuantizedLstmParameters.m_InputToCellWeights->GetTensorInfo();
1021 paramsInfo.m_InputToOutputWeights =
1022 &cLayer->m_QuantizedLstmParameters.m_InputToOutputWeights->GetTensorInfo();
1024 paramsInfo.m_RecurrentToInputWeights =
1025 &cLayer->m_QuantizedLstmParameters.m_RecurrentToInputWeights->GetTensorInfo();
1026 paramsInfo.m_RecurrentToForgetWeights =
1027 &cLayer->m_QuantizedLstmParameters.m_RecurrentToForgetWeights->GetTensorInfo();
1028 paramsInfo.m_RecurrentToCellWeights =
1029 &cLayer->m_QuantizedLstmParameters.m_RecurrentToCellWeights->GetTensorInfo();
1030 paramsInfo.m_RecurrentToOutputWeights =
1031 &cLayer->m_QuantizedLstmParameters.m_RecurrentToOutputWeights->GetTensorInfo();
1033 paramsInfo.m_InputGateBias =
1034 &cLayer->m_QuantizedLstmParameters.m_InputGateBias->GetTensorInfo();
1035 paramsInfo.m_ForgetGateBias =
1036 &cLayer->m_QuantizedLstmParameters.m_ForgetGateBias->GetTensorInfo();
1037 paramsInfo.m_CellBias =
1038 &cLayer->m_QuantizedLstmParameters.m_CellBias->GetTensorInfo();
1039 paramsInfo.m_OutputGateBias =
1040 &cLayer->m_QuantizedLstmParameters.m_OutputGateBias->GetTensorInfo();;
1042 result = layerSupportObject.IsQuantizedLstmSupported(input,
1043 previousCellStateIn,
1053 const TensorInfo& input0 = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1054 const TensorInfo& input1 = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
1055 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1056 result = layerSupportObject.IsDivisionSupported(
1057 OverrideDataType(input0, dataType),
1058 OverrideDataType(input1, dataType),
1059 OverrideDataType(output, dataType),
1065 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1066 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1067 result = layerSupportObject.IsRankSupported(OverrideDataType(input, dataType),
1068 OverrideDataType(output, dataType),
1074 auto cLayer = PolymorphicDowncast<const ReshapeLayer*>(&layer);
1075 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1076 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1077 result = layerSupportObject.IsReshapeSupported(OverrideDataType(input, dataType),
1078 OverrideDataType(output, dataType),
1079 cLayer->GetParameters(),
1085 auto cLayer = PolymorphicDowncast<const ResizeLayer*>(&layer);
1086 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1087 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1088 result = layerSupportObject.IsResizeSupported(OverrideDataType(input, dataType),
1089 OverrideDataType(output, dataType),
1090 cLayer->GetParameters(),
1096 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1097 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1099 result = layerSupportObject.IsShapeSupported(OverrideDataType(input, dataType),
1100 OverrideDataType(output, dataType),
1106 auto cLayer = PolymorphicDowncast<const SliceLayer*>(&layer);
1108 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1109 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1111 result = layerSupportObject.IsSliceSupported(OverrideDataType(input, dataType),
1112 OverrideDataType(output, dataType),
1113 cLayer->GetParameters(),
1119 auto cLayer = PolymorphicDowncast<const SoftmaxLayer*>(&layer);
1120 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1121 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1122 result = layerSupportObject.IsSoftmaxSupported(OverrideDataType(input, dataType),
1123 OverrideDataType(output, dataType),
1124 cLayer->GetParameters(),
1130 auto cLayer = PolymorphicDowncast<const SpaceToBatchNdLayer*>(&layer);
1131 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1132 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1133 result = layerSupportObject.IsSpaceToBatchNdSupported(OverrideDataType(input, dataType),
1134 OverrideDataType(output, dataType),
1135 cLayer->GetParameters(),
1141 auto cLayer = PolymorphicDowncast<const SpaceToDepthLayer*>(&layer);
1143 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1144 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1146 result = layerSupportObject.IsSpaceToDepthSupported(OverrideDataType(input, dataType),
1147 OverrideDataType(output, dataType),
1148 cLayer->GetParameters(),
1154 auto cLayer = PolymorphicDowncast<const SplitterLayer*>(&layer);
1155 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1158 auto getTensorInfo = [&dataType](
const OutputSlot& slot)
1160 return OverrideDataType(slot.GetTensorInfo(), dataType);
1164 std::vector<TensorInfo> outputs(beginI, endI);
1166 const std::vector<std::reference_wrapper<TensorInfo>> outputPtrs(outputs.begin(), outputs.end());
1168 result = layerSupportObject.IsSplitterSupported(OverrideDataType(input, dataType),
1170 cLayer->GetParameters(),
1176 auto cLayer = PolymorphicDowncast<const StackLayer*>(&layer);
1179 auto getTensorInfo = [&dataType](
const InputSlot& slot)
1181 return OverrideDataType(slot.GetConnectedOutputSlot()->GetTensorInfo(), dataType);
1185 std::vector<TensorInfo> inputs(beginI, endI);
1187 auto getTensorInfoPtr = [](
const TensorInfo&
info)
1193 std::vector<const TensorInfo*> inputPtrs(beginPtr, endPtr);
1195 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1197 result = layerSupportObject.IsStackSupported(inputPtrs, output, cLayer->GetParameters(), reason);
1203 auto cLayer = PolymorphicDowncast<const StandInLayer*>(&layer);
1206 auto getTensorInfoIn = [&dataType](
const InputSlot& slot)
1208 return OverrideDataType(slot.GetConnectedOutputSlot()->GetTensorInfo(), dataType);
1210 auto getTensorInfoOut = [&dataType](
const OutputSlot& slot)
1212 return OverrideDataType(slot.GetTensorInfo(), dataType);
1216 std::vector<TensorInfo> inputs(beginI, endI);
1220 std::vector<TensorInfo> outputs(beginO, endO);
1223 auto getTensorInfoPtr = [](
const TensorInfo&
info)
1229 std::vector<const TensorInfo*> inputPtrs(beginPtrI, endPtrI);
1233 std::vector<const TensorInfo*> outputPtrs(beginPtrO, endPtrO);
1236 result = layerSupportObject.IsStandInSupported(inputPtrs,
1238 cLayer->GetParameters(),
1244 auto cLayer = PolymorphicDowncast<const StridedSliceLayer*>(&layer);
1245 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1246 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1247 result = layerSupportObject.IsStridedSliceSupported(OverrideDataType(input, dataType),
1248 OverrideDataType(output, dataType),
1249 cLayer->GetParameters(),
1255 const TensorInfo& input0 = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1256 const TensorInfo& input1 = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
1257 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1258 result = layerSupportObject.IsSubtractionSupported(
1259 OverrideDataType(input0, dataType),
1260 OverrideDataType(input1, dataType),
1261 OverrideDataType(output, dataType),
1267 const TensorInfo& input0 = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1268 const TensorInfo& input1 = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
1269 const TensorInfo& output0 = layer.GetOutputSlot(0).GetTensorInfo();
1270 const TensorInfo& output1 = layer.GetOutputSlot(1).GetTensorInfo();
1271 result = layerSupportObject.IsSwitchSupported(OverrideDataType(input0, dataType),
1272 OverrideDataType(input1, dataType),
1273 OverrideDataType(output0, dataType),
1274 OverrideDataType(output1, dataType),
1280 auto cLayer = PolymorphicDowncast<const MeanLayer*>(&layer);
1281 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1282 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1283 result = layerSupportObject.IsMeanSupported(
1284 OverrideDataType(input, dataType),
1285 OverrideDataType(output, dataType),
1286 cLayer->GetParameters(),
1292 const TensorInfo& input0 = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1293 const TensorInfo& input1 = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
1294 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1295 result = layerSupportObject.IsMinimumSupported(OverrideDataType(input0, dataType),
1296 OverrideDataType(input1, dataType),
1297 OverrideDataType(output, dataType),
1303 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1304 const TensorInfo& alpha = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
1305 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1306 result = layerSupportObject.IsPreluSupported(OverrideDataType(input, dataType),
1307 OverrideDataType(alpha, dataType),
1308 OverrideDataType(output, dataType),
1314 auto cLayer = PolymorphicDowncast<const TransposeLayer*>(&layer);
1315 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1316 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1317 result = layerSupportObject.IsTransposeSupported(OverrideDataType(input, dataType),
1318 OverrideDataType(output, dataType),
1319 cLayer->GetParameters(),
1325 auto cLayer = PolymorphicDowncast<const TransposeConvolution2dLayer*>(&layer);
1327 const TensorInfo input = OverrideDataType(layer.GetInputSlot(0).GetConnection()->GetTensorInfo(),
1329 const TensorInfo output = OverrideDataType(layer.GetOutputSlot(0).GetTensorInfo(), dataType);
1331 const TransposeConvolution2dDescriptor& descriptor = cLayer->GetParameters();
1333 Optional<TensorInfo> biases;
1334 if (descriptor.m_BiasEnabled)
1337 biases = OverrideDataType(cLayer->m_Bias->GetTensorInfo(),
1342 const TensorInfo weights = OverrideDataType(cLayer->m_Weight->GetTensorInfo(), dataType);
1344 result = layerSupportObject.IsTransposeConvolution2dSupported(input,
1355 auto cLayer = PolymorphicDowncast<const ReduceLayer*>(&layer);
1356 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1357 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1359 result = layerSupportObject.IsReduceSupported(OverrideDataType(input, dataType),
1360 OverrideDataType(output, dataType),
1361 cLayer->GetParameters(),
1367 auto cLayer = PolymorphicDowncast<const UnidirectionalSequenceLstmLayer*>(&layer);
1371 const TensorInfo& input = OverrideDataType(layer.GetInputSlot(0).GetConnection()->GetTensorInfo(),
1373 const TensorInfo& outputStateIn = OverrideDataType(layer.GetInputSlot(1).GetConnection()->GetTensorInfo(),
1375 const TensorInfo& cellStateIn = OverrideDataType(layer.GetInputSlot(2).GetConnection()->GetTensorInfo(),
1378 const TensorInfo& outputStateOut = OverrideDataType(layer.GetOutputSlot(0).GetTensorInfo(), dataType);
1379 const TensorInfo& cellStateOut = OverrideDataType(layer.GetOutputSlot(1).GetTensorInfo(), dataType);
1380 const TensorInfo& output = OverrideDataType(layer.GetOutputSlot(2).GetTensorInfo(), dataType);
1383 const TensorInfo& inputToForgetWeights
1384 = OverrideDataType(cLayer->m_BasicParameters.m_InputToForgetWeights->GetTensorInfo(), dataType);
1385 const TensorInfo& inputToCellWeights
1386 = OverrideDataType(cLayer->m_BasicParameters.m_InputToCellWeights->GetTensorInfo(), dataType);
1387 const TensorInfo& inputToOutputWeights
1388 = OverrideDataType(cLayer->m_BasicParameters.m_InputToOutputWeights->GetTensorInfo(), dataType);
1389 const TensorInfo& recurrentToForgetWeights
1390 = OverrideDataType(cLayer->m_BasicParameters.m_RecurrentToForgetWeights->GetTensorInfo(), dataType);
1391 const TensorInfo& recurrentToCellWeights
1392 = OverrideDataType(cLayer->m_BasicParameters.m_RecurrentToCellWeights->GetTensorInfo(), dataType);
1393 const TensorInfo& recurrentToOutputWeights
1394 = OverrideDataType(cLayer->m_BasicParameters.m_RecurrentToOutputWeights->GetTensorInfo(), dataType);
1395 const TensorInfo& forgetGateBias
1396 = OverrideDataType(cLayer->m_BasicParameters.m_ForgetGateBias->GetTensorInfo(), dataType);
1397 const TensorInfo& cellBias
1398 = OverrideDataType(cLayer->m_BasicParameters.m_CellBias->GetTensorInfo(), dataType);
1399 const TensorInfo& outputGateBias
1400 = OverrideDataType(cLayer->m_BasicParameters.m_OutputGateBias->GetTensorInfo(), dataType);
1402 LstmInputParamsInfo paramsInfo;
1404 paramsInfo.m_InputToForgetWeights = &inputToForgetWeights;
1405 paramsInfo.m_InputToCellWeights = &inputToCellWeights;
1406 paramsInfo.m_InputToOutputWeights = &inputToOutputWeights;
1407 paramsInfo.m_RecurrentToForgetWeights = &recurrentToForgetWeights;
1408 paramsInfo.m_RecurrentToCellWeights = &recurrentToCellWeights;
1409 paramsInfo.m_RecurrentToOutputWeights = &recurrentToOutputWeights;
1410 paramsInfo.m_ForgetGateBias = &forgetGateBias;
1411 paramsInfo.m_CellBias = &cellBias;
1412 paramsInfo.m_OutputGateBias = &outputGateBias;
1415 TensorInfo optInputToInputWeights;
1416 TensorInfo optRecurrentToInputWeights;
1417 TensorInfo optCellToInputWeights;
1418 TensorInfo optInputGateBias;
1419 TensorInfo optProjectionWeights;
1420 TensorInfo optProjectionBias;
1421 TensorInfo optCellToForgetWeights;
1422 TensorInfo optCellToOutputWeights;
1423 TensorInfo optInputLayerNormWeights;
1424 TensorInfo optForgetLayerNormWeights;
1425 TensorInfo optCellLayerNormWeights;
1426 TensorInfo optOutputLayerNormWeights;
1428 if(!descriptor.m_CifgEnabled)
1430 optInputToInputWeights =
1431 OverrideDataType(cLayer->m_CifgParameters.m_InputToInputWeights->GetTensorInfo(), dataType);
1432 paramsInfo.m_InputToInputWeights = &optInputToInputWeights;
1434 optRecurrentToInputWeights =
1435 OverrideDataType(cLayer->m_CifgParameters.m_RecurrentToInputWeights->GetTensorInfo(), dataType);
1436 paramsInfo.m_RecurrentToInputWeights = &optRecurrentToInputWeights;
1438 OverrideDataType(cLayer->m_CifgParameters.m_InputGateBias->GetTensorInfo(), dataType);
1439 paramsInfo.m_InputGateBias = &optInputGateBias;
1442 if(descriptor.m_ProjectionEnabled)
1444 optProjectionWeights =
1445 OverrideDataType(cLayer->m_ProjectionParameters.m_ProjectionWeights->GetTensorInfo(), dataType);
1446 paramsInfo.m_ProjectionWeights = &optProjectionWeights;
1447 if (cLayer->m_ProjectionParameters.m_ProjectionBias !=
nullptr)
1450 OverrideDataType(cLayer->m_ProjectionParameters.m_ProjectionBias->GetTensorInfo(), dataType);
1451 paramsInfo.m_ProjectionBias = &optProjectionBias;
1455 if(descriptor.m_PeepholeEnabled)
1457 if(!descriptor.m_CifgEnabled)
1459 optCellToInputWeights =
1460 OverrideDataType(cLayer->m_PeepholeParameters.m_CellToInputWeights->GetTensorInfo(),
1462 paramsInfo.m_CellToInputWeights = &optCellToInputWeights;
1464 optCellToForgetWeights =
1465 OverrideDataType(cLayer->m_PeepholeParameters.m_CellToForgetWeights->GetTensorInfo(), dataType);
1466 paramsInfo.m_CellToForgetWeights = &optCellToForgetWeights;
1467 optCellToOutputWeights =
1468 OverrideDataType(cLayer->m_PeepholeParameters.m_CellToOutputWeights->GetTensorInfo(), dataType);
1469 paramsInfo.m_CellToOutputWeights = &optCellToOutputWeights;
1472 if(descriptor.m_LayerNormEnabled)
1474 if (!descriptor.m_CifgEnabled)
1476 optInputLayerNormWeights = OverrideDataType(
1477 cLayer->m_LayerNormParameters.m_InputLayerNormWeights->GetTensorInfo(), dataType);
1478 paramsInfo.m_InputLayerNormWeights = &optInputLayerNormWeights;
1481 optForgetLayerNormWeights = OverrideDataType(
1482 cLayer->m_LayerNormParameters.m_ForgetLayerNormWeights->GetTensorInfo(), dataType);
1483 paramsInfo.m_ForgetLayerNormWeights = &optForgetLayerNormWeights;
1485 optCellLayerNormWeights = OverrideDataType(
1486 cLayer->m_LayerNormParameters.m_CellLayerNormWeights->GetTensorInfo(), dataType);
1487 paramsInfo.m_CellLayerNormWeights = &optCellLayerNormWeights;
1489 optOutputLayerNormWeights = OverrideDataType(
1490 cLayer->m_LayerNormParameters.m_OutputLayerNormWeights->GetTensorInfo(), dataType);
1491 paramsInfo.m_OutputLayerNormWeights = &optOutputLayerNormWeights;
1494 result = layerSupportObject.IsUnidirectionalSequenceLstmSupported(input,
1507 ARMNN_ASSERT_MSG(
false,
"WorkloadFactory did not recognise type of layer.");
1508 reason.value() =
"Unrecognised layer type";
1519 std::string& outReasonIfUnsupported)
1521 return IsLayerConfigurationSupported(backendId, connectableLayer, dataType, outReasonIfUnsupported);
1526 std::string& outReasonIfUnsupported)
1528 auto layer = PolymorphicDowncast<const Layer*>(&connectableLayer);
1529 return IsLayerConfigurationSupported(layer->GetBackendId(), connectableLayer, dataType, outReasonIfUnsupported);
1535 std::string& outReasonIfUnsupported,
1538 auto layer = PolymorphicDowncast<const Layer*>(&connectableLayer);
1539 return IsLayerConfigurationSupported(layer->GetBackendId(),
1542 outReasonIfUnsupported,
1549 std::string& outReasonIfUnsupported,
1552 return IsLayerConfigurationSupported(backendId,
1555 outReasonIfUnsupported,
1567 auto activationQueueDescriptor = PolymorphicDowncast<const ActivationQueueDescriptor*>(&descriptor);
1568 return CreateActivation(*activationQueueDescriptor, info);
1572 auto additionQueueDescriptor = PolymorphicDowncast<const AdditionQueueDescriptor*>(&descriptor);
1573 return CreateAddition(*additionQueueDescriptor, info);
1577 auto argMinMaxQueueDescriptor = PolymorphicDowncast<const ArgMinMaxQueueDescriptor*>(&descriptor);
1578 return CreateArgMinMax(*argMinMaxQueueDescriptor, info);
1582 auto batchNormQueueDescriptor = PolymorphicDowncast<const BatchNormalizationQueueDescriptor*>(&descriptor);
1583 return CreateBatchNormalization(*batchNormQueueDescriptor, info);
1587 auto batchToSpaceNdQueueDescriptor
1588 = PolymorphicDowncast<const BatchToSpaceNdQueueDescriptor*>(&descriptor);
1589 return CreateBatchToSpaceNd(*batchToSpaceNdQueueDescriptor, info);
1593 auto castQueueDescriptor = PolymorphicDowncast<const CastQueueDescriptor*>(&descriptor);
1594 return CreateCast(*castQueueDescriptor, info);
1598 auto channelShuffleQueueDescriptor
1599 = PolymorphicDowncast<const ChannelShuffleQueueDescriptor*>(&descriptor);
1600 return CreateChannelShuffle(*channelShuffleQueueDescriptor, info);
1604 auto comparisonQueueDescriptor = PolymorphicDowncast<const ComparisonQueueDescriptor*>(&descriptor);
1605 return CreateComparison(*comparisonQueueDescriptor, info);
1609 auto concatQueueDescriptor = PolymorphicDowncast<const ConcatQueueDescriptor*>(&descriptor);
1610 return CreateConcat(*concatQueueDescriptor, info);
1614 auto constantQueueDescriptor = PolymorphicDowncast<const ConstantQueueDescriptor*>(&descriptor);
1615 return CreateConstant(*constantQueueDescriptor, info);
1619 auto convertBf16ToFp32QueueDescriptor
1620 = PolymorphicDowncast<const ConvertBf16ToFp32QueueDescriptor*>(&descriptor);
1621 return CreateConvertBf16ToFp32(*convertBf16ToFp32QueueDescriptor, info);
1625 auto convertFp16ToFp32QueueDescriptor
1626 = PolymorphicDowncast<const ConvertFp16ToFp32QueueDescriptor*>(&descriptor);
1627 return CreateConvertFp16ToFp32(*convertFp16ToFp32QueueDescriptor, info);
1631 auto convertFp32ToBf16QueueDescriptor
1632 = PolymorphicDowncast<const ConvertFp32ToBf16QueueDescriptor*>(&descriptor);
1633 return CreateConvertFp32ToBf16(*convertFp32ToBf16QueueDescriptor, info);
1637 auto convertFp32ToFp16QueueDescriptor
1638 = PolymorphicDowncast<const ConvertFp32ToFp16QueueDescriptor*>(&descriptor);
1639 return CreateConvertFp32ToFp16(*convertFp32ToFp16QueueDescriptor, info);
1643 auto convolution2dQueueDescriptor = PolymorphicDowncast<const Convolution2dQueueDescriptor*>(&descriptor);
1644 return CreateConvolution2d(*convolution2dQueueDescriptor, info);
1648 auto convolution3dQueueDescriptor = PolymorphicDowncast<const Convolution3dQueueDescriptor*>(&descriptor);
1649 return CreateConvolution3d(*convolution3dQueueDescriptor, info);
1653 auto debugQueueDescriptor = PolymorphicDowncast<const DebugQueueDescriptor*>(&descriptor);
1654 return CreateDebug(*debugQueueDescriptor, info);
1658 auto depthToSpaceQueueDescriptor = PolymorphicDowncast<const DepthToSpaceQueueDescriptor*>(&descriptor);
1659 return CreateDepthToSpace(*depthToSpaceQueueDescriptor, info);
1663 auto depthwiseConvolution2DQueueDescriptor
1664 = PolymorphicDowncast<const DepthwiseConvolution2dQueueDescriptor*>(&descriptor);
1665 return CreateDepthwiseConvolution2d(*depthwiseConvolution2DQueueDescriptor, info);
1669 auto dequantizeQueueDescriptor = PolymorphicDowncast<const DequantizeQueueDescriptor*>(&descriptor);
1670 return CreateDequantize(*dequantizeQueueDescriptor, info);
1674 auto detectionPostProcessQueueDescriptor
1675 = PolymorphicDowncast<const DetectionPostProcessQueueDescriptor*>(&descriptor);
1676 return CreateDetectionPostProcess(*detectionPostProcessQueueDescriptor, info);
1680 auto divisionQueueDescriptor = PolymorphicDowncast<const DivisionQueueDescriptor*>(&descriptor);
1681 return CreateDivision(*divisionQueueDescriptor, info);
1685 auto elementwiseUnaryQueueDescriptor
1686 = PolymorphicDowncast<const ElementwiseUnaryQueueDescriptor*>(&descriptor);
1687 return CreateElementwiseUnary(*elementwiseUnaryQueueDescriptor, info);
1692 auto fakeQuantizationQueueDescriptor
1693 = PolymorphicDowncast<const FakeQuantizationQueueDescriptor*>(&descriptor);
1694 return CreateFakeQuantization(*fakeQuantizationQueueDescriptor, info);
1698 auto fillQueueDescriptor = PolymorphicDowncast<const FillQueueDescriptor*>(&descriptor);
1699 return CreateFill(*fillQueueDescriptor, info);
1703 auto floorQueueDescriptor = PolymorphicDowncast<const FloorQueueDescriptor*>(&descriptor);
1704 return CreateFloor(*floorQueueDescriptor, info);
1708 auto fullyConnectedQueueDescriptor
1709 = PolymorphicDowncast<const FullyConnectedQueueDescriptor*>(&descriptor);
1710 return CreateFullyConnected(*fullyConnectedQueueDescriptor, info);
1714 auto gatherQueueDescriptor = PolymorphicDowncast<const GatherQueueDescriptor*>(&descriptor);
1715 return CreateGather(*gatherQueueDescriptor, info);
1719 auto inputQueueDescriptor = PolymorphicDowncast<const InputQueueDescriptor*>(&descriptor);
1724 auto instanceNormalizationQueueDescriptor
1725 = PolymorphicDowncast<const InstanceNormalizationQueueDescriptor*>(&descriptor);
1726 return CreateInstanceNormalization(*instanceNormalizationQueueDescriptor, info);
1730 auto l2NormalizationQueueDescriptor
1731 = PolymorphicDowncast<const L2NormalizationQueueDescriptor*>(&descriptor);
1732 return CreateL2Normalization(*l2NormalizationQueueDescriptor, info);
1736 auto logicalBinaryQueueDescriptor = PolymorphicDowncast<const LogicalBinaryQueueDescriptor*>(&descriptor);
1737 return CreateLogicalBinary(*logicalBinaryQueueDescriptor, info);
1741 auto logSoftmaxQueueDescriptor = PolymorphicDowncast<const LogSoftmaxQueueDescriptor*>(&descriptor);
1742 return CreateLogSoftmax(*logSoftmaxQueueDescriptor, info);
1746 auto lstmQueueDescriptor = PolymorphicDowncast<const LstmQueueDescriptor*>(&descriptor);
1747 return CreateLstm(*lstmQueueDescriptor, info);
1751 auto maximumQueueDescriptor = PolymorphicDowncast<const MaximumQueueDescriptor*>(&descriptor);
1752 return CreateMaximum(*maximumQueueDescriptor, info);
1756 auto meanQueueDescriptor = PolymorphicDowncast<const MeanQueueDescriptor*>(&descriptor);
1757 return CreateMean(*meanQueueDescriptor, info);
1761 auto memCopyQueueDescriptor = PolymorphicDowncast<const MemCopyQueueDescriptor*>(&descriptor);
1762 return CreateMemCopy(*memCopyQueueDescriptor, info);
1766 auto memImportQueueDescriptor = PolymorphicDowncast<const MemImportQueueDescriptor*>(&descriptor);
1767 return CreateMemImport(*memImportQueueDescriptor, info);
1771 auto minimumQueueDescriptor = PolymorphicDowncast<const MinimumQueueDescriptor*>(&descriptor);
1772 return CreateMinimum(*minimumQueueDescriptor, info);
1776 auto multiplicationQueueDescriptor
1777 = PolymorphicDowncast<const MultiplicationQueueDescriptor*>(&descriptor);
1778 return CreateMultiplication(*multiplicationQueueDescriptor, info);
1782 auto normalizationQueueDescriptor = PolymorphicDowncast<const NormalizationQueueDescriptor*>(&descriptor);
1783 return CreateNormalization(*normalizationQueueDescriptor, info);
1787 auto outputQueueDescriptor = PolymorphicDowncast<const OutputQueueDescriptor*>(&descriptor);
1788 return CreateOutput(*outputQueueDescriptor, info);
1792 auto padQueueDescriptor = PolymorphicDowncast<const PadQueueDescriptor*>(&descriptor);
1793 return CreatePad(*padQueueDescriptor, info);
1797 auto permuteQueueDescriptor = PolymorphicDowncast<const PermuteQueueDescriptor*>(&descriptor);
1798 return CreatePermute(*permuteQueueDescriptor, info);
1802 auto pooling2dQueueDescriptor = PolymorphicDowncast<const Pooling2dQueueDescriptor*>(&descriptor);
1803 return CreatePooling2d(*pooling2dQueueDescriptor, info);
1807 auto pooling3dQueueDescriptor = PolymorphicDowncast<const Pooling3dQueueDescriptor*>(&descriptor);
1808 return CreatePooling3d(*pooling3dQueueDescriptor, info);
1812 auto preCompiledQueueDescriptor = PolymorphicDowncast<const PreCompiledQueueDescriptor*>(&descriptor);
1813 return CreatePreCompiled(*preCompiledQueueDescriptor, info);
1817 auto preluQueueDescriptor = PolymorphicDowncast<const PreluQueueDescriptor*>(&descriptor);
1818 return CreatePrelu(*preluQueueDescriptor, info);
1822 auto qlstmQueueDescriptor = PolymorphicDowncast<const QLstmQueueDescriptor*>(&descriptor);
1823 return CreateQLstm(*qlstmQueueDescriptor, info);
1827 auto quantizeQueueDescriptor = PolymorphicDowncast<const QuantizeQueueDescriptor*>(&descriptor);
1828 return CreateQuantize(*quantizeQueueDescriptor, info);
1832 auto rankQueueDescriptor = PolymorphicDowncast<const RankQueueDescriptor*>(&descriptor);
1833 return CreateRank(*rankQueueDescriptor, info);
1837 auto reduceQueueDescriptor = PolymorphicDowncast<const ReduceQueueDescriptor*>(&descriptor);
1838 return CreateReduce(*reduceQueueDescriptor, info);
1842 auto reshapeQueueDescriptor = PolymorphicDowncast<const ReshapeQueueDescriptor*>(&descriptor);
1843 return CreateReshape(*reshapeQueueDescriptor, info);
1847 auto resizeQueueDescriptor = PolymorphicDowncast<const ResizeQueueDescriptor*>(&descriptor);
1848 return CreateResize(*resizeQueueDescriptor, info);
1852 auto shapeQueueDescriptor = PolymorphicDowncast<const ShapeQueueDescriptor*>(&descriptor);
1853 return CreateShape(*shapeQueueDescriptor, info);
1857 auto sliceQueueDescriptor = PolymorphicDowncast<const SliceQueueDescriptor*>(&descriptor);
1858 return CreateSlice(*sliceQueueDescriptor, info);
1862 auto softmaxQueueDescriptor = PolymorphicDowncast<const SoftmaxQueueDescriptor*>(&descriptor);
1863 return CreateSoftmax(*softmaxQueueDescriptor, info);
1867 auto spaceToBatchNdQueueDescriptor
1868 = PolymorphicDowncast<const SpaceToBatchNdQueueDescriptor*>(&descriptor);
1869 return CreateSpaceToBatchNd(*spaceToBatchNdQueueDescriptor, info);
1873 auto spaceToDepthQueueDescriptor = PolymorphicDowncast<const SpaceToDepthQueueDescriptor*>(&descriptor);
1874 return CreateSpaceToDepth(*spaceToDepthQueueDescriptor, info);
1878 auto splitterQueueDescriptor = PolymorphicDowncast<const SplitterQueueDescriptor*>(&descriptor);
1879 return CreateSplitter(*splitterQueueDescriptor, info);
1883 auto stackQueueDescriptor = PolymorphicDowncast<const StackQueueDescriptor*>(&descriptor);
1884 return CreateStack(*stackQueueDescriptor, info);
1888 auto stridedSliceQueueDescriptor = PolymorphicDowncast<const StridedSliceQueueDescriptor*>(&descriptor);
1889 return CreateStridedSlice(*stridedSliceQueueDescriptor, info);
1893 auto subtractionQueueDescriptor = PolymorphicDowncast<const SubtractionQueueDescriptor*>(&descriptor);
1894 return CreateSubtraction(*subtractionQueueDescriptor, info);
1898 auto transposeQueueDescriptor = PolymorphicDowncast<const TransposeQueueDescriptor*>(&descriptor);
1899 return CreateTranspose(*transposeQueueDescriptor, info);
1903 auto transposeConvolution2dQueueDescriptor
1904 = PolymorphicDowncast<const TransposeConvolution2dQueueDescriptor*>(&descriptor);
1905 return CreateTransposeConvolution2d(*transposeConvolution2dQueueDescriptor, info);
1909 auto unidirectionalSequenceLstmQueueDescriptor
1910 = PolymorphicDowncast<const UnidirectionalSequenceLstmQueueDescriptor*>(&descriptor);
1911 return CreateUnidirectionalSequenceLstm(*unidirectionalSequenceLstmQueueDescriptor, info);
1922 return std::unique_ptr<IWorkload>();
1928 return std::unique_ptr<IWorkload>();
1934 return std::unique_ptr<IWorkload>();
1937 std::unique_ptr<IWorkload> IWorkloadFactory::CreateBatchNormalization(
1940 return std::unique_ptr<IWorkload>();
1946 return std::unique_ptr<IWorkload>();
1952 return std::unique_ptr<IWorkload>();
1958 return std::unique_ptr<IWorkload>();
1964 return std::unique_ptr<IWorkload>();
1970 return std::unique_ptr<IWorkload>();
1976 return std::unique_ptr<IWorkload>();
1982 return std::unique_ptr<IWorkload>();
1988 return std::unique_ptr<IWorkload>();
1994 return std::unique_ptr<IWorkload>();
2000 return std::unique_ptr<IWorkload>();
2006 return std::unique_ptr<IWorkload>();
2012 return std::unique_ptr<IWorkload>();
2018 return std::unique_ptr<IWorkload>();
2024 return std::unique_ptr<IWorkload>();
2027 std::unique_ptr<IWorkload> IWorkloadFactory::CreateDepthwiseConvolution2d(
2030 return std::unique_ptr<IWorkload>();
2033 std::unique_ptr<IWorkload> IWorkloadFactory::CreateDequantize(
2036 return std::unique_ptr<IWorkload>();
2039 std::unique_ptr<IWorkload> IWorkloadFactory::CreateDetectionPostProcess(
2042 return std::unique_ptr<IWorkload>();
2048 return std::unique_ptr<IWorkload>();
2054 return std::unique_ptr<IWorkload>();
2060 return std::unique_ptr<IWorkload>();
2066 return std::unique_ptr<IWorkload>();
2072 return std::unique_ptr<IWorkload>();
2078 return std::unique_ptr<IWorkload>();
2084 return std::unique_ptr<IWorkload>();
2087 std::unique_ptr<IWorkload> IWorkloadFactory::CreateInstanceNormalization(
2091 return std::unique_ptr<IWorkload>();
2097 return std::unique_ptr<IWorkload>();
2103 return std::unique_ptr<IWorkload>();
2109 return std::unique_ptr<IWorkload>();
2115 return std::unique_ptr<IWorkload>();
2121 return std::unique_ptr<IWorkload>();
2127 return std::unique_ptr<IWorkload>();
2133 return std::unique_ptr<IWorkload>();
2139 return std::unique_ptr<IWorkload>();
2145 return std::unique_ptr<IWorkload>();
2151 return std::unique_ptr<IWorkload>();
2157 return std::unique_ptr<IWorkload>();
2163 return std::unique_ptr<IWorkload>();
2169 return std::unique_ptr<IWorkload>();
2175 return std::unique_ptr<IWorkload>();
2181 return std::unique_ptr<IWorkload>();
2187 return std::unique_ptr<IWorkload>();
2193 return std::unique_ptr<IWorkload>();
2199 return std::unique_ptr<IWorkload>();
2205 return std::unique_ptr<IWorkload>();
2211 return std::unique_ptr<IWorkload>();
2217 return std::unique_ptr<IWorkload>();
2223 return std::unique_ptr<IWorkload>();
2229 return std::unique_ptr<IWorkload>();
2234 return std::unique_ptr<IWorkload>();
2240 return std::unique_ptr<IWorkload>();
2246 return std::unique_ptr<IWorkload>();
2252 return std::unique_ptr<IWorkload>();
2258 return std::unique_ptr<IWorkload>();
2264 return std::unique_ptr<IWorkload>();
2270 return std::unique_ptr<IWorkload>();
2276 return std::unique_ptr<IWorkload>();
2282 return std::unique_ptr<IWorkload>();
2288 return std::unique_ptr<IWorkload>();
2294 return std::unique_ptr<IWorkload>();
2300 return std::unique_ptr<IWorkload>();
2306 return std::unique_ptr<IWorkload>();
2312 return std::unique_ptr<IWorkload>();
2318 return std::unique_ptr<IWorkload>();
2321 std::unique_ptr<IWorkload> IWorkloadFactory::CreateTransposeConvolution2d(
2325 return std::unique_ptr<IWorkload>();
2328 std::unique_ptr<IWorkload> IWorkloadFactory::CreateUnidirectionalSequenceLstm(
2332 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...