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);
251 const Convolution2dDescriptor& descriptor = cLayer->GetParameters();
254 Optional<TensorInfo> biases;
255 if (descriptor.m_BiasEnabled)
260 result = layerSupportObject.IsConvolution2dSupported(
264 OverrideDataType(cLayer->m_Weight->GetTensorInfo(), dataType),
271 auto cLayer = PolymorphicDowncast<const Convolution3dLayer*>(&layer);
273 const TensorInfo input = OverrideDataType(layer.GetInputSlot(0).GetConnection()->GetTensorInfo(),
275 const TensorInfo output = OverrideDataType(layer.GetOutputSlot(0).GetTensorInfo(), dataType);
278 "Convolution3dLayer: Weights should be connected as a Constant Layer.");
279 const TensorInfo weights = OverrideDataType(layer.GetInputSlot(1).GetConnection()->GetTensorInfo(),
282 const Convolution3dDescriptor& descriptor = cLayer->GetParameters();
285 Optional<TensorInfo> biases;
286 if (descriptor.m_BiasEnabled)
288 biases = OverrideDataType(layer.GetInputSlot(2).GetConnection()->GetTensorInfo(),
292 result = layerSupportObject.IsConvolution3dSupported(
303 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
304 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
306 result = layerSupportObject.IsDebugSupported(OverrideDataType(input, dataType),
307 OverrideDataType(output, dataType),
313 auto cLayer = PolymorphicDowncast<const DepthToSpaceLayer*>(&layer);
315 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
316 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
318 result = layerSupportObject.IsDepthToSpaceSupported(OverrideDataType(input, dataType),
319 OverrideDataType(output, dataType),
320 cLayer->GetParameters(),
326 auto cLayer = PolymorphicDowncast<const DepthwiseConvolution2dLayer*>(&layer);
327 const TensorInfo& input = OverrideDataType(layer.GetInputSlot(0).GetConnection()->GetTensorInfo(),
329 const TensorInfo& output = OverrideDataType(layer.GetOutputSlot(0).GetTensorInfo(), dataType);
332 const DepthwiseConvolution2dDescriptor& descriptor = cLayer->GetParameters();
335 Optional<TensorInfo> biases;
336 if (descriptor.m_BiasEnabled)
342 result = layerSupportObject.IsDepthwiseConvolutionSupported(
346 OverrideDataType(cLayer->m_Weight->GetTensorInfo(), dataType),
353 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
354 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
356 result = layerSupportObject.IsDequantizeSupported(input,
357 OverrideDataType(output, dataType),
363 auto cLayer = PolymorphicDowncast<const DetectionPostProcessLayer*>(&layer);
364 const TensorInfo& boxEncodings = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
365 const TensorInfo& scores = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
366 const TensorInfo& anchors = cLayer->m_Anchors->GetTensorInfo();
368 const TensorInfo& detectionBoxes = layer.GetOutputSlot(0).GetTensorInfo();
369 const TensorInfo& detectionClasses = layer.GetOutputSlot(1).GetTensorInfo();
370 const TensorInfo& detectionScores = layer.GetOutputSlot(2).GetTensorInfo();
371 const TensorInfo& numDetections = layer.GetOutputSlot(3).GetTensorInfo();
373 const DetectionPostProcessDescriptor& descriptor = cLayer->GetParameters();
374 result = layerSupportObject.IsDetectionPostProcessSupported(boxEncodings,
387 auto cLayer = PolymorphicDowncast<const ElementwiseUnaryLayer*>(&layer);
389 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
390 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
392 result = layerSupportObject.IsElementwiseUnarySupported(OverrideDataType(input, dataType),
393 OverrideDataType(output, dataType),
394 cLayer->GetParameters(),
400 auto cLayer = PolymorphicDowncast<const FillLayer*>(&layer);
401 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
402 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
403 const FillDescriptor& descriptor = cLayer->GetParameters();
405 result = layerSupportObject.IsFillSupported(
406 OverrideDataType(input, dataType),
407 OverrideDataType(output, dataType),
414 auto cLayer = PolymorphicDowncast<const FakeQuantizationLayer*>(&layer);
415 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
416 result = layerSupportObject.IsFakeQuantizationSupported(OverrideDataType(input, dataType),
417 cLayer->GetParameters(),
423 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
424 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
425 result = layerSupportObject.IsFloorSupported(OverrideDataType(input, dataType),
426 OverrideDataType(output, dataType),
432 auto cLayer = PolymorphicDowncast<const FullyConnectedLayer*>(&layer);
433 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
434 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
436 const FullyConnectedDescriptor& descriptor = cLayer->GetParameters();
437 TensorInfo weightsInfo;
438 const TensorInfo* weightsInfoPtr =
nullptr;
440 weightsInfo = OverrideDataType(layer.GetInputSlot(1).GetConnection()->GetTensorInfo(), dataType);
441 weightsInfoPtr = &weightsInfo;
444 const TensorInfo* biasInfoPtr =
nullptr;
445 static const TensorInfo dummyBFloat16Bias(TensorShape({1,1,1,1}),
DataType::BFloat16);
446 static const TensorInfo dummyFloat16Bias(TensorShape({1,1,1,1}),
DataType::Float16);
447 static const TensorInfo dummyFloat32Bias(TensorShape({1,1,1,1}),
DataType::Float32);
450 if (descriptor.m_BiasEnabled)
452 biasInfo = OverrideDataType(layer.GetInputSlot(2).GetConnection()->GetTensorInfo(), dataType);
453 biasInfoPtr = &biasInfo;
458 switch(input.GetDataType())
462 biasInfoPtr = &dummyBFloat16Bias;
467 biasInfoPtr = &dummyFloat16Bias;
472 biasInfoPtr = &dummyFloat32Bias;
480 biasInfoPtr = &dummyQA8Bias;
489 result = layerSupportObject.IsFullyConnectedSupported(
490 OverrideDataType(input, dataType),
491 OverrideDataType(output, dataType),
500 const TensorInfo& input0 = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
501 const TensorInfo& input1 = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
502 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
503 auto cLayer = PolymorphicDowncast<const GatherLayer*>(&layer);
504 const GatherDescriptor& descriptor = cLayer->GetParameters();
505 result = layerSupportObject.IsGatherSupported(OverrideDataType(input0, dataType),
507 OverrideDataType(output, dataType),
514 const TensorInfo& input = layer.GetOutputSlot(0).GetTensorInfo();
515 result = layerSupportObject.IsInputSupported(OverrideDataType(input, dataType), reason);
520 auto cLayer = PolymorphicDowncast<const InstanceNormalizationLayer*>(&layer);
521 const InstanceNormalizationDescriptor& descriptor = cLayer->GetParameters();
523 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
524 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
526 result = layerSupportObject.IsInstanceNormalizationSupported(
527 OverrideDataType(input, dataType),
528 OverrideDataType(output, dataType),
535 auto cLayer = PolymorphicDowncast<const L2NormalizationLayer*>(&layer);
536 const L2NormalizationDescriptor& descriptor = cLayer->GetParameters();
538 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
539 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
541 result = layerSupportObject.IsL2NormalizationSupported(
542 OverrideDataType(input, dataType),
543 OverrideDataType(output, dataType),
550 auto cLayer = PolymorphicDowncast<const LogicalBinaryLayer*>(&layer);
552 const TensorInfo& input0 = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
553 const TensorInfo& input1 = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
554 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
556 result = layerSupportObject.IsLogicalBinarySupported(input0,
559 cLayer->GetParameters(),
565 auto cLayer = PolymorphicDowncast<const LogSoftmaxLayer*>(&layer);
567 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
568 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
570 result = layerSupportObject.IsLogSoftmaxSupported(OverrideDataType(input, dataType),
571 OverrideDataType(output, dataType),
572 cLayer->GetParameters(),
578 auto cLayer = PolymorphicDowncast<const LstmLayer*>(&layer);
579 const LstmDescriptor& descriptor = cLayer->GetParameters();
582 const TensorInfo& input = OverrideDataType(layer.GetInputSlot(0).GetConnection()->GetTensorInfo(),
584 const TensorInfo& outputStateIn = OverrideDataType(layer.GetInputSlot(1).GetConnection()->GetTensorInfo(),
586 const TensorInfo& cellStateIn = OverrideDataType(layer.GetInputSlot(2).GetConnection()->GetTensorInfo(),
589 const TensorInfo& scratchBuffer = OverrideDataType(layer.GetOutputSlot(0).GetTensorInfo(), dataType);
590 const TensorInfo& outputStateOut = OverrideDataType(layer.GetOutputSlot(1).GetTensorInfo(), dataType);
591 const TensorInfo& cellStateOut = OverrideDataType(layer.GetOutputSlot(2).GetTensorInfo(), dataType);
592 const TensorInfo& output = OverrideDataType(layer.GetOutputSlot(3).GetTensorInfo(), dataType);
595 const TensorInfo& inputToForgetWeights
596 = OverrideDataType(cLayer->m_BasicParameters.m_InputToForgetWeights->GetTensorInfo(), dataType);
597 const TensorInfo& inputToCellWeights
598 = OverrideDataType(cLayer->m_BasicParameters.m_InputToCellWeights->GetTensorInfo(), dataType);
599 const TensorInfo& inputToOutputWeights
600 = OverrideDataType(cLayer->m_BasicParameters.m_InputToOutputWeights->GetTensorInfo(), dataType);
601 const TensorInfo& recurrentToForgetWeights
602 = OverrideDataType(cLayer->m_BasicParameters.m_RecurrentToForgetWeights->GetTensorInfo(), dataType);
603 const TensorInfo& recurrentToCellWeights
604 = OverrideDataType(cLayer->m_BasicParameters.m_RecurrentToCellWeights->GetTensorInfo(), dataType);
605 const TensorInfo& recurrentToOutputWeights
606 = OverrideDataType(cLayer->m_BasicParameters.m_RecurrentToOutputWeights->GetTensorInfo(), dataType);
607 const TensorInfo& forgetGateBias
608 = OverrideDataType(cLayer->m_BasicParameters.m_ForgetGateBias->GetTensorInfo(), dataType);
609 const TensorInfo& cellBias
610 = OverrideDataType(cLayer->m_BasicParameters.m_CellBias->GetTensorInfo(), dataType);
611 const TensorInfo& outputGateBias
612 = OverrideDataType(cLayer->m_BasicParameters.m_OutputGateBias->GetTensorInfo(), dataType);
614 LstmInputParamsInfo paramsInfo;
616 paramsInfo.m_InputToForgetWeights = &inputToForgetWeights;
617 paramsInfo.m_InputToCellWeights = &inputToCellWeights;
618 paramsInfo.m_InputToOutputWeights = &inputToOutputWeights;
619 paramsInfo.m_RecurrentToForgetWeights = &recurrentToForgetWeights;
620 paramsInfo.m_RecurrentToCellWeights = &recurrentToCellWeights;
621 paramsInfo.m_RecurrentToOutputWeights = &recurrentToOutputWeights;
622 paramsInfo.m_ForgetGateBias = &forgetGateBias;
623 paramsInfo.m_CellBias = &cellBias;
624 paramsInfo.m_OutputGateBias = &outputGateBias;
628 TensorInfo optInputToInputWeights;
629 TensorInfo optRecurrentToInputWeights;
630 TensorInfo optCellToInputWeights;
631 TensorInfo optInputGateBias;
632 TensorInfo optProjectionWeights;
633 TensorInfo optProjectionBias;
634 TensorInfo optCellToForgetWeights;
635 TensorInfo optCellToOutputWeights;
636 TensorInfo optInputLayerNormWeights;
637 TensorInfo optForgetLayerNormWeights;
638 TensorInfo optCellLayerNormWeights;
639 TensorInfo optOutputLayerNormWeights;
641 if(!descriptor.m_CifgEnabled)
643 optInputToInputWeights =
644 OverrideDataType(cLayer->m_CifgParameters.m_InputToInputWeights->GetTensorInfo(), dataType);
645 paramsInfo.m_InputToInputWeights = &optInputToInputWeights;
647 optRecurrentToInputWeights =
648 OverrideDataType(cLayer->m_CifgParameters.m_RecurrentToInputWeights->GetTensorInfo(), dataType);
649 paramsInfo.m_RecurrentToInputWeights = &optRecurrentToInputWeights;
651 OverrideDataType(cLayer->m_CifgParameters.m_InputGateBias->GetTensorInfo(), dataType);
652 paramsInfo.m_InputGateBias = &optInputGateBias;
655 if(descriptor.m_ProjectionEnabled)
657 optProjectionWeights =
658 OverrideDataType(cLayer->m_ProjectionParameters.m_ProjectionWeights->GetTensorInfo(), dataType);
659 paramsInfo.m_ProjectionWeights = &optProjectionWeights;
660 if (cLayer->m_ProjectionParameters.m_ProjectionBias !=
nullptr)
663 OverrideDataType(cLayer->m_ProjectionParameters.m_ProjectionBias->GetTensorInfo(), dataType);
664 paramsInfo.m_ProjectionBias = &optProjectionBias;
668 if(descriptor.m_PeepholeEnabled)
670 if(!descriptor.m_CifgEnabled)
672 optCellToInputWeights =
673 OverrideDataType(cLayer->m_PeepholeParameters.m_CellToInputWeights->GetTensorInfo(),
675 paramsInfo.m_CellToInputWeights = &optCellToInputWeights;
677 optCellToForgetWeights =
678 OverrideDataType(cLayer->m_PeepholeParameters.m_CellToForgetWeights->GetTensorInfo(), dataType);
679 paramsInfo.m_CellToForgetWeights = &optCellToForgetWeights;
680 optCellToOutputWeights =
681 OverrideDataType(cLayer->m_PeepholeParameters.m_CellToOutputWeights->GetTensorInfo(), dataType);
682 paramsInfo.m_CellToOutputWeights = &optCellToOutputWeights;
685 if(descriptor.m_LayerNormEnabled)
687 if (!descriptor.m_CifgEnabled)
689 optInputLayerNormWeights = OverrideDataType(
690 cLayer->m_LayerNormParameters.m_InputLayerNormWeights->GetTensorInfo(), dataType);
691 paramsInfo.m_InputLayerNormWeights = &optInputLayerNormWeights;
694 optForgetLayerNormWeights = OverrideDataType(
695 cLayer->m_LayerNormParameters.m_ForgetLayerNormWeights->GetTensorInfo(), dataType);
696 paramsInfo.m_ForgetLayerNormWeights = &optForgetLayerNormWeights;
698 optCellLayerNormWeights = OverrideDataType(
699 cLayer->m_LayerNormParameters.m_CellLayerNormWeights->GetTensorInfo(), dataType);
700 paramsInfo.m_CellLayerNormWeights = &optCellLayerNormWeights;
702 optOutputLayerNormWeights = OverrideDataType(
703 cLayer->m_LayerNormParameters.m_OutputLayerNormWeights->GetTensorInfo(), dataType);
704 paramsInfo.m_OutputLayerNormWeights = &optOutputLayerNormWeights;
707 result = layerSupportObject.IsLstmSupported(
722 const TensorInfo& input0 = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
723 const TensorInfo& input1 = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
724 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
726 result = layerSupportObject.IsMaximumSupported(OverrideDataType(input0, dataType),
727 OverrideDataType(input1, dataType),
728 OverrideDataType(output, dataType),
734 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
735 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
737 result = layerSupportObject.IsMemCopySupported(OverrideDataType(input, dataType),
738 OverrideDataType(output, dataType),
744 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
745 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
747 result = layerSupportObject.IsMemImportSupported(OverrideDataType(input, dataType),
748 OverrideDataType(output, dataType),
754 const TensorInfo& input0 = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
755 const TensorInfo& input1 = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
756 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
758 result = layerSupportObject.IsMergeSupported(OverrideDataType(input0, dataType),
759 OverrideDataType(input1, dataType),
760 OverrideDataType(output, dataType),
766 auto cLayer = PolymorphicDowncast<const ConcatLayer*>(&layer);
769 auto getTensorInfo = [&dataType](
const InputSlot& slot)
771 return OverrideDataType(slot.GetConnectedOutputSlot()->GetTensorInfo(), dataType);
776 std::vector<TensorInfo> inputs(beginI, endI);
778 auto getTensorInfoPtr = [](
const TensorInfo&
info)
785 std::vector<const TensorInfo*> inputPtrs(beginPtr, endPtr);
787 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
789 result = layerSupportObject.IsConcatSupported(inputPtrs, output, cLayer->GetParameters(), reason);
796 const TensorInfo& input0 = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
797 const TensorInfo& input1 = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
798 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
799 result = layerSupportObject.IsMultiplicationSupported(
800 OverrideDataType(input0, dataType),
801 OverrideDataType(input1, dataType),
802 OverrideDataType(output, dataType),
808 auto cLayer = PolymorphicDowncast<const NormalizationLayer*>(&layer);
809 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
810 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
811 result = layerSupportObject.IsNormalizationSupported(OverrideDataType(input, dataType),
812 OverrideDataType(output, dataType),
813 cLayer->GetParameters(),
819 const TensorInfo& output = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
820 result = layerSupportObject.IsOutputSupported(OverrideDataType(output, dataType), reason);
825 auto cLayer = PolymorphicDowncast<const PermuteLayer*>(&layer);
826 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
827 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
828 result = layerSupportObject.IsPermuteSupported(OverrideDataType(input, dataType),
829 OverrideDataType(output, dataType),
830 cLayer->GetParameters(),
836 auto cLayer = PolymorphicDowncast<const PadLayer*>(&layer);
837 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
838 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
839 result = layerSupportObject.IsPadSupported(
840 OverrideDataType(input, dataType),
841 OverrideDataType(output, dataType),
842 cLayer->GetParameters(),
848 auto cLayer = PolymorphicDowncast<const Pooling2dLayer*>(&layer);
849 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
850 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
851 result = layerSupportObject.IsPooling2dSupported(OverrideDataType(input, dataType),
852 OverrideDataType(output, dataType),
853 cLayer->GetParameters(),
859 auto cLayer = PolymorphicDowncast<const Pooling3dLayer*>(&layer);
860 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
861 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
862 result = layerSupportObject.IsPooling3dSupported(OverrideDataType(input, dataType),
863 OverrideDataType(output, dataType),
864 cLayer->GetParameters(),
870 auto cLayer = PolymorphicDowncast<const PreCompiledLayer*>(&layer);
871 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
872 result = layerSupportObject.IsPreCompiledSupported(OverrideDataType(input, dataType),
873 cLayer->GetParameters(),
879 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
880 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
881 result = layerSupportObject.IsQuantizeSupported(input, output, reason);
886 auto cLayer = PolymorphicDowncast<const QLstmLayer*>(&layer);
887 const QLstmDescriptor& descriptor = cLayer->GetParameters();
890 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
891 const TensorInfo& previousOutputIn = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
892 const TensorInfo& previousCellStateIn = layer.GetInputSlot(2).GetConnection()->GetTensorInfo();
895 const TensorInfo& outputStateOut = layer.GetOutputSlot(0).GetTensorInfo();
896 const TensorInfo& cellStateOut = layer.GetOutputSlot(1).GetTensorInfo();
897 const TensorInfo& output = layer.GetOutputSlot(2).GetTensorInfo();
900 LstmInputParamsInfo paramsInfo;
903 ARMNN_ASSERT(cLayer->m_BasicParameters.m_InputToForgetWeights.get() !=
nullptr);
904 ARMNN_ASSERT(cLayer->m_BasicParameters.m_InputToCellWeights.get() !=
nullptr);
905 ARMNN_ASSERT(cLayer->m_BasicParameters.m_InputToOutputWeights.get() !=
nullptr);
906 paramsInfo.m_InputToForgetWeights = &cLayer->m_BasicParameters.m_InputToForgetWeights->GetTensorInfo();
907 paramsInfo.m_InputToCellWeights = &cLayer->m_BasicParameters.m_InputToCellWeights->GetTensorInfo();
908 paramsInfo.m_InputToOutputWeights = &cLayer->m_BasicParameters.m_InputToOutputWeights->GetTensorInfo();
910 paramsInfo.m_RecurrentToForgetWeights =
911 &cLayer->m_BasicParameters.m_RecurrentToForgetWeights->GetTensorInfo();
912 paramsInfo.m_RecurrentToCellWeights =
913 &cLayer->m_BasicParameters.m_RecurrentToCellWeights->GetTensorInfo();
914 paramsInfo.m_RecurrentToOutputWeights =
915 &cLayer->m_BasicParameters.m_RecurrentToOutputWeights->GetTensorInfo();
917 paramsInfo.m_ForgetGateBias = &cLayer->m_BasicParameters.m_ForgetGateBias->GetTensorInfo();
918 paramsInfo.m_CellBias = &cLayer->m_BasicParameters.m_CellBias->GetTensorInfo();
919 paramsInfo.m_OutputGateBias = &cLayer->m_BasicParameters.m_OutputGateBias->GetTensorInfo();
921 if(!descriptor.m_CifgEnabled)
923 paramsInfo.m_InputToInputWeights = &cLayer->m_CifgParameters.m_InputToInputWeights->GetTensorInfo();
924 paramsInfo.m_RecurrentToInputWeights =
925 &cLayer->m_CifgParameters.m_RecurrentToInputWeights->GetTensorInfo();
926 paramsInfo.m_InputGateBias = &cLayer->m_CifgParameters.m_InputGateBias->GetTensorInfo();
929 if(descriptor.m_ProjectionEnabled)
931 paramsInfo.m_ProjectionWeights = &cLayer->m_ProjectionParameters.m_ProjectionWeights->GetTensorInfo();
934 if (cLayer->m_ProjectionParameters.m_ProjectionBias !=
nullptr)
936 paramsInfo.m_ProjectionBias = &cLayer->m_ProjectionParameters.m_ProjectionBias->GetTensorInfo();
940 if(descriptor.m_PeepholeEnabled)
942 if (!descriptor.m_CifgEnabled)
944 paramsInfo.m_CellToInputWeights =
945 &cLayer->m_PeepholeParameters.m_CellToInputWeights->GetTensorInfo();
948 paramsInfo.m_CellToForgetWeights =
949 &cLayer->m_PeepholeParameters.m_CellToForgetWeights->GetTensorInfo();
950 paramsInfo.m_CellToOutputWeights = &cLayer->m_PeepholeParameters.m_CellToOutputWeights->GetTensorInfo();
953 if(descriptor.m_LayerNormEnabled)
955 if (!descriptor.m_CifgEnabled)
957 paramsInfo.m_InputLayerNormWeights =
958 &cLayer->m_LayerNormParameters.m_InputLayerNormWeights->GetTensorInfo();
961 paramsInfo.m_ForgetLayerNormWeights =
962 &cLayer->m_LayerNormParameters.m_ForgetLayerNormWeights->GetTensorInfo();
963 paramsInfo.m_CellLayerNormWeights =
964 &cLayer->m_LayerNormParameters.m_CellLayerNormWeights->GetTensorInfo();
965 paramsInfo.m_OutputLayerNormWeights =
966 &cLayer->m_LayerNormParameters.m_OutputLayerNormWeights->GetTensorInfo();
969 result = layerSupportObject.IsQLstmSupported(input,
982 auto cLayer = PolymorphicDowncast<const QuantizedLstmLayer*>(&layer);
985 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
986 const TensorInfo& previousCellStateIn = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
987 const TensorInfo& previousOutputIn = layer.GetInputSlot(2).GetConnection()->GetTensorInfo();
990 const TensorInfo& cellStateOut = layer.GetOutputSlot(0).GetTensorInfo();
991 const TensorInfo& output = layer.GetOutputSlot(1).GetTensorInfo();
994 QuantizedLstmInputParamsInfo paramsInfo;
996 paramsInfo.m_InputToInputWeights =
997 &cLayer->m_QuantizedLstmParameters.m_InputToInputWeights->GetTensorInfo();
998 paramsInfo.m_InputToForgetWeights =
999 &cLayer->m_QuantizedLstmParameters.m_InputToForgetWeights->GetTensorInfo();
1000 paramsInfo.m_InputToCellWeights =
1001 &cLayer->m_QuantizedLstmParameters.m_InputToCellWeights->GetTensorInfo();
1002 paramsInfo.m_InputToOutputWeights =
1003 &cLayer->m_QuantizedLstmParameters.m_InputToOutputWeights->GetTensorInfo();
1005 paramsInfo.m_RecurrentToInputWeights =
1006 &cLayer->m_QuantizedLstmParameters.m_RecurrentToInputWeights->GetTensorInfo();
1007 paramsInfo.m_RecurrentToForgetWeights =
1008 &cLayer->m_QuantizedLstmParameters.m_RecurrentToForgetWeights->GetTensorInfo();
1009 paramsInfo.m_RecurrentToCellWeights =
1010 &cLayer->m_QuantizedLstmParameters.m_RecurrentToCellWeights->GetTensorInfo();
1011 paramsInfo.m_RecurrentToOutputWeights =
1012 &cLayer->m_QuantizedLstmParameters.m_RecurrentToOutputWeights->GetTensorInfo();
1014 paramsInfo.m_InputGateBias =
1015 &cLayer->m_QuantizedLstmParameters.m_InputGateBias->GetTensorInfo();
1016 paramsInfo.m_ForgetGateBias =
1017 &cLayer->m_QuantizedLstmParameters.m_ForgetGateBias->GetTensorInfo();
1018 paramsInfo.m_CellBias =
1019 &cLayer->m_QuantizedLstmParameters.m_CellBias->GetTensorInfo();
1020 paramsInfo.m_OutputGateBias =
1021 &cLayer->m_QuantizedLstmParameters.m_OutputGateBias->GetTensorInfo();;
1023 result = layerSupportObject.IsQuantizedLstmSupported(input,
1024 previousCellStateIn,
1034 const TensorInfo& input0 = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1035 const TensorInfo& input1 = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
1036 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1037 result = layerSupportObject.IsDivisionSupported(
1038 OverrideDataType(input0, dataType),
1039 OverrideDataType(input1, dataType),
1040 OverrideDataType(output, dataType),
1046 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1047 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1048 result = layerSupportObject.IsRankSupported(OverrideDataType(input, dataType),
1049 OverrideDataType(output, dataType),
1055 auto cLayer = PolymorphicDowncast<const ReshapeLayer*>(&layer);
1056 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1057 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1058 result = layerSupportObject.IsReshapeSupported(OverrideDataType(input, dataType),
1059 OverrideDataType(output, dataType),
1060 cLayer->GetParameters(),
1066 auto cLayer = PolymorphicDowncast<const ResizeLayer*>(&layer);
1067 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1068 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1069 result = layerSupportObject.IsResizeSupported(OverrideDataType(input, dataType),
1070 OverrideDataType(output, dataType),
1071 cLayer->GetParameters(),
1077 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1078 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1080 result = layerSupportObject.IsShapeSupported(OverrideDataType(input, dataType),
1081 OverrideDataType(output, dataType),
1087 auto cLayer = PolymorphicDowncast<const SliceLayer*>(&layer);
1089 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1090 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1092 result = layerSupportObject.IsSliceSupported(OverrideDataType(input, dataType),
1093 OverrideDataType(output, dataType),
1094 cLayer->GetParameters(),
1100 auto cLayer = PolymorphicDowncast<const SoftmaxLayer*>(&layer);
1101 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1102 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1103 result = layerSupportObject.IsSoftmaxSupported(OverrideDataType(input, dataType),
1104 OverrideDataType(output, dataType),
1105 cLayer->GetParameters(),
1111 auto cLayer = PolymorphicDowncast<const SpaceToBatchNdLayer*>(&layer);
1112 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1113 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1114 result = layerSupportObject.IsSpaceToBatchNdSupported(OverrideDataType(input, dataType),
1115 OverrideDataType(output, dataType),
1116 cLayer->GetParameters(),
1122 auto cLayer = PolymorphicDowncast<const SpaceToDepthLayer*>(&layer);
1124 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1125 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1127 result = layerSupportObject.IsSpaceToDepthSupported(OverrideDataType(input, dataType),
1128 OverrideDataType(output, dataType),
1129 cLayer->GetParameters(),
1135 auto cLayer = PolymorphicDowncast<const SplitterLayer*>(&layer);
1136 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1139 auto getTensorInfo = [&dataType](
const OutputSlot& slot)
1141 return OverrideDataType(slot.GetTensorInfo(), dataType);
1145 std::vector<TensorInfo> outputs(beginI, endI);
1147 const std::vector<std::reference_wrapper<TensorInfo>> outputPtrs(outputs.begin(), outputs.end());
1149 result = layerSupportObject.IsSplitterSupported(OverrideDataType(input, dataType),
1151 cLayer->GetParameters(),
1157 auto cLayer = PolymorphicDowncast<const StackLayer*>(&layer);
1160 auto getTensorInfo = [&dataType](
const InputSlot& slot)
1162 return OverrideDataType(slot.GetConnectedOutputSlot()->GetTensorInfo(), dataType);
1166 std::vector<TensorInfo> inputs(beginI, endI);
1168 auto getTensorInfoPtr = [](
const TensorInfo&
info)
1174 std::vector<const TensorInfo*> inputPtrs(beginPtr, endPtr);
1176 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1178 result = layerSupportObject.IsStackSupported(inputPtrs, output, cLayer->GetParameters(), reason);
1184 auto cLayer = PolymorphicDowncast<const StandInLayer*>(&layer);
1187 auto getTensorInfoIn = [&dataType](
const InputSlot& slot)
1189 return OverrideDataType(slot.GetConnectedOutputSlot()->GetTensorInfo(), dataType);
1191 auto getTensorInfoOut = [&dataType](
const OutputSlot& slot)
1193 return OverrideDataType(slot.GetTensorInfo(), dataType);
1197 std::vector<TensorInfo> inputs(beginI, endI);
1201 std::vector<TensorInfo> outputs(beginO, endO);
1204 auto getTensorInfoPtr = [](
const TensorInfo&
info)
1210 std::vector<const TensorInfo*> inputPtrs(beginPtrI, endPtrI);
1214 std::vector<const TensorInfo*> outputPtrs(beginPtrO, endPtrO);
1217 result = layerSupportObject.IsStandInSupported(inputPtrs,
1219 cLayer->GetParameters(),
1225 auto cLayer = PolymorphicDowncast<const StridedSliceLayer*>(&layer);
1226 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1227 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1228 result = layerSupportObject.IsStridedSliceSupported(OverrideDataType(input, dataType),
1229 OverrideDataType(output, dataType),
1230 cLayer->GetParameters(),
1236 const TensorInfo& input0 = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1237 const TensorInfo& input1 = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
1238 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1239 result = layerSupportObject.IsSubtractionSupported(
1240 OverrideDataType(input0, dataType),
1241 OverrideDataType(input1, dataType),
1242 OverrideDataType(output, dataType),
1248 const TensorInfo& input0 = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1249 const TensorInfo& input1 = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
1250 const TensorInfo& output0 = layer.GetOutputSlot(0).GetTensorInfo();
1251 const TensorInfo& output1 = layer.GetOutputSlot(1).GetTensorInfo();
1252 result = layerSupportObject.IsSwitchSupported(OverrideDataType(input0, dataType),
1253 OverrideDataType(input1, dataType),
1254 OverrideDataType(output0, dataType),
1255 OverrideDataType(output1, dataType),
1261 auto cLayer = PolymorphicDowncast<const MeanLayer*>(&layer);
1262 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1263 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1264 result = layerSupportObject.IsMeanSupported(
1265 OverrideDataType(input, dataType),
1266 OverrideDataType(output, dataType),
1267 cLayer->GetParameters(),
1273 const TensorInfo& input0 = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1274 const TensorInfo& input1 = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
1275 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1276 result = layerSupportObject.IsMinimumSupported(OverrideDataType(input0, dataType),
1277 OverrideDataType(input1, dataType),
1278 OverrideDataType(output, dataType),
1284 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1285 const TensorInfo& alpha = layer.GetInputSlot(1).GetConnection()->GetTensorInfo();
1286 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1287 result = layerSupportObject.IsPreluSupported(OverrideDataType(input, dataType),
1288 OverrideDataType(alpha, dataType),
1289 OverrideDataType(output, dataType),
1295 auto cLayer = PolymorphicDowncast<const TransposeLayer*>(&layer);
1296 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1297 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1298 result = layerSupportObject.IsTransposeSupported(OverrideDataType(input, dataType),
1299 OverrideDataType(output, dataType),
1300 cLayer->GetParameters(),
1306 auto cLayer = PolymorphicDowncast<const TransposeConvolution2dLayer*>(&layer);
1308 const TensorInfo input = OverrideDataType(layer.GetInputSlot(0).GetConnection()->GetTensorInfo(),
1310 const TensorInfo output = OverrideDataType(layer.GetOutputSlot(0).GetTensorInfo(), dataType);
1312 const TransposeConvolution2dDescriptor& descriptor = cLayer->GetParameters();
1314 Optional<TensorInfo> biases;
1315 if (descriptor.m_BiasEnabled)
1318 biases = OverrideDataType(cLayer->m_Bias->GetTensorInfo(),
1323 const TensorInfo weights = OverrideDataType(cLayer->m_Weight->GetTensorInfo(), dataType);
1325 result = layerSupportObject.IsTransposeConvolution2dSupported(input,
1336 auto cLayer = PolymorphicDowncast<const ReduceLayer*>(&layer);
1337 const TensorInfo& input = layer.GetInputSlot(0).GetConnection()->GetTensorInfo();
1338 const TensorInfo& output = layer.GetOutputSlot(0).GetTensorInfo();
1340 result = layerSupportObject.IsReduceSupported(OverrideDataType(input, dataType),
1341 OverrideDataType(output, dataType),
1342 cLayer->GetParameters(),
1348 auto cLayer = PolymorphicDowncast<const UnidirectionalSequenceLstmLayer*>(&layer);
1352 const TensorInfo& input = OverrideDataType(layer.GetInputSlot(0).GetConnection()->GetTensorInfo(),
1354 const TensorInfo& outputStateIn = OverrideDataType(layer.GetInputSlot(1).GetConnection()->GetTensorInfo(),
1356 const TensorInfo& cellStateIn = OverrideDataType(layer.GetInputSlot(2).GetConnection()->GetTensorInfo(),
1359 const TensorInfo& output = OverrideDataType(layer.GetOutputSlot(0).GetTensorInfo(), dataType);
1362 const TensorInfo& inputToForgetWeights
1363 = OverrideDataType(cLayer->m_BasicParameters.m_InputToForgetWeights->GetTensorInfo(), dataType);
1364 const TensorInfo& inputToCellWeights
1365 = OverrideDataType(cLayer->m_BasicParameters.m_InputToCellWeights->GetTensorInfo(), dataType);
1366 const TensorInfo& inputToOutputWeights
1367 = OverrideDataType(cLayer->m_BasicParameters.m_InputToOutputWeights->GetTensorInfo(), dataType);
1368 const TensorInfo& recurrentToForgetWeights
1369 = OverrideDataType(cLayer->m_BasicParameters.m_RecurrentToForgetWeights->GetTensorInfo(), dataType);
1370 const TensorInfo& recurrentToCellWeights
1371 = OverrideDataType(cLayer->m_BasicParameters.m_RecurrentToCellWeights->GetTensorInfo(), dataType);
1372 const TensorInfo& recurrentToOutputWeights
1373 = OverrideDataType(cLayer->m_BasicParameters.m_RecurrentToOutputWeights->GetTensorInfo(), dataType);
1374 const TensorInfo& forgetGateBias
1375 = OverrideDataType(cLayer->m_BasicParameters.m_ForgetGateBias->GetTensorInfo(), dataType);
1376 const TensorInfo& cellBias
1377 = OverrideDataType(cLayer->m_BasicParameters.m_CellBias->GetTensorInfo(), dataType);
1378 const TensorInfo& outputGateBias
1379 = OverrideDataType(cLayer->m_BasicParameters.m_OutputGateBias->GetTensorInfo(), dataType);
1381 LstmInputParamsInfo paramsInfo;
1383 paramsInfo.m_InputToForgetWeights = &inputToForgetWeights;
1384 paramsInfo.m_InputToCellWeights = &inputToCellWeights;
1385 paramsInfo.m_InputToOutputWeights = &inputToOutputWeights;
1386 paramsInfo.m_RecurrentToForgetWeights = &recurrentToForgetWeights;
1387 paramsInfo.m_RecurrentToCellWeights = &recurrentToCellWeights;
1388 paramsInfo.m_RecurrentToOutputWeights = &recurrentToOutputWeights;
1389 paramsInfo.m_ForgetGateBias = &forgetGateBias;
1390 paramsInfo.m_CellBias = &cellBias;
1391 paramsInfo.m_OutputGateBias = &outputGateBias;
1394 TensorInfo optInputToInputWeights;
1395 TensorInfo optRecurrentToInputWeights;
1396 TensorInfo optCellToInputWeights;
1397 TensorInfo optInputGateBias;
1398 TensorInfo optProjectionWeights;
1399 TensorInfo optProjectionBias;
1400 TensorInfo optCellToForgetWeights;
1401 TensorInfo optCellToOutputWeights;
1402 TensorInfo optInputLayerNormWeights;
1403 TensorInfo optForgetLayerNormWeights;
1404 TensorInfo optCellLayerNormWeights;
1405 TensorInfo optOutputLayerNormWeights;
1407 if(!descriptor.m_CifgEnabled)
1409 optInputToInputWeights =
1410 OverrideDataType(cLayer->m_CifgParameters.m_InputToInputWeights->GetTensorInfo(), dataType);
1411 paramsInfo.m_InputToInputWeights = &optInputToInputWeights;
1413 optRecurrentToInputWeights =
1414 OverrideDataType(cLayer->m_CifgParameters.m_RecurrentToInputWeights->GetTensorInfo(), dataType);
1415 paramsInfo.m_RecurrentToInputWeights = &optRecurrentToInputWeights;
1417 OverrideDataType(cLayer->m_CifgParameters.m_InputGateBias->GetTensorInfo(), dataType);
1418 paramsInfo.m_InputGateBias = &optInputGateBias;
1421 if(descriptor.m_ProjectionEnabled)
1423 optProjectionWeights =
1424 OverrideDataType(cLayer->m_ProjectionParameters.m_ProjectionWeights->GetTensorInfo(), dataType);
1425 paramsInfo.m_ProjectionWeights = &optProjectionWeights;
1426 if (cLayer->m_ProjectionParameters.m_ProjectionBias !=
nullptr)
1429 OverrideDataType(cLayer->m_ProjectionParameters.m_ProjectionBias->GetTensorInfo(), dataType);
1430 paramsInfo.m_ProjectionBias = &optProjectionBias;
1434 if(descriptor.m_PeepholeEnabled)
1436 if(!descriptor.m_CifgEnabled)
1438 optCellToInputWeights =
1439 OverrideDataType(cLayer->m_PeepholeParameters.m_CellToInputWeights->GetTensorInfo(),
1441 paramsInfo.m_CellToInputWeights = &optCellToInputWeights;
1443 optCellToForgetWeights =
1444 OverrideDataType(cLayer->m_PeepholeParameters.m_CellToForgetWeights->GetTensorInfo(), dataType);
1445 paramsInfo.m_CellToForgetWeights = &optCellToForgetWeights;
1446 optCellToOutputWeights =
1447 OverrideDataType(cLayer->m_PeepholeParameters.m_CellToOutputWeights->GetTensorInfo(), dataType);
1448 paramsInfo.m_CellToOutputWeights = &optCellToOutputWeights;
1451 if(descriptor.m_LayerNormEnabled)
1453 if (!descriptor.m_CifgEnabled)
1455 optInputLayerNormWeights = OverrideDataType(
1456 cLayer->m_LayerNormParameters.m_InputLayerNormWeights->GetTensorInfo(), dataType);
1457 paramsInfo.m_InputLayerNormWeights = &optInputLayerNormWeights;
1460 optForgetLayerNormWeights = OverrideDataType(
1461 cLayer->m_LayerNormParameters.m_ForgetLayerNormWeights->GetTensorInfo(), dataType);
1462 paramsInfo.m_ForgetLayerNormWeights = &optForgetLayerNormWeights;
1464 optCellLayerNormWeights = OverrideDataType(
1465 cLayer->m_LayerNormParameters.m_CellLayerNormWeights->GetTensorInfo(), dataType);
1466 paramsInfo.m_CellLayerNormWeights = &optCellLayerNormWeights;
1468 optOutputLayerNormWeights = OverrideDataType(
1469 cLayer->m_LayerNormParameters.m_OutputLayerNormWeights->GetTensorInfo(), dataType);
1470 paramsInfo.m_OutputLayerNormWeights = &optOutputLayerNormWeights;
1473 Optional<TensorInfo> hiddenStateOut;
1474 Optional<TensorInfo> cellStateOut;
1476 result = layerSupportObject.IsUnidirectionalSequenceLstmSupported(input,
1489 ARMNN_ASSERT_MSG(
false,
"WorkloadFactory did not recognise type of layer.");
1490 reason.value() =
"Unrecognised layer type";
1501 std::string& outReasonIfUnsupported)
1503 return IsLayerConfigurationSupported(backendId, connectableLayer, dataType, outReasonIfUnsupported);
1508 std::string& outReasonIfUnsupported)
1510 auto layer = PolymorphicDowncast<const Layer*>(&connectableLayer);
1511 return IsLayerConfigurationSupported(layer->GetBackendId(), connectableLayer, dataType, outReasonIfUnsupported);
1517 std::string& outReasonIfUnsupported,
1520 auto layer = PolymorphicDowncast<const Layer*>(&connectableLayer);
1521 return IsLayerConfigurationSupported(layer->GetBackendId(),
1524 outReasonIfUnsupported,
1531 std::string& outReasonIfUnsupported,
1534 return IsLayerConfigurationSupported(backendId,
1537 outReasonIfUnsupported,
1549 auto activationQueueDescriptor = PolymorphicDowncast<const ActivationQueueDescriptor*>(&descriptor);
1550 return CreateActivation(*activationQueueDescriptor, info);
1554 auto additionQueueDescriptor = PolymorphicDowncast<const AdditionQueueDescriptor*>(&descriptor);
1555 return CreateAddition(*additionQueueDescriptor, info);
1559 auto argMinMaxQueueDescriptor = PolymorphicDowncast<const ArgMinMaxQueueDescriptor*>(&descriptor);
1560 return CreateArgMinMax(*argMinMaxQueueDescriptor, info);
1564 auto batchNormQueueDescriptor = PolymorphicDowncast<const BatchNormalizationQueueDescriptor*>(&descriptor);
1565 return CreateBatchNormalization(*batchNormQueueDescriptor, info);
1569 auto batchToSpaceNdQueueDescriptor
1570 = PolymorphicDowncast<const BatchToSpaceNdQueueDescriptor*>(&descriptor);
1571 return CreateBatchToSpaceNd(*batchToSpaceNdQueueDescriptor, info);
1575 auto castQueueDescriptor = PolymorphicDowncast<const CastQueueDescriptor*>(&descriptor);
1576 return CreateCast(*castQueueDescriptor, info);
1580 auto channelShuffleQueueDescriptor
1581 = PolymorphicDowncast<const ChannelShuffleQueueDescriptor*>(&descriptor);
1582 return CreateChannelShuffle(*channelShuffleQueueDescriptor, info);
1586 auto comparisonQueueDescriptor = PolymorphicDowncast<const ComparisonQueueDescriptor*>(&descriptor);
1587 return CreateComparison(*comparisonQueueDescriptor, info);
1591 auto concatQueueDescriptor = PolymorphicDowncast<const ConcatQueueDescriptor*>(&descriptor);
1592 return CreateConcat(*concatQueueDescriptor, info);
1596 auto constantQueueDescriptor = PolymorphicDowncast<const ConstantQueueDescriptor*>(&descriptor);
1597 return CreateConstant(*constantQueueDescriptor, info);
1601 auto convertBf16ToFp32QueueDescriptor
1602 = PolymorphicDowncast<const ConvertBf16ToFp32QueueDescriptor*>(&descriptor);
1603 return CreateConvertBf16ToFp32(*convertBf16ToFp32QueueDescriptor, info);
1607 auto convertFp16ToFp32QueueDescriptor
1608 = PolymorphicDowncast<const ConvertFp16ToFp32QueueDescriptor*>(&descriptor);
1609 return CreateConvertFp16ToFp32(*convertFp16ToFp32QueueDescriptor, info);
1613 auto convertFp32ToBf16QueueDescriptor
1614 = PolymorphicDowncast<const ConvertFp32ToBf16QueueDescriptor*>(&descriptor);
1615 return CreateConvertFp32ToBf16(*convertFp32ToBf16QueueDescriptor, info);
1619 auto convertFp32ToFp16QueueDescriptor
1620 = PolymorphicDowncast<const ConvertFp32ToFp16QueueDescriptor*>(&descriptor);
1621 return CreateConvertFp32ToFp16(*convertFp32ToFp16QueueDescriptor, info);
1625 auto convolution2dQueueDescriptor = PolymorphicDowncast<const Convolution2dQueueDescriptor*>(&descriptor);
1626 return CreateConvolution2d(*convolution2dQueueDescriptor, info);
1630 auto convolution3dQueueDescriptor = PolymorphicDowncast<const Convolution3dQueueDescriptor*>(&descriptor);
1631 return CreateConvolution3d(*convolution3dQueueDescriptor, info);
1635 auto debugQueueDescriptor = PolymorphicDowncast<const DebugQueueDescriptor*>(&descriptor);
1636 return CreateDebug(*debugQueueDescriptor, info);
1640 auto depthToSpaceQueueDescriptor = PolymorphicDowncast<const DepthToSpaceQueueDescriptor*>(&descriptor);
1641 return CreateDepthToSpace(*depthToSpaceQueueDescriptor, info);
1645 auto depthwiseConvolution2DQueueDescriptor
1646 = PolymorphicDowncast<const DepthwiseConvolution2dQueueDescriptor*>(&descriptor);
1647 return CreateDepthwiseConvolution2d(*depthwiseConvolution2DQueueDescriptor, info);
1651 auto dequantizeQueueDescriptor = PolymorphicDowncast<const DequantizeQueueDescriptor*>(&descriptor);
1652 return CreateDequantize(*dequantizeQueueDescriptor, info);
1656 auto detectionPostProcessQueueDescriptor
1657 = PolymorphicDowncast<const DetectionPostProcessQueueDescriptor*>(&descriptor);
1658 return CreateDetectionPostProcess(*detectionPostProcessQueueDescriptor, info);
1662 auto divisionQueueDescriptor = PolymorphicDowncast<const DivisionQueueDescriptor*>(&descriptor);
1663 return CreateDivision(*divisionQueueDescriptor, info);
1667 auto elementwiseUnaryQueueDescriptor
1668 = PolymorphicDowncast<const ElementwiseUnaryQueueDescriptor*>(&descriptor);
1669 return CreateElementwiseUnary(*elementwiseUnaryQueueDescriptor, info);
1674 auto fakeQuantizationQueueDescriptor
1675 = PolymorphicDowncast<const FakeQuantizationQueueDescriptor*>(&descriptor);
1676 return CreateFakeQuantization(*fakeQuantizationQueueDescriptor, info);
1680 auto fillQueueDescriptor = PolymorphicDowncast<const FillQueueDescriptor*>(&descriptor);
1681 return CreateFill(*fillQueueDescriptor, info);
1685 auto floorQueueDescriptor = PolymorphicDowncast<const FloorQueueDescriptor*>(&descriptor);
1686 return CreateFloor(*floorQueueDescriptor, info);
1690 auto fullyConnectedQueueDescriptor
1691 = PolymorphicDowncast<const FullyConnectedQueueDescriptor*>(&descriptor);
1692 return CreateFullyConnected(*fullyConnectedQueueDescriptor, info);
1696 auto gatherQueueDescriptor = PolymorphicDowncast<const GatherQueueDescriptor*>(&descriptor);
1697 return CreateGather(*gatherQueueDescriptor, info);
1701 auto inputQueueDescriptor = PolymorphicDowncast<const InputQueueDescriptor*>(&descriptor);
1706 auto instanceNormalizationQueueDescriptor
1707 = PolymorphicDowncast<const InstanceNormalizationQueueDescriptor*>(&descriptor);
1708 return CreateInstanceNormalization(*instanceNormalizationQueueDescriptor, info);
1712 auto l2NormalizationQueueDescriptor
1713 = PolymorphicDowncast<const L2NormalizationQueueDescriptor*>(&descriptor);
1714 return CreateL2Normalization(*l2NormalizationQueueDescriptor, info);
1718 auto logicalBinaryQueueDescriptor = PolymorphicDowncast<const LogicalBinaryQueueDescriptor*>(&descriptor);
1719 return CreateLogicalBinary(*logicalBinaryQueueDescriptor, info);
1723 auto logSoftmaxQueueDescriptor = PolymorphicDowncast<const LogSoftmaxQueueDescriptor*>(&descriptor);
1724 return CreateLogSoftmax(*logSoftmaxQueueDescriptor, info);
1728 auto lstmQueueDescriptor = PolymorphicDowncast<const LstmQueueDescriptor*>(&descriptor);
1729 return CreateLstm(*lstmQueueDescriptor, info);
1733 auto maximumQueueDescriptor = PolymorphicDowncast<const MaximumQueueDescriptor*>(&descriptor);
1734 return CreateMaximum(*maximumQueueDescriptor, info);
1738 auto meanQueueDescriptor = PolymorphicDowncast<const MeanQueueDescriptor*>(&descriptor);
1739 return CreateMean(*meanQueueDescriptor, info);
1743 auto memCopyQueueDescriptor = PolymorphicDowncast<const MemCopyQueueDescriptor*>(&descriptor);
1744 return CreateMemCopy(*memCopyQueueDescriptor, info);
1748 auto memImportQueueDescriptor = PolymorphicDowncast<const MemImportQueueDescriptor*>(&descriptor);
1749 return CreateMemImport(*memImportQueueDescriptor, info);
1753 auto minimumQueueDescriptor = PolymorphicDowncast<const MinimumQueueDescriptor*>(&descriptor);
1754 return CreateMinimum(*minimumQueueDescriptor, info);
1758 auto multiplicationQueueDescriptor
1759 = PolymorphicDowncast<const MultiplicationQueueDescriptor*>(&descriptor);
1760 return CreateMultiplication(*multiplicationQueueDescriptor, info);
1764 auto normalizationQueueDescriptor = PolymorphicDowncast<const NormalizationQueueDescriptor*>(&descriptor);
1765 return CreateNormalization(*normalizationQueueDescriptor, info);
1769 auto outputQueueDescriptor = PolymorphicDowncast<const OutputQueueDescriptor*>(&descriptor);
1770 return CreateOutput(*outputQueueDescriptor, info);
1774 auto padQueueDescriptor = PolymorphicDowncast<const PadQueueDescriptor*>(&descriptor);
1775 return CreatePad(*padQueueDescriptor, info);
1779 auto permuteQueueDescriptor = PolymorphicDowncast<const PermuteQueueDescriptor*>(&descriptor);
1780 return CreatePermute(*permuteQueueDescriptor, info);
1784 auto pooling2dQueueDescriptor = PolymorphicDowncast<const Pooling2dQueueDescriptor*>(&descriptor);
1785 return CreatePooling2d(*pooling2dQueueDescriptor, info);
1789 auto pooling3dQueueDescriptor = PolymorphicDowncast<const Pooling3dQueueDescriptor*>(&descriptor);
1790 return CreatePooling3d(*pooling3dQueueDescriptor, info);
1794 auto preCompiledQueueDescriptor = PolymorphicDowncast<const PreCompiledQueueDescriptor*>(&descriptor);
1795 return CreatePreCompiled(*preCompiledQueueDescriptor, info);
1799 auto preluQueueDescriptor = PolymorphicDowncast<const PreluQueueDescriptor*>(&descriptor);
1800 return CreatePrelu(*preluQueueDescriptor, info);
1804 auto qlstmQueueDescriptor = PolymorphicDowncast<const QLstmQueueDescriptor*>(&descriptor);
1805 return CreateQLstm(*qlstmQueueDescriptor, info);
1809 auto quantizeQueueDescriptor = PolymorphicDowncast<const QuantizeQueueDescriptor*>(&descriptor);
1810 return CreateQuantize(*quantizeQueueDescriptor, info);
1814 auto rankQueueDescriptor = PolymorphicDowncast<const RankQueueDescriptor*>(&descriptor);
1815 return CreateRank(*rankQueueDescriptor, info);
1819 auto reduceQueueDescriptor = PolymorphicDowncast<const ReduceQueueDescriptor*>(&descriptor);
1820 return CreateReduce(*reduceQueueDescriptor, info);
1824 auto reshapeQueueDescriptor = PolymorphicDowncast<const ReshapeQueueDescriptor*>(&descriptor);
1825 return CreateReshape(*reshapeQueueDescriptor, info);
1829 auto resizeQueueDescriptor = PolymorphicDowncast<const ResizeQueueDescriptor*>(&descriptor);
1830 return CreateResize(*resizeQueueDescriptor, info);
1834 auto shapeQueueDescriptor = PolymorphicDowncast<const ShapeQueueDescriptor*>(&descriptor);
1835 return CreateShape(*shapeQueueDescriptor, info);
1839 auto sliceQueueDescriptor = PolymorphicDowncast<const SliceQueueDescriptor*>(&descriptor);
1840 return CreateSlice(*sliceQueueDescriptor, info);
1844 auto softmaxQueueDescriptor = PolymorphicDowncast<const SoftmaxQueueDescriptor*>(&descriptor);
1845 return CreateSoftmax(*softmaxQueueDescriptor, info);
1849 auto spaceToBatchNdQueueDescriptor
1850 = PolymorphicDowncast<const SpaceToBatchNdQueueDescriptor*>(&descriptor);
1851 return CreateSpaceToBatchNd(*spaceToBatchNdQueueDescriptor, info);
1855 auto spaceToDepthQueueDescriptor = PolymorphicDowncast<const SpaceToDepthQueueDescriptor*>(&descriptor);
1856 return CreateSpaceToDepth(*spaceToDepthQueueDescriptor, info);
1860 auto splitterQueueDescriptor = PolymorphicDowncast<const SplitterQueueDescriptor*>(&descriptor);
1861 return CreateSplitter(*splitterQueueDescriptor, info);
1865 auto stackQueueDescriptor = PolymorphicDowncast<const StackQueueDescriptor*>(&descriptor);
1866 return CreateStack(*stackQueueDescriptor, info);
1870 auto stridedSliceQueueDescriptor = PolymorphicDowncast<const StridedSliceQueueDescriptor*>(&descriptor);
1871 return CreateStridedSlice(*stridedSliceQueueDescriptor, info);
1875 auto subtractionQueueDescriptor = PolymorphicDowncast<const SubtractionQueueDescriptor*>(&descriptor);
1876 return CreateSubtraction(*subtractionQueueDescriptor, info);
1880 auto transposeQueueDescriptor = PolymorphicDowncast<const TransposeQueueDescriptor*>(&descriptor);
1881 return CreateTranspose(*transposeQueueDescriptor, info);
1885 auto transposeConvolution2dQueueDescriptor
1886 = PolymorphicDowncast<const TransposeConvolution2dQueueDescriptor*>(&descriptor);
1887 return CreateTransposeConvolution2d(*transposeConvolution2dQueueDescriptor, info);
1891 auto unidirectionalSequenceLstmQueueDescriptor
1892 = PolymorphicDowncast<const UnidirectionalSequenceLstmQueueDescriptor*>(&descriptor);
1893 return CreateUnidirectionalSequenceLstm(*unidirectionalSequenceLstmQueueDescriptor, info);
1904 return std::unique_ptr<IWorkload>();
1910 return std::unique_ptr<IWorkload>();
1916 return std::unique_ptr<IWorkload>();
1919 std::unique_ptr<IWorkload> IWorkloadFactory::CreateBatchNormalization(
1922 return std::unique_ptr<IWorkload>();
1928 return std::unique_ptr<IWorkload>();
1934 return std::unique_ptr<IWorkload>();
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>();
2009 std::unique_ptr<IWorkload> IWorkloadFactory::CreateDepthwiseConvolution2d(
2012 return std::unique_ptr<IWorkload>();
2015 std::unique_ptr<IWorkload> IWorkloadFactory::CreateDequantize(
2018 return std::unique_ptr<IWorkload>();
2021 std::unique_ptr<IWorkload> IWorkloadFactory::CreateDetectionPostProcess(
2024 return std::unique_ptr<IWorkload>();
2030 return std::unique_ptr<IWorkload>();
2036 return std::unique_ptr<IWorkload>();
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>();
2069 std::unique_ptr<IWorkload> IWorkloadFactory::CreateInstanceNormalization(
2073 return std::unique_ptr<IWorkload>();
2079 return std::unique_ptr<IWorkload>();
2085 return std::unique_ptr<IWorkload>();
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>();
2216 return std::unique_ptr<IWorkload>();
2222 return std::unique_ptr<IWorkload>();
2228 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>();
2303 std::unique_ptr<IWorkload> IWorkloadFactory::CreateTransposeConvolution2d(
2307 return std::unique_ptr<IWorkload>();
2310 std::unique_ptr<IWorkload> IWorkloadFactory::CreateUnidirectionalSequenceLstm(
2314 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...