21.08
|
#include <Layer.hpp>
Public Member Functions | |
Layer (unsigned int numInputSlots, unsigned int numOutputSlots, LayerType type, const char *name) | |
Layer (unsigned int numInputSlots, unsigned int numOutputSlots, LayerType type, DataLayout layout, const char *name) | |
void | ExecuteStrategy (IStrategy &strategy) const override |
Apply a visitor to this layer. More... | |
const std::string & | GetNameStr () const |
const OutputHandler & | GetOutputHandler (unsigned int i=0) const |
OutputHandler & | GetOutputHandler (unsigned int i=0) |
ShapeInferenceMethod | GetShapeInferenceMethod () const |
const std::vector< InputSlot > & | GetInputSlots () const |
const std::vector< OutputSlot > & | GetOutputSlots () const |
std::vector< InputSlot >::iterator | BeginInputSlots () |
std::vector< InputSlot >::iterator | EndInputSlots () |
std::vector< OutputSlot >::iterator | BeginOutputSlots () |
std::vector< OutputSlot >::iterator | EndOutputSlots () |
bool | IsOutputUnconnected () |
void | ResetPriority () const |
LayerPriority | GetPriority () const |
LayerType | GetType () const override |
Returns the armnn::LayerType of this layer. More... | |
DataType | GetDataType () const |
const BackendId & | GetBackendId () const |
void | SetBackendId (const BackendId &id) |
virtual std::unique_ptr< IWorkload > | CreateWorkload (const IWorkloadFactory &factory) const =0 |
virtual void | CreateTensorHandles (const TensorHandleFactoryRegistry ®istry, const IWorkloadFactory &factory, const bool IsMemoryManaged=true) |
virtual Layer * | Clone (Graph &graph) const =0 |
Creates a dynamically-allocated copy of this layer. More... | |
void | VerifyLayerConnections (unsigned int expectedConnections, const CheckLocation &location) const |
virtual void | ValidateTensorShapesFromInputs ()=0 |
std::vector< TensorShape > | InferOutputShapes (const std::vector< TensorShape > &inputShapes) const override |
Infer the shape of the output(s) based on the provided input shape(s) More... | |
virtual void | SerializeLayerParameters (ParameterStringifyFunction &fn) const |
Helper to serialize the layer parameters to string. More... | |
virtual void | ReleaseConstantData () |
template<typename Op > | |
void | OperateOnConstantTensors (Op op) |
const char * | GetName () const override |
Returns the name of the layer. More... | |
unsigned int | GetNumInputSlots () const override |
Returns the number of connectable input slots. More... | |
unsigned int | GetNumOutputSlots () const override |
Returns the number of connectable output slots. More... | |
const InputSlot & | GetInputSlot (unsigned int index) const override |
Get a const input slot handle by slot index. More... | |
InputSlot & | GetInputSlot (unsigned int index) override |
Get the input slot handle by slot index. More... | |
const OutputSlot & | GetOutputSlot (unsigned int index=0) const override |
Get the const output slot handle by slot index. More... | |
OutputSlot & | GetOutputSlot (unsigned int index=0) override |
Get the output slot handle by slot index. More... | |
void | SetGuid (LayerGuid guid) |
LayerGuid | GetGuid () const final |
Returns the unique id of the layer. More... | |
void | AddRelatedLayerName (const std::string layerName) |
const std::list< std::string > & | GetRelatedLayerNames () |
virtual void | Reparent (Graph &dest, std::list< Layer *>::const_iterator iterator)=0 |
void | BackendSelectionHint (Optional< BackendId > backend) final |
Provide a hint for the optimizer as to which backend to prefer for this layer. More... | |
Optional< BackendId > | GetBackendHint () const |
void | SetShapeInferenceMethod (ShapeInferenceMethod shapeInferenceMethod) |
template<typename T > | |
std::shared_ptr< T > | GetAdditionalInformation () const |
void | SetAdditionalInfoForObject (const AdditionalInfoObjectPtr &additionalInfo) |
Public Member Functions inherited from IConnectableLayer | |
virtual void | Accept (ILayerVisitor &visitor) const =0 |
Apply a visitor to this layer. More... | |
Protected Types | |
using | ConstantTensors = std::vector< std::reference_wrapper< std::shared_ptr< ConstTensorHandle > >> |
Protected Member Functions | |
virtual | ~Layer ()=default |
template<typename QueueDescriptor > | |
void | CollectQueueDescriptorInputs (QueueDescriptor &descriptor, WorkloadInfo &info) const |
template<typename QueueDescriptor > | |
void | CollectQueueDescriptorOutputs (QueueDescriptor &descriptor, WorkloadInfo &info) const |
void | ValidateAndCopyShape (const TensorShape &outputShape, const TensorShape &inferredShape, const ShapeInferenceMethod shapeInferenceMethod, const std::string &layerName, const unsigned int outputSlotIndex=0) |
void | VerifyShapeInferenceType (const TensorShape &outputShape, ShapeInferenceMethod shapeInferenceMethod) |
template<typename QueueDescriptor > | |
WorkloadInfo | PrepInfoAndDesc (QueueDescriptor &descriptor) const |
Helper function to reduce duplication in *LayerCreateWorkload. More... | |
template<typename LayerType , typename ... Params> | |
LayerType * | CloneBase (Graph &graph, Params &&... params) const |
virtual ConstantTensors | GetConstantTensorsByRef () |
void | SetAdditionalInfo (QueueDescriptor &descriptor) const |
Protected Member Functions inherited from IConnectableLayer | |
~IConnectableLayer () | |
Objects are not deletable via the handle. More... | |
Protected Attributes | |
AdditionalInfoObjectPtr | m_AdditionalInfoObject |
std::vector< OutputHandler > | m_OutputHandlers |
ShapeInferenceMethod | m_ShapeInferenceMethod |
Friends | |
class | Graph |
|
protected |
Layer | ( | unsigned int | numInputSlots, |
unsigned int | numOutputSlots, | ||
LayerType | type, | ||
const char * | name | ||
) |
name | - Optional name for the layer (may be nullptr). |
Definition at line 218 of file Layer.cpp.
References ARMNN_ASSERT, Layer::GetInputSlots(), Layer::m_OutputHandlers, and WorkloadDataCollector::Push().
Layer | ( | unsigned int | numInputSlots, |
unsigned int | numOutputSlots, | ||
LayerType | type, | ||
DataLayout | layout, | ||
const char * | name | ||
) |
Definition at line 191 of file Layer.cpp.
References armnn::IgnoreUnused(), and Layer::m_OutputHandlers.
|
protectedvirtualdefault |
|
inline |
Provide a hint for the optimizer as to which backend to prefer for this layer.
Implements IConnectableLayer.
Definition at line 330 of file Layer.hpp.
Referenced by TEST_SUITE().
|
inline |
Definition at line 241 of file Layer.hpp.
Referenced by armnn::InsertConvertBf16ToFp32LayersBefore(), armnn::InsertConvertFp16ToFp32LayersBefore(), armnn::InsertConvertFp32ToBf16LayersBefore(), ConvertFp32NetworkToFp16Impl::Run(), MoveTransposeUpImpl::Run(), and MovePermuteUpImpl::Run().
|
inline |
Definition at line 245 of file Layer.hpp.
Referenced by Graph::Graph(), armnn::InsertDebugLayerAfter(), NeonBackend::OptimizeSubgraphView(), ClBackend::OptimizeSubgraphView(), ConvertFp32NetworkToFp16Impl::Run(), SquashEqualSiblingsImpl< Comparable >::Run(), and SplitterLayer::ValidateTensorShapesFromInputs().
Creates a dynamically-allocated copy of this layer.
Implemented in QLstmLayer, QuantizedLstmLayer, OutputLayer, BatchNormalizationLayer, ConcatLayer, LstmLayer, UnidirectionalSequenceLstmLayer, FullyConnectedLayer, SplitterLayer, Convolution2dLayer, DepthwiseConvolution2dLayer, TransposeConvolution2dLayer, DetectionPostProcessLayer, PreCompiledLayer, ConstantLayer, PermuteLayer, ReshapeLayer, ArgMinMaxLayer, ComparisonLayer, DepthToSpaceLayer, DivisionLayer, ElementwiseUnaryLayer, GatherLayer, LogicalBinaryLayer, LogSoftmaxLayer, MaximumLayer, MeanLayer, MinimumLayer, MultiplicationLayer, PadLayer, PreluLayer, SpaceToBatchNdLayer, SpaceToDepthLayer, StandInLayer, SubtractionLayer, TransposeLayer, AbsLayer, AdditionLayer, BatchToSpaceNdLayer, CastLayer, ConvertBf16ToFp32Layer, ConvertFp16ToFp32Layer, ConvertFp32ToBf16Layer, DebugLayer, DequantizeLayer, FakeQuantizationLayer, FloorLayer, InputLayer, InstanceNormalizationLayer, L2NormalizationLayer, MapLayer, MemCopyLayer, MemImportLayer, MergeLayer, NormalizationLayer, Pooling2dLayer, ReduceLayer, ResizeLayer, RsqrtLayer, ShapeLayer, SliceLayer, SoftmaxLayer, StackLayer, StridedSliceLayer, SwitchLayer, UnmapLayer, ActivationLayer, ConvertFp32ToFp16Layer, FillLayer, QuantizeLayer, and RankLayer.
Referenced by Graph::Graph().
Definition at line 14 of file LayerCloneBase.hpp.
References Graph::AddLayer(), Layer::GetBackendHint(), Layer::GetBackendId(), Layer::GetGuid(), and Layer::m_ShapeInferenceMethod.
|
inlineprotected |
Definition at line 358 of file Layer.hpp.
References QueueDescriptor::m_Inputs, and WorkloadInfo::m_InputTensorInfos.
|
inlineprotected |
Definition at line 365 of file Layer.hpp.
References QueueDescriptor::m_Outputs, and WorkloadInfo::m_OutputTensorInfos.
|
virtual |
Reimplemented in ConcatLayer, OutputLayer, and SplitterLayer.
Definition at line 250 of file Layer.cpp.
References ARMNN_ASSERT, OutputHandler::CreateTensorHandles(), TensorHandleFactoryRegistry::GetFactory(), Layer::GetNumOutputSlots(), Layer::GetOutputHandler(), Layer::GetOutputSlot(), OutputSlot::GetTensorHandleFactoryId(), and ITensorHandleFactory::LegacyFactoryId.
|
pure virtual |
Implemented in QLstmLayer, QuantizedLstmLayer, BatchNormalizationLayer, LstmLayer, UnidirectionalSequenceLstmLayer, FullyConnectedLayer, Convolution2dLayer, PreCompiledLayer, DepthwiseConvolution2dLayer, TransposeConvolution2dLayer, DetectionPostProcessLayer, ConstantLayer, PermuteLayer, ReshapeLayer, ArgMinMaxLayer, ComparisonLayer, DepthToSpaceLayer, DivisionLayer, ElementwiseUnaryLayer, GatherLayer, LogicalBinaryLayer, LogSoftmaxLayer, MaximumLayer, MeanLayer, MinimumLayer, MultiplicationLayer, PadLayer, PreluLayer, SpaceToBatchNdLayer, SpaceToDepthLayer, StandInLayer, SubtractionLayer, TransposeLayer, AbsLayer, AdditionLayer, BatchToSpaceNdLayer, CastLayer, ConcatLayer, ConvertBf16ToFp32Layer, ConvertFp16ToFp32Layer, ConvertFp32ToBf16Layer, DebugLayer, DequantizeLayer, FakeQuantizationLayer, FloorLayer, InputLayer, InstanceNormalizationLayer, L2NormalizationLayer, MapLayer, MemCopyLayer, MemImportLayer, MergeLayer, NormalizationLayer, OutputLayer, Pooling2dLayer, QuantizeLayer, ReduceLayer, ResizeLayer, RsqrtLayer, ShapeLayer, SliceLayer, SoftmaxLayer, SplitterLayer, StackLayer, StridedSliceLayer, SwitchLayer, UnmapLayer, ActivationLayer, ConvertFp32ToFp16Layer, FillLayer, and RankLayer.
|
inline |
Definition at line 242 of file Layer.hpp.
Referenced by armnn::InsertConvertBf16ToFp32LayersBefore(), armnn::InsertConvertFp16ToFp32LayersBefore(), armnn::InsertConvertFp32ToBf16LayersBefore(), ConvertFp32NetworkToFp16Impl::Run(), MoveTransposeUpImpl::Run(), and MovePermuteUpImpl::Run().
|
inline |
Definition at line 246 of file Layer.hpp.
Referenced by armnn::InsertDebugLayerAfter(), NeonBackend::OptimizeSubgraphView(), ClBackend::OptimizeSubgraphView(), ConvertFp32NetworkToFp16Impl::Run(), and SplitterLayer::ValidateTensorShapesFromInputs().
|
overridevirtual |
Apply a visitor to this layer.
Implements IConnectableLayer.
Reimplemented in BindableLayer, QLstmLayer, QuantizedLstmLayer, LayerWithParameters< Parameters >, LayerWithParameters< FakeQuantizationDescriptor >, LayerWithParameters< SoftmaxDescriptor >, LayerWithParameters< ReduceDescriptor >, LayerWithParameters< LogSoftmaxDescriptor >, LayerWithParameters< PreCompiledDescriptor >, LayerWithParameters< LstmDescriptor >, LayerWithParameters< BatchToSpaceNdDescriptor >, LayerWithParameters< PermuteDescriptor >, LayerWithParameters< SpaceToBatchNdDescriptor >, LayerWithParameters< DepthToSpaceDescriptor >, LayerWithParameters< ReshapeDescriptor >, LayerWithParameters< ElementwiseUnaryDescriptor >, LayerWithParameters< GatherDescriptor >, LayerWithParameters< SpaceToDepthDescriptor >, LayerWithParameters< OriginsDescriptor >, LayerWithParameters< ViewsDescriptor >, LayerWithParameters< Pooling2dDescriptor >, LayerWithParameters< Convolution2dDescriptor >, LayerWithParameters< ActivationDescriptor >, LayerWithParameters< StandInDescriptor >, LayerWithParameters< TransposeDescriptor >, LayerWithParameters< StackDescriptor >, LayerWithParameters< MeanDescriptor >, LayerWithParameters< ComparisonDescriptor >, LayerWithParameters< InstanceNormalizationDescriptor >, LayerWithParameters< TransposeConvolution2dDescriptor >, LayerWithParameters< BatchNormalizationDescriptor >, LayerWithParameters< ArgMinMaxDescriptor >, LayerWithParameters< LogicalBinaryDescriptor >, LayerWithParameters< DetectionPostProcessDescriptor >, LayerWithParameters< PadDescriptor >, LayerWithParameters< L2NormalizationDescriptor >, LayerWithParameters< FillDescriptor >, LayerWithParameters< SliceDescriptor >, LayerWithParameters< DepthwiseConvolution2dDescriptor >, LayerWithParameters< QLstmDescriptor >, LayerWithParameters< NormalizationDescriptor >, LayerWithParameters< FullyConnectedDescriptor >, LayerWithParameters< StridedSliceDescriptor >, LayerWithParameters< ResizeDescriptor >, LstmLayer, UnidirectionalSequenceLstmLayer, FullyConnectedLayer, Convolution2dLayer, DepthwiseConvolution2dLayer, TransposeConvolution2dLayer, BatchNormalizationLayer, ConstantLayer, DetectionPostProcessLayer, ShapeLayer, PreCompiledLayer, FakeQuantizationLayer, MemCopyLayer, MemImportLayer, ElementwiseBaseLayer, and RankLayer.
Definition at line 478 of file Layer.cpp.
References IStrategy::ExecuteStrategy(), and Layer::GetName().
|
inline |
Definition at line 342 of file Layer.hpp.
Referenced by NeonBackend::OptimizeSubgraphView(), and ClBackend::OptimizeSubgraphView().
Definition at line 334 of file Layer.hpp.
Referenced by Layer::CloneBase().
|
inline |
Definition at line 269 of file Layer.hpp.
Referenced by Graph::AddCompatibilityLayers(), armnn::ApplyBackendOptimizations(), armnn::AttemptBackendAssignment(), armnn::CalculateEdgeStrategy(), armnn::CalculateSlotOption(), armnn::CalculateSlotOptionForInput(), Layer::CloneBase(), LoadedNetwork::CreateWorkingMemHandle(), LoadedNetwork::GetOutputTensorInfo(), armnn::SelectTensorHandleStrategy(), and TEST_SUITE().
|
inlineprotectedvirtual |
Reimplemented in QLstmLayer, QuantizedLstmLayer, Convolution2dLayer, LstmLayer, UnidirectionalSequenceLstmLayer, DepthwiseConvolution2dLayer, FullyConnectedLayer, TransposeConvolution2dLayer, BatchNormalizationLayer, ConstantLayer, and DetectionPostProcessLayer.
Definition at line 394 of file Layer.hpp.
DataType GetDataType | ( | ) | const |
Definition at line 284 of file Layer.cpp.
References InputSlot::GetConnection(), TensorInfo::GetDataType(), Layer::GetInputSlot(), Layer::GetNumInputSlots(), Layer::GetOutputSlot(), IOutputSlot::GetTensorInfo(), and OutputSlot::GetTensorInfo().
Referenced by ConvertFp32NetworkToFp16Impl::Run(), FuseBatchNorm< ConvLayer, ArmnnType, T >::Run(), ConvertFp32NetworkToBf16Impl::Run(), IsFloat32Layer::Test(), IsFloat16Layer::Test(), IsBFloat16Layer::Test(), and TEST_SUITE().
|
inlinefinalvirtual |
Returns the unique id of the layer.
Implements IConnectableLayer.
Definition at line 322 of file Layer.hpp.
Referenced by Layer::CloneBase(), LoadedNetwork::CreateWorkingMemHandle(), DebugLayer::CreateWorkload(), LoadedNetwork::FreeWorkingMemory(), OutputSlot::GetOwningLayerGuid(), NeonBackend::OptimizeSubgraphView(), ClBackend::OptimizeSubgraphView(), SubgraphViewSelector::SelectSubgraphs(), and Graph::SerializeToDot().
|
inlineoverridevirtual |
Get a const input slot handle by slot index.
Implements IConnectableLayer.
Definition at line 316 of file Layer.hpp.
Referenced by armnn::ChainReduceLayers(), ConcatLayer::CreateWorkload(), DebugLayer::CreateWorkload(), armnn::optimizations::pad_fold::FoldPadIntoLayer2dImpl(), Layer::GetDataType(), Graph::Graph(), InputSlot::Insert(), armnn::InsertConvertBf16ToFp32LayersBefore(), armnn::InsertConvertFp16ToFp32LayersBefore(), armnn::InsertConvertFp32ToBf16LayersAfter(), armnn::InsertConvertFp32ToBf16LayersBefore(), armnn::InsertConvertFp32ToFp16LayersAfter(), armnn::InsertDebugLayerAfter(), NeonBackend::OptimizeSubgraphView(), ClBackend::OptimizeSubgraphView(), TransposeAsReshapeImpl::Run(), PermuteAsReshapeImpl::Run(), OptimizeConsecutiveReshapesImpl::Run(), OptimizeInverseConversionsImpl::Run(), PermuteAndBatchToSpaceAsDepthToSpaceImpl< PermuteType >::Run(), MovePermuteUpImpl::Run(), MoveTransposeUpImpl::Run(), OptimizeInversePermutesImpl< PermuteType >::Run(), AddBroadcastReshapeLayerImpl::Run(), FuseBatchNorm< ConvLayer, ArmnnType, T >::Run(), DepthwiseConvolution2dLayer::SerializeLayerParameters(), Convolution2dLayer::SerializeLayerParameters(), TEST_SUITE(), ElementwiseBaseLayer::ValidateTensorShapesFromInputs(), QuantizeLayer::ValidateTensorShapesFromInputs(), ActivationLayer::ValidateTensorShapesFromInputs(), ConvertFp32ToFp16Layer::ValidateTensorShapesFromInputs(), ReduceLayer::ValidateTensorShapesFromInputs(), FillLayer::ValidateTensorShapesFromInputs(), MemCopyLayer::ValidateTensorShapesFromInputs(), BatchToSpaceNdLayer::ValidateTensorShapesFromInputs(), CastLayer::ValidateTensorShapesFromInputs(), L2NormalizationLayer::ValidateTensorShapesFromInputs(), DebugLayer::ValidateTensorShapesFromInputs(), InstanceNormalizationLayer::ValidateTensorShapesFromInputs(), MemImportLayer::ValidateTensorShapesFromInputs(), ConvertFp32ToBf16Layer::ValidateTensorShapesFromInputs(), AbsLayer::ValidateTensorShapesFromInputs(), NormalizationLayer::ValidateTensorShapesFromInputs(), Pooling2dLayer::ValidateTensorShapesFromInputs(), SoftmaxLayer::ValidateTensorShapesFromInputs(), DequantizeLayer::ValidateTensorShapesFromInputs(), StackLayer::ValidateTensorShapesFromInputs(), MergeLayer::ValidateTensorShapesFromInputs(), ResizeLayer::ValidateTensorShapesFromInputs(), RsqrtLayer::ValidateTensorShapesFromInputs(), ShapeLayer::ValidateTensorShapesFromInputs(), ConvertBf16ToFp32Layer::ValidateTensorShapesFromInputs(), SliceLayer::ValidateTensorShapesFromInputs(), FakeQuantizationLayer::ValidateTensorShapesFromInputs(), ConvertFp16ToFp32Layer::ValidateTensorShapesFromInputs(), FloorLayer::ValidateTensorShapesFromInputs(), SwitchLayer::ValidateTensorShapesFromInputs(), TransposeLayer::ValidateTensorShapesFromInputs(), GatherLayer::ValidateTensorShapesFromInputs(), MeanLayer::ValidateTensorShapesFromInputs(), LogSoftmaxLayer::ValidateTensorShapesFromInputs(), PadLayer::ValidateTensorShapesFromInputs(), ReshapeLayer::ValidateTensorShapesFromInputs(), PermuteLayer::ValidateTensorShapesFromInputs(), StridedSliceLayer::ValidateTensorShapesFromInputs(), ArgMinMaxLayer::ValidateTensorShapesFromInputs(), ElementwiseUnaryLayer::ValidateTensorShapesFromInputs(), PreluLayer::ValidateTensorShapesFromInputs(), SpaceToDepthLayer::ValidateTensorShapesFromInputs(), LogicalBinaryLayer::ValidateTensorShapesFromInputs(), DepthToSpaceLayer::ValidateTensorShapesFromInputs(), TransposeConvolution2dLayer::ValidateTensorShapesFromInputs(), ComparisonLayer::ValidateTensorShapesFromInputs(), DepthwiseConvolution2dLayer::ValidateTensorShapesFromInputs(), SpaceToBatchNdLayer::ValidateTensorShapesFromInputs(), Convolution2dLayer::ValidateTensorShapesFromInputs(), FullyConnectedLayer::ValidateTensorShapesFromInputs(), ConcatLayer::ValidateTensorShapesFromInputs(), LstmLayer::ValidateTensorShapesFromInputs(), UnidirectionalSequenceLstmLayer::ValidateTensorShapesFromInputs(), BatchNormalizationLayer::ValidateTensorShapesFromInputs(), OutputLayer::ValidateTensorShapesFromInputs(), QuantizedLstmLayer::ValidateTensorShapesFromInputs(), QLstmLayer::ValidateTensorShapesFromInputs(), and Layer::VerifyLayerConnections().
|
inlineoverridevirtual |
Get the input slot handle by slot index.
Implements IConnectableLayer.
|
inline |
Definition at line 237 of file Layer.hpp.
Referenced by armnn::AttemptBackendAssignment(), armnn::CalculateSlotOption(), LoadedNetwork::CreateWorkingMemHandle(), SplitterLayer::CreateWorkload(), LoadedNetwork::EnqueueWorkload(), armnn::ForEachLayerInput(), LoadedNetwork::FreeWorkingMemory(), Layer::GetPriority(), Layer::Layer(), ConvertFp32NetworkToFp16Impl::Run(), and TEST_SUITE().
|
inlineoverridevirtual |
Returns the name of the layer.
Implements IConnectableLayer.
Definition at line 311 of file Layer.hpp.
Referenced by RankLayer::Accept(), AdditionLayer::Accept(), QuantizeLayer::Accept(), DivisionLayer::Accept(), MaximumLayer::Accept(), SubtractionLayer::Accept(), MinimumLayer::Accept(), MultiplicationLayer::Accept(), ActivationLayer::Accept(), FillLayer::Accept(), ReduceLayer::Accept(), SwitchLayer::Accept(), DequantizeLayer::Accept(), NormalizationLayer::Accept(), AbsLayer::Accept(), FloorLayer::Accept(), InputLayer::Accept(), RsqrtLayer::Accept(), InstanceNormalizationLayer::Accept(), SoftmaxLayer::Accept(), L2NormalizationLayer::Accept(), LogSoftmaxLayer::Accept(), MeanLayer::Accept(), GatherLayer::Accept(), MergeLayer::Accept(), StackLayer::Accept(), StridedSliceLayer::Accept(), ArgMinMaxLayer::Accept(), DetectionPostProcessLayer::Accept(), ElementwiseUnaryLayer::Accept(), Pooling2dLayer::Accept(), ResizeLayer::Accept(), BatchToSpaceNdLayer::Accept(), SliceLayer::Accept(), LogicalBinaryLayer::Accept(), DepthToSpaceLayer::Accept(), ComparisonLayer::Accept(), PadLayer::Accept(), PreluLayer::Accept(), SpaceToBatchNdLayer::Accept(), SpaceToDepthLayer::Accept(), StandInLayer::Accept(), ConstantLayer::Accept(), BatchNormalizationLayer::Accept(), TransposeConvolution2dLayer::Accept(), OutputLayer::Accept(), DepthwiseConvolution2dLayer::Accept(), Convolution2dLayer::Accept(), SplitterLayer::Accept(), FullyConnectedLayer::Accept(), LstmLayer::Accept(), ConcatLayer::Accept(), ReshapeLayer::Accept(), TransposeLayer::Accept(), PermuteLayer::Accept(), QuantizedLstmLayer::Accept(), QLstmLayer::Accept(), Graph::AddCompatibilityLayers(), RankLayer::Clone(), QuantizeLayer::Clone(), ActivationLayer::Clone(), FillLayer::Clone(), ConvertFp32ToFp16Layer::Clone(), StackLayer::Clone(), CastLayer::Clone(), StridedSliceLayer::Clone(), SwitchLayer::Clone(), MapLayer::Clone(), UnmapLayer::Clone(), DequantizeLayer::Clone(), MemCopyLayer::Clone(), MemImportLayer::Clone(), MergeLayer::Clone(), NormalizationLayer::Clone(), Pooling2dLayer::Clone(), AbsLayer::Clone(), FakeQuantizationLayer::Clone(), ConvertBf16ToFp32Layer::Clone(), ConvertFp16ToFp32Layer::Clone(), FloorLayer::Clone(), ConvertFp32ToBf16Layer::Clone(), ReduceLayer::Clone(), SliceLayer::Clone(), ResizeLayer::Clone(), RsqrtLayer::Clone(), InputLayer::Clone(), ShapeLayer::Clone(), BatchToSpaceNdLayer::Clone(), AdditionLayer::Clone(), SoftmaxLayer::Clone(), InstanceNormalizationLayer::Clone(), L2NormalizationLayer::Clone(), DebugLayer::Clone(), LogicalBinaryLayer::Clone(), DepthToSpaceLayer::Clone(), StandInLayer::Clone(), GatherLayer::Clone(), LogSoftmaxLayer::Clone(), MaximumLayer::Clone(), ArgMinMaxLayer::Clone(), MeanLayer::Clone(), MinimumLayer::Clone(), MultiplicationLayer::Clone(), ComparisonLayer::Clone(), DivisionLayer::Clone(), PadLayer::Clone(), SubtractionLayer::Clone(), ElementwiseUnaryLayer::Clone(), PreluLayer::Clone(), TransposeLayer::Clone(), SpaceToBatchNdLayer::Clone(), SpaceToDepthLayer::Clone(), ConstantLayer::Clone(), PermuteLayer::Clone(), ReshapeLayer::Clone(), DetectionPostProcessLayer::Clone(), PreCompiledLayer::Clone(), TransposeConvolution2dLayer::Clone(), DepthwiseConvolution2dLayer::Clone(), Convolution2dLayer::Clone(), SplitterLayer::Clone(), FullyConnectedLayer::Clone(), UnidirectionalSequenceLstmLayer::Clone(), ConcatLayer::Clone(), LstmLayer::Clone(), BatchNormalizationLayer::Clone(), OutputLayer::Clone(), QuantizedLstmLayer::Clone(), QLstmLayer::Clone(), RankLayer::ExecuteStrategy(), ElementwiseBaseLayer::ExecuteStrategy(), ShapeLayer::ExecuteStrategy(), DetectionPostProcessLayer::ExecuteStrategy(), BatchNormalizationLayer::ExecuteStrategy(), ConstantLayer::ExecuteStrategy(), TransposeConvolution2dLayer::ExecuteStrategy(), DepthwiseConvolution2dLayer::ExecuteStrategy(), Convolution2dLayer::ExecuteStrategy(), FullyConnectedLayer::ExecuteStrategy(), LstmLayer::ExecuteStrategy(), UnidirectionalSequenceLstmLayer::ExecuteStrategy(), LayerWithParameters< ResizeDescriptor >::ExecuteStrategy(), QuantizedLstmLayer::ExecuteStrategy(), QLstmLayer::ExecuteStrategy(), Layer::ExecuteStrategy(), armnn::optimizations::pad_fold::FoldPadIntoLayer2dImpl(), ElementwiseBaseLayer::InferOutputShapes(), armnn::InsertConvertBf16ToFp32LayersBefore(), armnn::InsertConvertFp16ToFp32LayersBefore(), armnn::InsertConvertFp32ToBf16LayersAfter(), armnn::InsertConvertFp32ToBf16LayersBefore(), armnn::InsertConvertFp32ToFp16LayersAfter(), NeonBackend::OptimizeSubgraphView(), ClBackend::OptimizeSubgraphView(), PermuteAsReshapeImpl::Run(), TransposeAsReshapeImpl::Run(), OptimizeConsecutiveReshapesImpl::Run(), PermuteAndBatchToSpaceAsDepthToSpaceImpl< PermuteType >::Run(), FuseBatchNorm< ConvLayer, ArmnnType, T >::Run(), TEST_SUITE(), and ErasedLayerNamesObservable::Update().
|
inline |
Definition at line 220 of file Layer.hpp.
Referenced by armnn::CheckScaleSetOnQuantizedType(), DebugLayer::CreateWorkload(), LoadedNetwork::GetOutputTensorInfo(), Layer::InferOutputShapes(), armnn::InsertDebugLayerAfter(), IsConnected(), AddBroadcastReshapeLayerImpl::Run(), TEST_SUITE(), and Layer::VerifyLayerConnections().
|
inlineoverridevirtual |
Returns the number of connectable input slots.
Implements IConnectableLayer.
Definition at line 313 of file Layer.hpp.
Referenced by CheckNumberOfInputSlot(), ConcatLayer::CreateWorkload(), LoadedNetwork::EnqueueWorkload(), LoadedNetwork::FreeWorkingMemory(), Layer::GetDataType(), Layer::InferOutputShapes(), InputSlot::Insert(), armnn::InsertConvertBf16ToFp32LayersBefore(), armnn::InsertConvertFp16ToFp32LayersBefore(), armnn::InsertConvertFp32ToBf16LayersBefore(), StackLayer::ValidateTensorShapesFromInputs(), ConcatLayer::ValidateTensorShapesFromInputs(), and Layer::VerifyLayerConnections().
|
inlineoverridevirtual |
Returns the number of connectable output slots.
Implements IConnectableLayer.
Definition at line 314 of file Layer.hpp.
Referenced by OutputSlot::CalculateIndexOnOwner(), CheckNumberOfOutputSlot(), armnn::CheckScaleSetOnQuantizedType(), Layer::CreateTensorHandles(), LoadedNetwork::CreateWorkingMemHandle(), SplitterLayer::CreateWorkload(), LoadedNetwork::EnqueueWorkload(), Layer::InferOutputShapes(), InputSlot::Insert(), armnn::InsertConvertFp32ToBf16LayersAfter(), armnn::InsertConvertFp32ToFp16LayersAfter(), armnn::InsertDebugLayerAfter(), armnn::SelectTensorHandleStrategy(), TEST_SUITE(), UnmapLayer::ValidateTensorShapesFromInputs(), MapLayer::ValidateTensorShapesFromInputs(), SwitchLayer::ValidateTensorShapesFromInputs(), and DetectionPostProcessLayer::ValidateTensorShapesFromInputs().
|
inline |
Definition at line 225 of file Layer.hpp.
Referenced by Layer::CreateTensorHandles(), ConcatLayer::CreateWorkload(), LoadedNetwork::EnqueueWorkload(), InputSlot::Insert(), PermuteAsReshapeImpl::Run(), TransposeAsReshapeImpl::Run(), OptimizeConsecutiveReshapesImpl::Run(), MoveTransposeUpImpl::Run(), MovePermuteUpImpl::Run(), TEST_SUITE(), and InputLayer::ValidateTensorShapesFromInputs().
|
inline |
Definition at line 230 of file Layer.hpp.
|
inlineoverridevirtual |
Get the const output slot handle by slot index.
Implements IConnectableLayer.
Definition at line 318 of file Layer.hpp.
Referenced by Graph::AddCompatibilityLayers(), NetworkImpl::AddFullyConnectedLayer(), armnn::AttemptBackendAssignment(), OutputSlot::CalculateIndexOnOwner(), armnn::ChainReduceLayers(), armnn::CheckScaleSetOnQuantizedType(), SplitterLayer::CreateTensorHandles(), ConcatLayer::CreateTensorHandles(), Layer::CreateTensorHandles(), CreateTestNetwork(), ConcatLayer::CreateWorkload(), SplitterLayer::CreateWorkload(), armnn::optimizations::pad_fold::FoldPadIntoLayer2dImpl(), Layer::GetDataType(), InputSlot::Insert(), armnn::InsertConvertBf16ToFp32LayersBefore(), armnn::InsertConvertFp16ToFp32LayersBefore(), armnn::InsertConvertFp32ToBf16LayersAfter(), armnn::InsertConvertFp32ToBf16LayersBefore(), armnn::InsertConvertFp32ToFp16LayersAfter(), armnn::InsertDebugLayerAfter(), IsConnected(), PermuteAsReshapeImpl::Run(), TransposeAsReshapeImpl::Run(), OptimizeConsecutiveReshapesImpl::Run(), OptimizeInverseConversionsImpl::Run(), PermuteAndBatchToSpaceAsDepthToSpaceImpl< PermuteType >::Run(), OptimizeInversePermutesImpl< PermuteType >::Run(), MovePermuteUpImpl::Run(), MoveTransposeUpImpl::Run(), FuseBatchNorm< ConvLayer, ArmnnType, T >::Run(), AddBroadcastReshapeLayerImpl::Run(), armnn::SelectTensorHandleStrategy(), TEST_SUITE(), Layer::ValidateAndCopyShape(), ElementwiseBaseLayer::ValidateTensorShapesFromInputs(), RankLayer::ValidateTensorShapesFromInputs(), QuantizeLayer::ValidateTensorShapesFromInputs(), ActivationLayer::ValidateTensorShapesFromInputs(), ConvertFp32ToFp16Layer::ValidateTensorShapesFromInputs(), ReduceLayer::ValidateTensorShapesFromInputs(), FillLayer::ValidateTensorShapesFromInputs(), ShapeLayer::ValidateTensorShapesFromInputs(), DebugLayer::ValidateTensorShapesFromInputs(), FloorLayer::ValidateTensorShapesFromInputs(), StackLayer::ValidateTensorShapesFromInputs(), SwitchLayer::ValidateTensorShapesFromInputs(), InstanceNormalizationLayer::ValidateTensorShapesFromInputs(), ConvertBf16ToFp32Layer::ValidateTensorShapesFromInputs(), ConvertFp16ToFp32Layer::ValidateTensorShapesFromInputs(), MemCopyLayer::ValidateTensorShapesFromInputs(), L2NormalizationLayer::ValidateTensorShapesFromInputs(), MemImportLayer::ValidateTensorShapesFromInputs(), BatchToSpaceNdLayer::ValidateTensorShapesFromInputs(), Pooling2dLayer::ValidateTensorShapesFromInputs(), SoftmaxLayer::ValidateTensorShapesFromInputs(), CastLayer::ValidateTensorShapesFromInputs(), ConvertFp32ToBf16Layer::ValidateTensorShapesFromInputs(), DequantizeLayer::ValidateTensorShapesFromInputs(), ResizeLayer::ValidateTensorShapesFromInputs(), RsqrtLayer::ValidateTensorShapesFromInputs(), MergeLayer::ValidateTensorShapesFromInputs(), AbsLayer::ValidateTensorShapesFromInputs(), SliceLayer::ValidateTensorShapesFromInputs(), FakeQuantizationLayer::ValidateTensorShapesFromInputs(), NormalizationLayer::ValidateTensorShapesFromInputs(), TransposeLayer::ValidateTensorShapesFromInputs(), GatherLayer::ValidateTensorShapesFromInputs(), LogSoftmaxLayer::ValidateTensorShapesFromInputs(), MeanLayer::ValidateTensorShapesFromInputs(), PadLayer::ValidateTensorShapesFromInputs(), PermuteLayer::ValidateTensorShapesFromInputs(), ConstantLayer::ValidateTensorShapesFromInputs(), ReshapeLayer::ValidateTensorShapesFromInputs(), DetectionPostProcessLayer::ValidateTensorShapesFromInputs(), ArgMinMaxLayer::ValidateTensorShapesFromInputs(), ElementwiseUnaryLayer::ValidateTensorShapesFromInputs(), StridedSliceLayer::ValidateTensorShapesFromInputs(), LogicalBinaryLayer::ValidateTensorShapesFromInputs(), PreluLayer::ValidateTensorShapesFromInputs(), DepthwiseConvolution2dLayer::ValidateTensorShapesFromInputs(), SpaceToBatchNdLayer::ValidateTensorShapesFromInputs(), TransposeConvolution2dLayer::ValidateTensorShapesFromInputs(), DepthToSpaceLayer::ValidateTensorShapesFromInputs(), SpaceToDepthLayer::ValidateTensorShapesFromInputs(), ComparisonLayer::ValidateTensorShapesFromInputs(), Convolution2dLayer::ValidateTensorShapesFromInputs(), SplitterLayer::ValidateTensorShapesFromInputs(), FullyConnectedLayer::ValidateTensorShapesFromInputs(), UnidirectionalSequenceLstmLayer::ValidateTensorShapesFromInputs(), LstmLayer::ValidateTensorShapesFromInputs(), ConcatLayer::ValidateTensorShapesFromInputs(), BatchNormalizationLayer::ValidateTensorShapesFromInputs(), QuantizedLstmLayer::ValidateTensorShapesFromInputs(), and QLstmLayer::ValidateTensorShapesFromInputs().
|
inlineoverridevirtual |
Get the output slot handle by slot index.
Implements IConnectableLayer.
|
inline |
Definition at line 238 of file Layer.hpp.
Referenced by Graph::AddCompatibilityLayers(), LoadedNetwork::CreateWorkingMemHandle(), armnn::ForEachLayerOutput(), and Graph::Print().
LayerPriority GetPriority | ( | ) | const |
Definition at line 299 of file Layer.cpp.
References Layer::GetInputSlots(), OutputSlot::GetOwningLayer(), Layer::GetPriority(), Layer::GetType(), armnn::Input, and armnn::Output.
Referenced by Layer::GetPriority(), and SquashEqualSiblingsImpl< Comparable >::Run().
|
inline |
Definition at line 326 of file Layer.hpp.
Referenced by ErasedLayerNamesObservable::Update().
|
inline |
Definition at line 235 of file Layer.hpp.
|
inlineoverridevirtual |
Returns the armnn::LayerType of this layer.
Implements IConnectableLayer.
Definition at line 265 of file Layer.hpp.
Referenced by armnn::ApplyBackendOptimizations(), armnn::AttemptBackendAssignment(), armnn::CalculateEdgeStrategy(), armnn::CalculateSlotOption(), armnn::CalculateSlotOptionForInput(), armnn::CheckScaleSetOnQuantizedType(), LoadedNetwork::CreateWorkingMemHandle(), ConcatLayer::CreateWorkload(), SplitterLayer::CreateWorkload(), LoadedNetwork::EnqueueWorkload(), LoadedNetwork::FreeWorkingMemory(), Layer::GetPriority(), ElementwiseBaseLayer::InferOutputShapes(), Layer::InferOutputShapes(), ReshapeLayer::IsEqual(), TransposeLayer::IsEqual(), PermuteLayer::IsEqual(), TransposeLayer::IsInverse(), PermuteLayer::IsInverse(), IsLayerOfType(), NeonBackend::OptimizeSubgraphView(), ClBackend::OptimizeSubgraphView(), MockBackend::OptimizeSubgraphView(), armnn::ReturnWithError(), ConvertFp32NetworkToFp16Impl::Run(), OptimizeConsecutiveReshapesImpl::Run(), AddDebugImpl::Run(), PermuteAndBatchToSpaceAsDepthToSpaceImpl< PermuteType >::Run(), OptimizeInverseConversionsImpl::Run(), RedirectMembersToConstantInputsImpl::Run(), MoveTransposeUpImpl::Run(), MovePermuteUpImpl::Run(), AddBroadcastReshapeLayerImpl::Run(), FuseBatchNorm< ConvLayer, ArmnnType, T >::Run(), OptimizeForTypeImpl< BaseType, OptimizeForConnectionImpl< BaseType, ChildType, Wrapped > >::Run(), ConvertFp32NetworkToBf16Impl::Run(), armnn::SelectTensorHandleStrategy(), TEST_SUITE(), ElementwiseBaseLayer::ValidateTensorShapesFromInputs(), ElementwiseUnaryLayer::ValidateTensorShapesFromInputs(), and Layer::VerifyLayerConnections().
|
overridevirtual |
Infer the shape of the output(s) based on the provided input shape(s)
Implements IConnectableLayer.
Reimplemented in QLstmLayer, QuantizedLstmLayer, ConcatLayer, LstmLayer, UnidirectionalSequenceLstmLayer, FullyConnectedLayer, SplitterLayer, Convolution2dLayer, DepthwiseConvolution2dLayer, TransposeConvolution2dLayer, ConstantLayer, PermuteLayer, ReshapeLayer, PadLayer, StandInLayer, BatchToSpaceNdLayer, Pooling2dLayer, ResizeLayer, ShapeLayer, SliceLayer, StackLayer, TransposeLayer, MergeLayer, ComparisonLayer, DepthToSpaceLayer, LogicalBinaryLayer, PreluLayer, SpaceToBatchNdLayer, SpaceToDepthLayer, ArgMinMaxLayer, ElementwiseUnaryLayer, StridedSliceLayer, and ElementwiseBaseLayer.
Definition at line 368 of file Layer.cpp.
References ARMNN_ASSERT, CHECK_LOCATION, armnn::GetLayerTypeAsCString(), Layer::GetNameStr(), Layer::GetNumInputSlots(), Layer::GetNumOutputSlots(), and Layer::GetType().
Referenced by QuantizeLayer::ValidateTensorShapesFromInputs(), ActivationLayer::ValidateTensorShapesFromInputs(), ConvertFp32ToFp16Layer::ValidateTensorShapesFromInputs(), FillLayer::ValidateTensorShapesFromInputs(), DequantizeLayer::ValidateTensorShapesFromInputs(), NormalizationLayer::ValidateTensorShapesFromInputs(), MemImportLayer::ValidateTensorShapesFromInputs(), MemCopyLayer::ValidateTensorShapesFromInputs(), SoftmaxLayer::ValidateTensorShapesFromInputs(), L2NormalizationLayer::ValidateTensorShapesFromInputs(), InstanceNormalizationLayer::ValidateTensorShapesFromInputs(), FloorLayer::ValidateTensorShapesFromInputs(), AbsLayer::ValidateTensorShapesFromInputs(), FakeQuantizationLayer::ValidateTensorShapesFromInputs(), ConvertBf16ToFp32Layer::ValidateTensorShapesFromInputs(), CastLayer::ValidateTensorShapesFromInputs(), DebugLayer::ValidateTensorShapesFromInputs(), ConvertFp32ToBf16Layer::ValidateTensorShapesFromInputs(), ConvertFp16ToFp32Layer::ValidateTensorShapesFromInputs(), SwitchLayer::ValidateTensorShapesFromInputs(), RsqrtLayer::ValidateTensorShapesFromInputs(), LogSoftmaxLayer::ValidateTensorShapesFromInputs(), and BatchNormalizationLayer::ValidateTensorShapesFromInputs().
|
inline |
Definition at line 249 of file Layer.hpp.
Referenced by OptimizeForConnectionImpl< BaseType, ChildType, Wrapped >::Run(), and OptimizeForExclusiveConnectionImpl< BaseType, ChildType, Wrapped >::Run().
|
inline |
Definition at line 298 of file Layer.hpp.
Referenced by Layer::ReleaseConstantData(), and ConvertConstants< Converter, Predicate >::Run().
|
inlineprotected |
Helper function to reduce duplication in *LayerCreateWorkload.
Definition at line 381 of file Layer.hpp.
References armnn::info.
Referenced by ConvertFp32ToFp16Layer::CreateWorkload(), RankLayer::CreateWorkload(), UnmapLayer::CreateWorkload(), AdditionLayer::CreateWorkload(), ShapeLayer::CreateWorkload(), RsqrtLayer::CreateWorkload(), QuantizeLayer::CreateWorkload(), MemCopyLayer::CreateWorkload(), MemImportLayer::CreateWorkload(), DebugLayer::CreateWorkload(), AbsLayer::CreateWorkload(), DequantizeLayer::CreateWorkload(), ConvertBf16ToFp32Layer::CreateWorkload(), CastLayer::CreateWorkload(), ConvertFp16ToFp32Layer::CreateWorkload(), MapLayer::CreateWorkload(), FloorLayer::CreateWorkload(), SwitchLayer::CreateWorkload(), ConvertFp32ToBf16Layer::CreateWorkload(), PreluLayer::CreateWorkload(), SubtractionLayer::CreateWorkload(), DivisionLayer::CreateWorkload(), MinimumLayer::CreateWorkload(), MaximumLayer::CreateWorkload(), MultiplicationLayer::CreateWorkload(), ConstantLayer::CreateWorkload(), QuantizedLstmLayer::CreateWorkload(), and LayerWithParameters< ResizeDescriptor >::PrepInfoAndDesc().
|
virtual |
Reimplemented in ConstantLayer.
Definition at line 275 of file Layer.cpp.
References Layer::OperateOnConstantTensors().
Referenced by TEST_SUITE().
Referenced by Graph::operator=(), and Graph::SubstituteSubgraph().
void ResetPriority | ( | ) | const |
|
virtual |
Helper to serialize the layer parameters to string.
(currently used in DotSerializer and company).
Reimplemented in Convolution2dLayer, DepthwiseConvolution2dLayer, LayerWithParameters< Parameters >, LayerWithParameters< FakeQuantizationDescriptor >, LayerWithParameters< SoftmaxDescriptor >, LayerWithParameters< ReduceDescriptor >, LayerWithParameters< LogSoftmaxDescriptor >, LayerWithParameters< PreCompiledDescriptor >, LayerWithParameters< LstmDescriptor >, LayerWithParameters< BatchToSpaceNdDescriptor >, LayerWithParameters< PermuteDescriptor >, LayerWithParameters< SpaceToBatchNdDescriptor >, LayerWithParameters< DepthToSpaceDescriptor >, LayerWithParameters< ReshapeDescriptor >, LayerWithParameters< ElementwiseUnaryDescriptor >, LayerWithParameters< GatherDescriptor >, LayerWithParameters< SpaceToDepthDescriptor >, LayerWithParameters< OriginsDescriptor >, LayerWithParameters< ViewsDescriptor >, LayerWithParameters< Pooling2dDescriptor >, LayerWithParameters< Convolution2dDescriptor >, LayerWithParameters< ActivationDescriptor >, LayerWithParameters< StandInDescriptor >, LayerWithParameters< TransposeDescriptor >, LayerWithParameters< StackDescriptor >, LayerWithParameters< MeanDescriptor >, LayerWithParameters< ComparisonDescriptor >, LayerWithParameters< InstanceNormalizationDescriptor >, LayerWithParameters< TransposeConvolution2dDescriptor >, LayerWithParameters< BatchNormalizationDescriptor >, LayerWithParameters< ArgMinMaxDescriptor >, LayerWithParameters< LogicalBinaryDescriptor >, LayerWithParameters< DetectionPostProcessDescriptor >, LayerWithParameters< PadDescriptor >, LayerWithParameters< L2NormalizationDescriptor >, LayerWithParameters< FillDescriptor >, LayerWithParameters< SliceDescriptor >, LayerWithParameters< DepthwiseConvolution2dDescriptor >, LayerWithParameters< QLstmDescriptor >, LayerWithParameters< NormalizationDescriptor >, LayerWithParameters< FullyConnectedDescriptor >, LayerWithParameters< StridedSliceDescriptor >, and LayerWithParameters< ResizeDescriptor >.
Definition at line 447 of file Layer.cpp.
References armnn::GetLayerTypeAsCString(), and StringifyLayerParameters< LayerParameter >::Serialize().
Referenced by LayerWithParameters< ResizeDescriptor >::SerializeLayerParameters().
|
protected |
Definition at line 245 of file Layer.cpp.
References QueueDescriptor::m_AdditionalInfoObject, and Layer::m_AdditionalInfoObject.
Referenced by ActivationLayer::CreateWorkload(), FillLayer::CreateWorkload(), RankLayer::CreateWorkload(), ConvertFp32ToFp16Layer::CreateWorkload(), ConcatLayer::CreateWorkload(), DebugLayer::CreateWorkload(), UnmapLayer::CreateWorkload(), StridedSliceLayer::CreateWorkload(), MemCopyLayer::CreateWorkload(), SplitterLayer::CreateWorkload(), MemImportLayer::CreateWorkload(), DequantizeLayer::CreateWorkload(), SoftmaxLayer::CreateWorkload(), SliceLayer::CreateWorkload(), NormalizationLayer::CreateWorkload(), RsqrtLayer::CreateWorkload(), Pooling2dLayer::CreateWorkload(), AbsLayer::CreateWorkload(), ConvertBf16ToFp32Layer::CreateWorkload(), QuantizeLayer::CreateWorkload(), FakeQuantizationLayer::CreateWorkload(), BatchToSpaceNdLayer::CreateWorkload(), ConvertFp16ToFp32Layer::CreateWorkload(), FloorLayer::CreateWorkload(), ReduceLayer::CreateWorkload(), ResizeLayer::CreateWorkload(), ConvertFp32ToBf16Layer::CreateWorkload(), ShapeLayer::CreateWorkload(), InstanceNormalizationLayer::CreateWorkload(), AdditionLayer::CreateWorkload(), CastLayer::CreateWorkload(), L2NormalizationLayer::CreateWorkload(), StackLayer::CreateWorkload(), MapLayer::CreateWorkload(), SwitchLayer::CreateWorkload(), TransposeLayer::CreateWorkload(), SpaceToBatchNdLayer::CreateWorkload(), ComparisonLayer::CreateWorkload(), MeanLayer::CreateWorkload(), SubtractionLayer::CreateWorkload(), SpaceToDepthLayer::CreateWorkload(), MinimumLayer::CreateWorkload(), LogSoftmaxLayer::CreateWorkload(), MaximumLayer::CreateWorkload(), DivisionLayer::CreateWorkload(), PreluLayer::CreateWorkload(), GatherLayer::CreateWorkload(), PadLayer::CreateWorkload(), ArgMinMaxLayer::CreateWorkload(), MultiplicationLayer::CreateWorkload(), DepthToSpaceLayer::CreateWorkload(), ReshapeLayer::CreateWorkload(), PermuteLayer::CreateWorkload(), ConstantLayer::CreateWorkload(), DetectionPostProcessLayer::CreateWorkload(), TransposeConvolution2dLayer::CreateWorkload(), DepthwiseConvolution2dLayer::CreateWorkload(), Convolution2dLayer::CreateWorkload(), PreCompiledLayer::CreateWorkload(), FullyConnectedLayer::CreateWorkload(), LstmLayer::CreateWorkload(), UnidirectionalSequenceLstmLayer::CreateWorkload(), BatchNormalizationLayer::CreateWorkload(), QuantizedLstmLayer::CreateWorkload(), and QLstmLayer::CreateWorkload().
|
inline |
Definition at line 347 of file Layer.hpp.
|
inline |
Definition at line 270 of file Layer.hpp.
References CreateWorkload().
Referenced by armnn::AttemptBackendAssignment(), armnn::InsertDebugLayerAfter(), MockBackend::OptimizeSubgraphView(), and TEST_SUITE().
|
inline |
|
inline |
Definition at line 336 of file Layer.hpp.
|
protected |
Definition at line 393 of file Layer.cpp.
References TensorShape::GetDimensionality(), TensorShape::GetDimensionSpecificity(), TensorShape::GetNumDimensions(), Layer::GetOutputSlot(), OutputSlot::GetTensorInfo(), armnn::info, OutputSlot::SetTensorInfo(), armnn::Specified, and armnn::ValidateOnly.
Referenced by ElementwiseBaseLayer::ValidateTensorShapesFromInputs(), RankLayer::ValidateTensorShapesFromInputs(), QuantizeLayer::ValidateTensorShapesFromInputs(), ActivationLayer::ValidateTensorShapesFromInputs(), ConvertFp32ToFp16Layer::ValidateTensorShapesFromInputs(), ReduceLayer::ValidateTensorShapesFromInputs(), DequantizeLayer::ValidateTensorShapesFromInputs(), MergeLayer::ValidateTensorShapesFromInputs(), NormalizationLayer::ValidateTensorShapesFromInputs(), ConvertBf16ToFp32Layer::ValidateTensorShapesFromInputs(), ConvertFp16ToFp32Layer::ValidateTensorShapesFromInputs(), SliceLayer::ValidateTensorShapesFromInputs(), Pooling2dLayer::ValidateTensorShapesFromInputs(), RsqrtLayer::ValidateTensorShapesFromInputs(), AbsLayer::ValidateTensorShapesFromInputs(), FakeQuantizationLayer::ValidateTensorShapesFromInputs(), ConvertFp32ToBf16Layer::ValidateTensorShapesFromInputs(), FloorLayer::ValidateTensorShapesFromInputs(), BatchToSpaceNdLayer::ValidateTensorShapesFromInputs(), ResizeLayer::ValidateTensorShapesFromInputs(), ShapeLayer::ValidateTensorShapesFromInputs(), CastLayer::ValidateTensorShapesFromInputs(), DebugLayer::ValidateTensorShapesFromInputs(), InstanceNormalizationLayer::ValidateTensorShapesFromInputs(), SoftmaxLayer::ValidateTensorShapesFromInputs(), L2NormalizationLayer::ValidateTensorShapesFromInputs(), StackLayer::ValidateTensorShapesFromInputs(), SwitchLayer::ValidateTensorShapesFromInputs(), MemCopyLayer::ValidateTensorShapesFromInputs(), MemImportLayer::ValidateTensorShapesFromInputs(), PadLayer::ValidateTensorShapesFromInputs(), GatherLayer::ValidateTensorShapesFromInputs(), LogSoftmaxLayer::ValidateTensorShapesFromInputs(), TransposeLayer::ValidateTensorShapesFromInputs(), MeanLayer::ValidateTensorShapesFromInputs(), PermuteLayer::ValidateTensorShapesFromInputs(), ReshapeLayer::ValidateTensorShapesFromInputs(), StridedSliceLayer::ValidateTensorShapesFromInputs(), DetectionPostProcessLayer::ValidateTensorShapesFromInputs(), ElementwiseUnaryLayer::ValidateTensorShapesFromInputs(), ArgMinMaxLayer::ValidateTensorShapesFromInputs(), TransposeConvolution2dLayer::ValidateTensorShapesFromInputs(), SpaceToDepthLayer::ValidateTensorShapesFromInputs(), SpaceToBatchNdLayer::ValidateTensorShapesFromInputs(), ComparisonLayer::ValidateTensorShapesFromInputs(), PreluLayer::ValidateTensorShapesFromInputs(), DepthToSpaceLayer::ValidateTensorShapesFromInputs(), LogicalBinaryLayer::ValidateTensorShapesFromInputs(), DepthwiseConvolution2dLayer::ValidateTensorShapesFromInputs(), Convolution2dLayer::ValidateTensorShapesFromInputs(), SplitterLayer::ValidateTensorShapesFromInputs(), FullyConnectedLayer::ValidateTensorShapesFromInputs(), LstmLayer::ValidateTensorShapesFromInputs(), UnidirectionalSequenceLstmLayer::ValidateTensorShapesFromInputs(), BatchNormalizationLayer::ValidateTensorShapesFromInputs(), QuantizedLstmLayer::ValidateTensorShapesFromInputs(), and QLstmLayer::ValidateTensorShapesFromInputs().
|
pure virtual |
Implemented in QLstmLayer, QuantizedLstmLayer, OutputLayer, BatchNormalizationLayer, ConcatLayer, LstmLayer, UnidirectionalSequenceLstmLayer, FullyConnectedLayer, SplitterLayer, Convolution2dLayer, ComparisonLayer, DepthToSpaceLayer, DepthwiseConvolution2dLayer, LogicalBinaryLayer, PreluLayer, SpaceToBatchNdLayer, SpaceToDepthLayer, TransposeConvolution2dLayer, ArgMinMaxLayer, DetectionPostProcessLayer, ElementwiseUnaryLayer, StridedSliceLayer, PreCompiledLayer, ConstantLayer, PermuteLayer, ReshapeLayer, GatherLayer, LogSoftmaxLayer, MeanLayer, PadLayer, StandInLayer, TransposeLayer, AbsLayer, BatchToSpaceNdLayer, CastLayer, ConvertBf16ToFp32Layer, ConvertFp16ToFp32Layer, ConvertFp32ToBf16Layer, DebugLayer, DequantizeLayer, FakeQuantizationLayer, FloorLayer, InputLayer, InstanceNormalizationLayer, L2NormalizationLayer, MapLayer, MemCopyLayer, MemImportLayer, MergeLayer, NormalizationLayer, Pooling2dLayer, ResizeLayer, RsqrtLayer, ShapeLayer, SliceLayer, SoftmaxLayer, StackLayer, SwitchLayer, UnmapLayer, ConvertFp32ToFp16Layer, FillLayer, ReduceLayer, ActivationLayer, QuantizeLayer, RankLayer, and ElementwiseBaseLayer.
Referenced by OutputSlot::IsTensorInfoSet().
void VerifyLayerConnections | ( | unsigned int | expectedConnections, |
const CheckLocation & | location | ||
) | const |
Definition at line 349 of file Layer.cpp.
References ARMNN_ASSERT, CheckLocation::AsString(), Layer::GetInputSlot(), armnn::GetLayerTypeAsCString(), Layer::GetNameStr(), Layer::GetNumInputSlots(), and Layer::GetType().
Referenced by ElementwiseBaseLayer::ValidateTensorShapesFromInputs(), RankLayer::ValidateTensorShapesFromInputs(), QuantizeLayer::ValidateTensorShapesFromInputs(), ActivationLayer::ValidateTensorShapesFromInputs(), FillLayer::ValidateTensorShapesFromInputs(), ReduceLayer::ValidateTensorShapesFromInputs(), ConvertFp32ToFp16Layer::ValidateTensorShapesFromInputs(), AbsLayer::ValidateTensorShapesFromInputs(), DequantizeLayer::ValidateTensorShapesFromInputs(), MemCopyLayer::ValidateTensorShapesFromInputs(), MemImportLayer::ValidateTensorShapesFromInputs(), MergeLayer::ValidateTensorShapesFromInputs(), NormalizationLayer::ValidateTensorShapesFromInputs(), RsqrtLayer::ValidateTensorShapesFromInputs(), ResizeLayer::ValidateTensorShapesFromInputs(), ConvertBf16ToFp32Layer::ValidateTensorShapesFromInputs(), Pooling2dLayer::ValidateTensorShapesFromInputs(), FakeQuantizationLayer::ValidateTensorShapesFromInputs(), ConvertFp16ToFp32Layer::ValidateTensorShapesFromInputs(), BatchToSpaceNdLayer::ValidateTensorShapesFromInputs(), ConvertFp32ToBf16Layer::ValidateTensorShapesFromInputs(), FloorLayer::ValidateTensorShapesFromInputs(), CastLayer::ValidateTensorShapesFromInputs(), InstanceNormalizationLayer::ValidateTensorShapesFromInputs(), ShapeLayer::ValidateTensorShapesFromInputs(), SliceLayer::ValidateTensorShapesFromInputs(), SoftmaxLayer::ValidateTensorShapesFromInputs(), L2NormalizationLayer::ValidateTensorShapesFromInputs(), StackLayer::ValidateTensorShapesFromInputs(), SwitchLayer::ValidateTensorShapesFromInputs(), DebugLayer::ValidateTensorShapesFromInputs(), UnmapLayer::ValidateTensorShapesFromInputs(), MapLayer::ValidateTensorShapesFromInputs(), GatherLayer::ValidateTensorShapesFromInputs(), PadLayer::ValidateTensorShapesFromInputs(), TransposeLayer::ValidateTensorShapesFromInputs(), LogSoftmaxLayer::ValidateTensorShapesFromInputs(), MeanLayer::ValidateTensorShapesFromInputs(), ReshapeLayer::ValidateTensorShapesFromInputs(), PermuteLayer::ValidateTensorShapesFromInputs(), StridedSliceLayer::ValidateTensorShapesFromInputs(), ArgMinMaxLayer::ValidateTensorShapesFromInputs(), DetectionPostProcessLayer::ValidateTensorShapesFromInputs(), ElementwiseUnaryLayer::ValidateTensorShapesFromInputs(), DepthwiseConvolution2dLayer::ValidateTensorShapesFromInputs(), SpaceToBatchNdLayer::ValidateTensorShapesFromInputs(), TransposeConvolution2dLayer::ValidateTensorShapesFromInputs(), SpaceToDepthLayer::ValidateTensorShapesFromInputs(), ComparisonLayer::ValidateTensorShapesFromInputs(), LogicalBinaryLayer::ValidateTensorShapesFromInputs(), PreluLayer::ValidateTensorShapesFromInputs(), DepthToSpaceLayer::ValidateTensorShapesFromInputs(), Convolution2dLayer::ValidateTensorShapesFromInputs(), ConcatLayer::ValidateTensorShapesFromInputs(), LstmLayer::ValidateTensorShapesFromInputs(), UnidirectionalSequenceLstmLayer::ValidateTensorShapesFromInputs(), BatchNormalizationLayer::ValidateTensorShapesFromInputs(), QuantizedLstmLayer::ValidateTensorShapesFromInputs(), and QLstmLayer::ValidateTensorShapesFromInputs().
|
protected |
Definition at line 433 of file Layer.cpp.
References TensorShape::AreAllDimensionsSpecified(), TensorShape::GetDimensionality(), armnn::NotSpecified, and armnn::ValidateOnly.
Referenced by ElementwiseBaseLayer::ValidateTensorShapesFromInputs(), RankLayer::ValidateTensorShapesFromInputs(), QuantizeLayer::ValidateTensorShapesFromInputs(), ActivationLayer::ValidateTensorShapesFromInputs(), FillLayer::ValidateTensorShapesFromInputs(), ReduceLayer::ValidateTensorShapesFromInputs(), ConvertFp32ToFp16Layer::ValidateTensorShapesFromInputs(), AbsLayer::ValidateTensorShapesFromInputs(), DequantizeLayer::ValidateTensorShapesFromInputs(), MemCopyLayer::ValidateTensorShapesFromInputs(), MemImportLayer::ValidateTensorShapesFromInputs(), MergeLayer::ValidateTensorShapesFromInputs(), NormalizationLayer::ValidateTensorShapesFromInputs(), RsqrtLayer::ValidateTensorShapesFromInputs(), ResizeLayer::ValidateTensorShapesFromInputs(), ConvertBf16ToFp32Layer::ValidateTensorShapesFromInputs(), Pooling2dLayer::ValidateTensorShapesFromInputs(), FakeQuantizationLayer::ValidateTensorShapesFromInputs(), ConvertFp16ToFp32Layer::ValidateTensorShapesFromInputs(), BatchToSpaceNdLayer::ValidateTensorShapesFromInputs(), ConvertFp32ToBf16Layer::ValidateTensorShapesFromInputs(), FloorLayer::ValidateTensorShapesFromInputs(), StackLayer::ValidateTensorShapesFromInputs(), CastLayer::ValidateTensorShapesFromInputs(), ShapeLayer::ValidateTensorShapesFromInputs(), SliceLayer::ValidateTensorShapesFromInputs(), SoftmaxLayer::ValidateTensorShapesFromInputs(), InstanceNormalizationLayer::ValidateTensorShapesFromInputs(), L2NormalizationLayer::ValidateTensorShapesFromInputs(), DebugLayer::ValidateTensorShapesFromInputs(), SwitchLayer::ValidateTensorShapesFromInputs(), PadLayer::ValidateTensorShapesFromInputs(), GatherLayer::ValidateTensorShapesFromInputs(), LogSoftmaxLayer::ValidateTensorShapesFromInputs(), TransposeLayer::ValidateTensorShapesFromInputs(), MeanLayer::ValidateTensorShapesFromInputs(), PermuteLayer::ValidateTensorShapesFromInputs(), ReshapeLayer::ValidateTensorShapesFromInputs(), ArgMinMaxLayer::ValidateTensorShapesFromInputs(), StridedSliceLayer::ValidateTensorShapesFromInputs(), ElementwiseUnaryLayer::ValidateTensorShapesFromInputs(), DetectionPostProcessLayer::ValidateTensorShapesFromInputs(), SpaceToBatchNdLayer::ValidateTensorShapesFromInputs(), PreluLayer::ValidateTensorShapesFromInputs(), LogicalBinaryLayer::ValidateTensorShapesFromInputs(), TransposeConvolution2dLayer::ValidateTensorShapesFromInputs(), DepthToSpaceLayer::ValidateTensorShapesFromInputs(), ComparisonLayer::ValidateTensorShapesFromInputs(), DepthwiseConvolution2dLayer::ValidateTensorShapesFromInputs(), SpaceToDepthLayer::ValidateTensorShapesFromInputs(), Convolution2dLayer::ValidateTensorShapesFromInputs(), FullyConnectedLayer::ValidateTensorShapesFromInputs(), SplitterLayer::ValidateTensorShapesFromInputs(), LstmLayer::ValidateTensorShapesFromInputs(), ConcatLayer::ValidateTensorShapesFromInputs(), UnidirectionalSequenceLstmLayer::ValidateTensorShapesFromInputs(), BatchNormalizationLayer::ValidateTensorShapesFromInputs(), QuantizedLstmLayer::ValidateTensorShapesFromInputs(), and QLstmLayer::ValidateTensorShapesFromInputs().
|
protected |
Definition at line 394 of file Layer.hpp.
Referenced by Layer::SetAdditionalInfo().
|
protected |
Definition at line 407 of file Layer.hpp.
Referenced by ConcatLayer::CreateWorkload(), SplitterLayer::CreateWorkload(), and Layer::Layer().
|
protected |
Definition at line 408 of file Layer.hpp.
Referenced by Layer::CloneBase(), ElementwiseBaseLayer::InferOutputShapes(), ElementwiseBaseLayer::ValidateTensorShapesFromInputs(), RankLayer::ValidateTensorShapesFromInputs(), QuantizeLayer::ValidateTensorShapesFromInputs(), ActivationLayer::ValidateTensorShapesFromInputs(), FillLayer::ValidateTensorShapesFromInputs(), ReduceLayer::ValidateTensorShapesFromInputs(), ConvertFp32ToFp16Layer::ValidateTensorShapesFromInputs(), AbsLayer::ValidateTensorShapesFromInputs(), DequantizeLayer::ValidateTensorShapesFromInputs(), SliceLayer::ValidateTensorShapesFromInputs(), MemCopyLayer::ValidateTensorShapesFromInputs(), MemImportLayer::ValidateTensorShapesFromInputs(), ConvertBf16ToFp32Layer::ValidateTensorShapesFromInputs(), MergeLayer::ValidateTensorShapesFromInputs(), ConvertFp32ToBf16Layer::ValidateTensorShapesFromInputs(), NormalizationLayer::ValidateTensorShapesFromInputs(), BatchToSpaceNdLayer::ValidateTensorShapesFromInputs(), ConvertFp16ToFp32Layer::ValidateTensorShapesFromInputs(), Pooling2dLayer::ValidateTensorShapesFromInputs(), FakeQuantizationLayer::ValidateTensorShapesFromInputs(), SwitchLayer::ValidateTensorShapesFromInputs(), CastLayer::ValidateTensorShapesFromInputs(), FloorLayer::ValidateTensorShapesFromInputs(), ResizeLayer::ValidateTensorShapesFromInputs(), RsqrtLayer::ValidateTensorShapesFromInputs(), ShapeLayer::ValidateTensorShapesFromInputs(), InstanceNormalizationLayer::ValidateTensorShapesFromInputs(), SoftmaxLayer::ValidateTensorShapesFromInputs(), DebugLayer::ValidateTensorShapesFromInputs(), StackLayer::ValidateTensorShapesFromInputs(), L2NormalizationLayer::ValidateTensorShapesFromInputs(), MeanLayer::ValidateTensorShapesFromInputs(), PadLayer::ValidateTensorShapesFromInputs(), GatherLayer::ValidateTensorShapesFromInputs(), LogSoftmaxLayer::ValidateTensorShapesFromInputs(), TransposeLayer::ValidateTensorShapesFromInputs(), ReshapeLayer::ValidateTensorShapesFromInputs(), PermuteLayer::ValidateTensorShapesFromInputs(), DetectionPostProcessLayer::ValidateTensorShapesFromInputs(), ElementwiseUnaryLayer::ValidateTensorShapesFromInputs(), ArgMinMaxLayer::ValidateTensorShapesFromInputs(), StridedSliceLayer::ValidateTensorShapesFromInputs(), SpaceToBatchNdLayer::ValidateTensorShapesFromInputs(), SpaceToDepthLayer::ValidateTensorShapesFromInputs(), PreluLayer::ValidateTensorShapesFromInputs(), LogicalBinaryLayer::ValidateTensorShapesFromInputs(), TransposeConvolution2dLayer::ValidateTensorShapesFromInputs(), DepthwiseConvolution2dLayer::ValidateTensorShapesFromInputs(), ComparisonLayer::ValidateTensorShapesFromInputs(), DepthToSpaceLayer::ValidateTensorShapesFromInputs(), Convolution2dLayer::ValidateTensorShapesFromInputs(), FullyConnectedLayer::ValidateTensorShapesFromInputs(), SplitterLayer::ValidateTensorShapesFromInputs(), ConcatLayer::ValidateTensorShapesFromInputs(), UnidirectionalSequenceLstmLayer::ValidateTensorShapesFromInputs(), LstmLayer::ValidateTensorShapesFromInputs(), BatchNormalizationLayer::ValidateTensorShapesFromInputs(), QuantizedLstmLayer::ValidateTensorShapesFromInputs(), and QLstmLayer::ValidateTensorShapesFromInputs().