20.11
|
#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) | |
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 |
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::unique_ptr< ScopedCpuTensorHandle > >> |
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 327 of file Layer.hpp.
Referenced by BOOST_AUTO_TEST_CASE().
|
inline |
Definition at line 238 of file Layer.hpp.
Referenced by armnn::InsertConvertBf16ToFp32LayersBefore(), armnn::InsertConvertFp16ToFp32LayersBefore(), armnn::InsertConvertFp32ToBf16LayersBefore(), ConvertFp32NetworkToFp16Impl::Run(), MoveTransposeUpImpl::Run(), and MovePermuteUpImpl::Run().
|
inline |
Definition at line 242 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, LstmLayer, QuantizedLstmLayer, OutputLayer, BatchNormalizationLayer, SplitterLayer, ConcatLayer, Convolution2dLayer, DepthwiseConvolution2dLayer, FullyConnectedLayer, 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, ConvertBf16ToFp32Layer, ConvertFp16ToFp32Layer, ConvertFp32ToBf16Layer, DebugLayer, DequantizeLayer, FakeQuantizationLayer, FloorLayer, InputLayer, InstanceNormalizationLayer, L2NormalizationLayer, MapLayer, MemCopyLayer, MemImportLayer, MergeLayer, NormalizationLayer, Pooling2dLayer, ResizeLayer, RsqrtLayer, 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 355 of file Layer.hpp.
References QueueDescriptor::m_Inputs, and WorkloadInfo::m_InputTensorInfos.
|
inlineprotected |
Definition at line 362 of file Layer.hpp.
References QueueDescriptor::m_Outputs, and WorkloadInfo::m_OutputTensorInfos.
|
virtual |
Reimplemented in SplitterLayer, ConcatLayer, and OutputLayer.
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, LstmLayer, QuantizedLstmLayer, BatchNormalizationLayer, Convolution2dLayer, PreCompiledLayer, DepthwiseConvolution2dLayer, FullyConnectedLayer, 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, ConcatLayer, ConvertBf16ToFp32Layer, ConvertFp16ToFp32Layer, ConvertFp32ToBf16Layer, DebugLayer, DequantizeLayer, FakeQuantizationLayer, FloorLayer, InputLayer, InstanceNormalizationLayer, L2NormalizationLayer, MapLayer, MemCopyLayer, MemImportLayer, MergeLayer, NormalizationLayer, OutputLayer, Pooling2dLayer, QuantizeLayer, ResizeLayer, RsqrtLayer, SliceLayer, SoftmaxLayer, SplitterLayer, StackLayer, StridedSliceLayer, SwitchLayer, UnmapLayer, ActivationLayer, ConvertFp32ToFp16Layer, FillLayer, and RankLayer.
|
inline |
Definition at line 239 of file Layer.hpp.
Referenced by armnn::InsertConvertBf16ToFp32LayersBefore(), armnn::InsertConvertFp16ToFp32LayersBefore(), armnn::InsertConvertFp32ToBf16LayersBefore(), ConvertFp32NetworkToFp16Impl::Run(), MoveTransposeUpImpl::Run(), and MovePermuteUpImpl::Run().
|
inline |
Definition at line 243 of file Layer.hpp.
Referenced by armnn::InsertDebugLayerAfter(), NeonBackend::OptimizeSubgraphView(), ClBackend::OptimizeSubgraphView(), ConvertFp32NetworkToFp16Impl::Run(), and SplitterLayer::ValidateTensorShapesFromInputs().
|
inline |
Definition at line 339 of file Layer.hpp.
Referenced by NeonBackend::OptimizeSubgraphView(), and ClBackend::OptimizeSubgraphView().
Definition at line 331 of file Layer.hpp.
Referenced by Layer::CloneBase().
|
inline |
Definition at line 266 of file Layer.hpp.
Referenced by Graph::AddCompatibilityLayers(), armnn::ApplyBackendOptimizations(), armnn::AttemptBackendAssignment(), BOOST_AUTO_TEST_CASE(), armnn::CalculateEdgeStrategy(), armnn::CalculateSlotOption(), armnn::CalculateSlotOptionForInput(), Layer::CloneBase(), LoadedNetwork::GetOutputTensorInfo(), and armnn::SelectTensorHandleStrategy().
|
inlineprotectedvirtual |
Reimplemented in QLstmLayer, LstmLayer, QuantizedLstmLayer, Convolution2dLayer, DepthwiseConvolution2dLayer, FullyConnectedLayer, TransposeConvolution2dLayer, BatchNormalizationLayer, ConstantLayer, and DetectionPostProcessLayer.
Definition at line 391 of file Layer.hpp.
DataType GetDataType | ( | ) | const |
Definition at line 283 of file Layer.cpp.
References InputSlot::GetConnection(), TensorInfo::GetDataType(), Layer::GetInputSlot(), Layer::GetNumInputSlots(), Layer::GetOutputSlot(), IOutputSlot::GetTensorInfo(), and OutputSlot::GetTensorInfo().
Referenced by BOOST_AUTO_TEST_CASE(), ConvertFp32NetworkToFp16Impl::Run(), FuseBatchNorm< ConvLayer, ArmnnType, T >::Run(), ConvertFp32NetworkToBf16Impl::Run(), IsFloat32Layer::Test(), IsFloat16Layer::Test(), and IsBFloat16Layer::Test().
|
inlinefinalvirtual |
Returns the unique id of the layer.
Implements IConnectableLayer.
Definition at line 319 of file Layer.hpp.
Referenced by Layer::CloneBase(), DebugLayer::CreateWorkload(), OutputSlot::GetOwningLayerGuid(), NeonBackend::OptimizeSubgraphView(), ClBackend::OptimizeSubgraphView(), QuantizerVisitor::QuantizerVisitor(), and Graph::SerializeToDot().
|
inlineoverridevirtual |
Get a const input slot handle by slot index.
Implements IConnectableLayer.
Definition at line 313 of file Layer.hpp.
Referenced by AddBroadcastReshapeLayerOptimizerTest(), BOOST_AUTO_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), CreateConvolution2dGraph(), CreateDepthwiseConvolution2dGraph(), CreateGatherGraph(), CreatePooling2dGraph(), CreateResizeBilinearGraph(), DebugLayer::CreateWorkload(), ConcatLayer::CreateWorkload(), Layer::GetDataType(), Graph::Graph(), InputSlot::Insert(), armnn::InsertConvertBf16ToFp32LayersBefore(), armnn::InsertConvertFp16ToFp32LayersBefore(), armnn::InsertConvertFp32ToBf16LayersAfter(), armnn::InsertConvertFp32ToBf16LayersBefore(), armnn::InsertConvertFp32ToFp16LayersAfter(), armnn::InsertDebugLayerAfter(), NeonBackend::OptimizeSubgraphView(), ClBackend::OptimizeSubgraphView(), PermuteAsReshapeImpl::Run(), TransposeAsReshapeImpl::Run(), OptimizeConsecutiveReshapesImpl::Run(), FoldPadIntoConvolution2dImpl::Run(), OptimizeInverseConversionsImpl::Run(), PermuteAndBatchToSpaceAsDepthToSpaceImpl< PermuteType >::Run(), OptimizeInversePermutesImpl< PermuteType >::Run(), MovePermuteUpImpl::Run(), MoveTransposeUpImpl::Run(), FuseBatchNorm< ConvLayer, ArmnnType, T >::Run(), AddBroadcastReshapeLayerImpl::Run(), DepthwiseConvolution2dLayer::SerializeLayerParameters(), Convolution2dLayer::SerializeLayerParameters(), ElementwiseBaseLayer::ValidateTensorShapesFromInputs(), QuantizeLayer::ValidateTensorShapesFromInputs(), ActivationLayer::ValidateTensorShapesFromInputs(), ConvertFp32ToFp16Layer::ValidateTensorShapesFromInputs(), FillLayer::ValidateTensorShapesFromInputs(), InstanceNormalizationLayer::ValidateTensorShapesFromInputs(), MemCopyLayer::ValidateTensorShapesFromInputs(), SwitchLayer::ValidateTensorShapesFromInputs(), L2NormalizationLayer::ValidateTensorShapesFromInputs(), BatchToSpaceNdLayer::ValidateTensorShapesFromInputs(), DebugLayer::ValidateTensorShapesFromInputs(), MergeLayer::ValidateTensorShapesFromInputs(), NormalizationLayer::ValidateTensorShapesFromInputs(), AbsLayer::ValidateTensorShapesFromInputs(), Pooling2dLayer::ValidateTensorShapesFromInputs(), SoftmaxLayer::ValidateTensorShapesFromInputs(), DequantizeLayer::ValidateTensorShapesFromInputs(), ResizeLayer::ValidateTensorShapesFromInputs(), ConvertBf16ToFp32Layer::ValidateTensorShapesFromInputs(), RsqrtLayer::ValidateTensorShapesFromInputs(), FakeQuantizationLayer::ValidateTensorShapesFromInputs(), SliceLayer::ValidateTensorShapesFromInputs(), ConvertFp16ToFp32Layer::ValidateTensorShapesFromInputs(), StackLayer::ValidateTensorShapesFromInputs(), FloorLayer::ValidateTensorShapesFromInputs(), MemImportLayer::ValidateTensorShapesFromInputs(), ConvertFp32ToBf16Layer::ValidateTensorShapesFromInputs(), GatherLayer::ValidateTensorShapesFromInputs(), LogSoftmaxLayer::ValidateTensorShapesFromInputs(), PadLayer::ValidateTensorShapesFromInputs(), MeanLayer::ValidateTensorShapesFromInputs(), TransposeLayer::ValidateTensorShapesFromInputs(), PermuteLayer::ValidateTensorShapesFromInputs(), ReshapeLayer::ValidateTensorShapesFromInputs(), ElementwiseUnaryLayer::ValidateTensorShapesFromInputs(), ArgMinMaxLayer::ValidateTensorShapesFromInputs(), StridedSliceLayer::ValidateTensorShapesFromInputs(), LogicalBinaryLayer::ValidateTensorShapesFromInputs(), FullyConnectedLayer::ValidateTensorShapesFromInputs(), SpaceToBatchNdLayer::ValidateTensorShapesFromInputs(), DepthwiseConvolution2dLayer::ValidateTensorShapesFromInputs(), PreluLayer::ValidateTensorShapesFromInputs(), ComparisonLayer::ValidateTensorShapesFromInputs(), DepthToSpaceLayer::ValidateTensorShapesFromInputs(), SpaceToDepthLayer::ValidateTensorShapesFromInputs(), TransposeConvolution2dLayer::ValidateTensorShapesFromInputs(), Convolution2dLayer::ValidateTensorShapesFromInputs(), ConcatLayer::ValidateTensorShapesFromInputs(), BatchNormalizationLayer::ValidateTensorShapesFromInputs(), OutputLayer::ValidateTensorShapesFromInputs(), QuantizedLstmLayer::ValidateTensorShapesFromInputs(), LstmLayer::ValidateTensorShapesFromInputs(), QLstmLayer::ValidateTensorShapesFromInputs(), and Layer::VerifyLayerConnections().
|
inlineoverridevirtual |
Get the input slot handle by slot index.
Implements IConnectableLayer.
|
inline |
Definition at line 234 of file Layer.hpp.
Referenced by BOOST_AUTO_TEST_CASE(), SplitterLayer::CreateWorkload(), LoadedNetwork::EnqueueWorkload(), armnn::ForEachLayerInput(), Layer::GetPriority(), Layer::Layer(), and ConvertFp32NetworkToFp16Impl::Run().
|
inlineoverridevirtual |
Returns the name of the layer.
Implements IConnectableLayer.
Definition at line 308 of file Layer.hpp.
Referenced by RankLayer::Accept(), AdditionLayer::Accept(), QuantizeLayer::Accept(), MinimumLayer::Accept(), MultiplicationLayer::Accept(), DivisionLayer::Accept(), MaximumLayer::Accept(), SubtractionLayer::Accept(), ActivationLayer::Accept(), FillLayer::Accept(), AbsLayer::Accept(), DequantizeLayer::Accept(), NormalizationLayer::Accept(), FloorLayer::Accept(), InputLayer::Accept(), InstanceNormalizationLayer::Accept(), RsqrtLayer::Accept(), SoftmaxLayer::Accept(), L2NormalizationLayer::Accept(), SwitchLayer::Accept(), MeanLayer::Accept(), GatherLayer::Accept(), LogSoftmaxLayer::Accept(), MergeLayer::Accept(), ArgMinMaxLayer::Accept(), DetectionPostProcessLayer::Accept(), ElementwiseUnaryLayer::Accept(), Pooling2dLayer::Accept(), ResizeLayer::Accept(), SliceLayer::Accept(), BatchToSpaceNdLayer::Accept(), StackLayer::Accept(), StridedSliceLayer::Accept(), PadLayer::Accept(), PreluLayer::Accept(), SpaceToBatchNdLayer::Accept(), SpaceToDepthLayer::Accept(), LogicalBinaryLayer::Accept(), ComparisonLayer::Accept(), DepthToSpaceLayer::Accept(), StandInLayer::Accept(), ConstantLayer::Accept(), BatchNormalizationLayer::Accept(), OutputLayer::Accept(), TransposeConvolution2dLayer::Accept(), FullyConnectedLayer::Accept(), DepthwiseConvolution2dLayer::Accept(), Convolution2dLayer::Accept(), ConcatLayer::Accept(), SplitterLayer::Accept(), ReshapeLayer::Accept(), TransposeLayer::Accept(), PermuteLayer::Accept(), QuantizedLstmLayer::Accept(), LstmLayer::Accept(), QLstmLayer::Accept(), Graph::AddCompatibilityLayers(), BOOST_AUTO_TEST_CASE(), armnnTfParser::CalcPadding(), RankLayer::Clone(), QuantizeLayer::Clone(), FillLayer::Clone(), ActivationLayer::Clone(), ConvertFp32ToFp16Layer::Clone(), MemCopyLayer::Clone(), MemImportLayer::Clone(), MergeLayer::Clone(), NormalizationLayer::Clone(), AbsLayer::Clone(), FakeQuantizationLayer::Clone(), Pooling2dLayer::Clone(), ConvertBf16ToFp32Layer::Clone(), MapLayer::Clone(), FloorLayer::Clone(), ConvertFp16ToFp32Layer::Clone(), ConvertFp32ToBf16Layer::Clone(), ResizeLayer::Clone(), RsqrtLayer::Clone(), InputLayer::Clone(), SliceLayer::Clone(), InstanceNormalizationLayer::Clone(), UnmapLayer::Clone(), AdditionLayer::Clone(), L2NormalizationLayer::Clone(), DebugLayer::Clone(), StackLayer::Clone(), StridedSliceLayer::Clone(), BatchToSpaceNdLayer::Clone(), SwitchLayer::Clone(), SoftmaxLayer::Clone(), DequantizeLayer::Clone(), PadLayer::Clone(), PreluLayer::Clone(), MinimumLayer::Clone(), DivisionLayer::Clone(), StandInLayer::Clone(), ElementwiseUnaryLayer::Clone(), ComparisonLayer::Clone(), MultiplicationLayer::Clone(), GatherLayer::Clone(), ArgMinMaxLayer::Clone(), SpaceToBatchNdLayer::Clone(), LogSoftmaxLayer::Clone(), MeanLayer::Clone(), SubtractionLayer::Clone(), TransposeLayer::Clone(), SpaceToDepthLayer::Clone(), DepthToSpaceLayer::Clone(), MaximumLayer::Clone(), LogicalBinaryLayer::Clone(), ConstantLayer::Clone(), PermuteLayer::Clone(), ReshapeLayer::Clone(), DetectionPostProcessLayer::Clone(), PreCompiledLayer::Clone(), DepthwiseConvolution2dLayer::Clone(), TransposeConvolution2dLayer::Clone(), FullyConnectedLayer::Clone(), Convolution2dLayer::Clone(), ConcatLayer::Clone(), SplitterLayer::Clone(), BatchNormalizationLayer::Clone(), OutputLayer::Clone(), QuantizedLstmLayer::Clone(), LstmLayer::Clone(), QLstmLayer::Clone(), armnn::InsertConvertBf16ToFp32LayersBefore(), armnn::InsertConvertFp16ToFp32LayersBefore(), armnn::InsertConvertFp32ToBf16LayersAfter(), armnn::InsertConvertFp32ToBf16LayersBefore(), armnn::InsertConvertFp32ToFp16LayersAfter(), NeonBackend::OptimizeSubgraphView(), ClBackend::OptimizeSubgraphView(), PermuteAsReshapeImpl::Run(), TransposeAsReshapeImpl::Run(), OptimizeConsecutiveReshapesImpl::Run(), PermuteAndBatchToSpaceAsDepthToSpaceImpl< PermuteType >::Run(), FoldPadIntoConvolution2dImpl::Run(), FuseBatchNorm< ConvLayer, ArmnnType, T >::Run(), and ErasedLayerNamesObservable::Update().
|
inline |
Definition at line 217 of file Layer.hpp.
Referenced by BOOST_AUTO_TEST_CASE(), armnn::CheckScaleSetOnQuantizedType(), DebugLayer::CreateWorkload(), LoadedNetwork::GetOutputTensorInfo(), Layer::InferOutputShapes(), armnn::InsertDebugLayerAfter(), IsConnected(), AddBroadcastReshapeLayerImpl::Run(), and Layer::VerifyLayerConnections().
|
inlineoverridevirtual |
Returns the number of connectable input slots.
Implements IConnectableLayer.
Definition at line 310 of file Layer.hpp.
Referenced by CheckNumberOfInputSlot(), ConcatLayer::CreateWorkload(), LoadedNetwork::EnqueueWorkload(), 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 311 of file Layer.hpp.
Referenced by BOOST_AUTO_TEST_CASE(), armnnTfParser::CalcPadding(), OutputSlot::CalculateIndexOnOwner(), CheckNumberOfOutputSlot(), armnn::CheckScaleSetOnQuantizedType(), Layer::CreateTensorHandles(), SplitterLayer::CreateWorkload(), LoadedNetwork::EnqueueWorkload(), Layer::InferOutputShapes(), InputSlot::Insert(), armnn::InsertConvertFp32ToBf16LayersAfter(), armnn::InsertConvertFp32ToFp16LayersAfter(), armnn::InsertDebugLayerAfter(), armnn::SelectTensorHandleStrategy(), UnmapLayer::ValidateTensorShapesFromInputs(), MapLayer::ValidateTensorShapesFromInputs(), SwitchLayer::ValidateTensorShapesFromInputs(), and DetectionPostProcessLayer::ValidateTensorShapesFromInputs().
|
inline |
Definition at line 222 of file Layer.hpp.
Referenced by BOOST_AUTO_TEST_CASE(), Layer::CreateTensorHandles(), ConcatLayer::CreateWorkload(), LoadedNetwork::EnqueueWorkload(), InputSlot::Insert(), PermuteAsReshapeImpl::Run(), TransposeAsReshapeImpl::Run(), OptimizeConsecutiveReshapesImpl::Run(), MoveTransposeUpImpl::Run(), MovePermuteUpImpl::Run(), and InputLayer::ValidateTensorShapesFromInputs().
|
inline |
Definition at line 227 of file Layer.hpp.
|
inlineoverridevirtual |
Get the const output slot handle by slot index.
Implements IConnectableLayer.
Definition at line 315 of file Layer.hpp.
Referenced by AddBroadcastReshapeLayerOptimizerTest(), Graph::AddCompatibilityLayers(), BOOST_AUTO_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), armnnTfParser::CalcPadding(), OutputSlot::CalculateIndexOnOwner(), armnn::CheckScaleSetOnQuantizedType(), CreateConvolution2dGraph(), CreateDepthwiseConvolution2dGraph(), CreateGatherGraph(), CreatePooling2dGraph(), CreateResizeBilinearGraph(), ConcatLayer::CreateTensorHandles(), SplitterLayer::CreateTensorHandles(), Layer::CreateTensorHandles(), ConcatLayer::CreateWorkload(), SplitterLayer::CreateWorkload(), Layer::GetDataType(), InputSlot::Insert(), armnn::InsertConvertBf16ToFp32LayersBefore(), armnn::InsertConvertFp16ToFp32LayersBefore(), armnn::InsertConvertFp32ToBf16LayersAfter(), armnn::InsertConvertFp32ToBf16LayersBefore(), armnn::InsertConvertFp32ToFp16LayersAfter(), armnn::InsertDebugLayerAfter(), IsConnected(), PermuteAsReshapeImpl::Run(), TransposeAsReshapeImpl::Run(), OptimizeConsecutiveReshapesImpl::Run(), FoldPadIntoConvolution2dImpl::Run(), OptimizeInverseConversionsImpl::Run(), PermuteAndBatchToSpaceAsDepthToSpaceImpl< PermuteType >::Run(), MoveTransposeUpImpl::Run(), MovePermuteUpImpl::Run(), OptimizeInversePermutesImpl< PermuteType >::Run(), FuseBatchNorm< ConvLayer, ArmnnType, T >::Run(), AddBroadcastReshapeLayerImpl::Run(), armnn::SelectTensorHandleStrategy(), Layer::ValidateAndCopyShape(), ElementwiseBaseLayer::ValidateTensorShapesFromInputs(), RankLayer::ValidateTensorShapesFromInputs(), QuantizeLayer::ValidateTensorShapesFromInputs(), ActivationLayer::ValidateTensorShapesFromInputs(), ConvertFp32ToFp16Layer::ValidateTensorShapesFromInputs(), FillLayer::ValidateTensorShapesFromInputs(), FakeQuantizationLayer::ValidateTensorShapesFromInputs(), SwitchLayer::ValidateTensorShapesFromInputs(), InstanceNormalizationLayer::ValidateTensorShapesFromInputs(), L2NormalizationLayer::ValidateTensorShapesFromInputs(), ConvertFp16ToFp32Layer::ValidateTensorShapesFromInputs(), ConvertFp32ToBf16Layer::ValidateTensorShapesFromInputs(), ConvertBf16ToFp32Layer::ValidateTensorShapesFromInputs(), BatchToSpaceNdLayer::ValidateTensorShapesFromInputs(), MergeLayer::ValidateTensorShapesFromInputs(), NormalizationLayer::ValidateTensorShapesFromInputs(), MemImportLayer::ValidateTensorShapesFromInputs(), Pooling2dLayer::ValidateTensorShapesFromInputs(), DebugLayer::ValidateTensorShapesFromInputs(), DequantizeLayer::ValidateTensorShapesFromInputs(), StackLayer::ValidateTensorShapesFromInputs(), ResizeLayer::ValidateTensorShapesFromInputs(), RsqrtLayer::ValidateTensorShapesFromInputs(), SliceLayer::ValidateTensorShapesFromInputs(), SoftmaxLayer::ValidateTensorShapesFromInputs(), AbsLayer::ValidateTensorShapesFromInputs(), MemCopyLayer::ValidateTensorShapesFromInputs(), FloorLayer::ValidateTensorShapesFromInputs(), GatherLayer::ValidateTensorShapesFromInputs(), LogSoftmaxLayer::ValidateTensorShapesFromInputs(), TransposeLayer::ValidateTensorShapesFromInputs(), MeanLayer::ValidateTensorShapesFromInputs(), PadLayer::ValidateTensorShapesFromInputs(), ReshapeLayer::ValidateTensorShapesFromInputs(), ConstantLayer::ValidateTensorShapesFromInputs(), PermuteLayer::ValidateTensorShapesFromInputs(), StridedSliceLayer::ValidateTensorShapesFromInputs(), ArgMinMaxLayer::ValidateTensorShapesFromInputs(), DetectionPostProcessLayer::ValidateTensorShapesFromInputs(), ElementwiseUnaryLayer::ValidateTensorShapesFromInputs(), ComparisonLayer::ValidateTensorShapesFromInputs(), DepthToSpaceLayer::ValidateTensorShapesFromInputs(), PreluLayer::ValidateTensorShapesFromInputs(), FullyConnectedLayer::ValidateTensorShapesFromInputs(), TransposeConvolution2dLayer::ValidateTensorShapesFromInputs(), LogicalBinaryLayer::ValidateTensorShapesFromInputs(), DepthwiseConvolution2dLayer::ValidateTensorShapesFromInputs(), SpaceToBatchNdLayer::ValidateTensorShapesFromInputs(), SpaceToDepthLayer::ValidateTensorShapesFromInputs(), Convolution2dLayer::ValidateTensorShapesFromInputs(), ConcatLayer::ValidateTensorShapesFromInputs(), SplitterLayer::ValidateTensorShapesFromInputs(), BatchNormalizationLayer::ValidateTensorShapesFromInputs(), QuantizedLstmLayer::ValidateTensorShapesFromInputs(), LstmLayer::ValidateTensorShapesFromInputs(), and QLstmLayer::ValidateTensorShapesFromInputs().
|
inlineoverridevirtual |
Get the output slot handle by slot index.
Implements IConnectableLayer.
|
inline |
Definition at line 235 of file Layer.hpp.
Referenced by Graph::AddCompatibilityLayers(), armnn::ForEachLayerOutput(), and Graph::Print().
LayerPriority GetPriority | ( | ) | const |
Definition at line 298 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 323 of file Layer.hpp.
Referenced by ErasedLayerNamesObservable::Update().
|
inline |
Definition at line 232 of file Layer.hpp.
|
inline |
Definition at line 262 of file Layer.hpp.
Referenced by armnn::ApplyBackendOptimizations(), armnn::AttemptBackendAssignment(), BOOST_AUTO_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), armnn::CalculateEdgeStrategy(), armnn::CalculateSlotOption(), armnn::CalculateSlotOptionForInput(), armnn::CheckScaleSetOnQuantizedType(), SplitterLayer::CreateWorkload(), ConcatLayer::CreateWorkload(), LoadedNetwork::EnqueueWorkload(), Layer::GetPriority(), Layer::InferOutputShapes(), ReshapeLayer::IsEqual(), TransposeLayer::IsEqual(), PermuteLayer::IsEqual(), TransposeLayer::IsInverse(), PermuteLayer::IsInverse(), IsLayerOfType(), NeonBackend::OptimizeSubgraphView(), ClBackend::OptimizeSubgraphView(), MockBackend::OptimizeSubgraphView(), armnn::ReturnWithError(), ConvertFp32NetworkToFp16Impl::Run(), AddDebugImpl::Run(), OptimizeConsecutiveReshapesImpl::Run(), OptimizeInverseConversionsImpl::Run(), PermuteAndBatchToSpaceAsDepthToSpaceImpl< PermuteType >::Run(), FoldPadIntoConvolution2dImpl::Run(), MoveTransposeUpImpl::Run(), MovePermuteUpImpl::Run(), FuseBatchNorm< ConvLayer, ArmnnType, T >::Run(), AddBroadcastReshapeLayerImpl::Run(), OptimizeForTypeImpl< BaseType, OptimizeForConnectionImpl< BaseType, ChildType, Wrapped > >::Run(), ConvertFp32NetworkToBf16Impl::Run(), armnn::SelectTensorHandleStrategy(), 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, LstmLayer, QuantizedLstmLayer, SplitterLayer, ConcatLayer, Convolution2dLayer, DepthwiseConvolution2dLayer, FullyConnectedLayer, TransposeConvolution2dLayer, ConstantLayer, PermuteLayer, ReshapeLayer, PadLayer, StandInLayer, BatchToSpaceNdLayer, Pooling2dLayer, ResizeLayer, SliceLayer, StackLayer, TransposeLayer, MergeLayer, ComparisonLayer, DepthToSpaceLayer, LogicalBinaryLayer, PreluLayer, SpaceToBatchNdLayer, SpaceToDepthLayer, ArgMinMaxLayer, ElementwiseUnaryLayer, StridedSliceLayer, and ElementwiseBaseLayer.
Definition at line 367 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(), FillLayer::ValidateTensorShapesFromInputs(), ConvertFp32ToFp16Layer::ValidateTensorShapesFromInputs(), DequantizeLayer::ValidateTensorShapesFromInputs(), NormalizationLayer::ValidateTensorShapesFromInputs(), MemImportLayer::ValidateTensorShapesFromInputs(), MemCopyLayer::ValidateTensorShapesFromInputs(), SoftmaxLayer::ValidateTensorShapesFromInputs(), L2NormalizationLayer::ValidateTensorShapesFromInputs(), InstanceNormalizationLayer::ValidateTensorShapesFromInputs(), SwitchLayer::ValidateTensorShapesFromInputs(), ConvertFp16ToFp32Layer::ValidateTensorShapesFromInputs(), FakeQuantizationLayer::ValidateTensorShapesFromInputs(), DebugLayer::ValidateTensorShapesFromInputs(), ConvertBf16ToFp32Layer::ValidateTensorShapesFromInputs(), ConvertFp32ToBf16Layer::ValidateTensorShapesFromInputs(), FloorLayer::ValidateTensorShapesFromInputs(), AbsLayer::ValidateTensorShapesFromInputs(), RsqrtLayer::ValidateTensorShapesFromInputs(), LogSoftmaxLayer::ValidateTensorShapesFromInputs(), and BatchNormalizationLayer::ValidateTensorShapesFromInputs().
|
inline |
Definition at line 246 of file Layer.hpp.
Referenced by OptimizeForConnectionImpl< BaseType, ChildType, Wrapped >::Run(), and OptimizeForExclusiveConnectionImpl< BaseType, ChildType, Wrapped >::Run().
|
inline |
Definition at line 295 of file Layer.hpp.
Referenced by Layer::ReleaseConstantData(), and ConvertConstants< Converter, Predicate >::Run().
|
inlineprotected |
Helper function to reduce duplication in *LayerCreateWorkload.
Definition at line 378 of file Layer.hpp.
References armnn::info.
Referenced by ConvertFp32ToFp16Layer::CreateWorkload(), RankLayer::CreateWorkload(), ConvertBf16ToFp32Layer::CreateWorkload(), DebugLayer::CreateWorkload(), RsqrtLayer::CreateWorkload(), FloorLayer::CreateWorkload(), MemImportLayer::CreateWorkload(), DequantizeLayer::CreateWorkload(), AdditionLayer::CreateWorkload(), QuantizeLayer::CreateWorkload(), ConvertFp16ToFp32Layer::CreateWorkload(), AbsLayer::CreateWorkload(), MemCopyLayer::CreateWorkload(), MapLayer::CreateWorkload(), SwitchLayer::CreateWorkload(), UnmapLayer::CreateWorkload(), ConvertFp32ToBf16Layer::CreateWorkload(), MinimumLayer::CreateWorkload(), MultiplicationLayer::CreateWorkload(), DivisionLayer::CreateWorkload(), SubtractionLayer::CreateWorkload(), PreluLayer::CreateWorkload(), MaximumLayer::CreateWorkload(), ConstantLayer::CreateWorkload(), QuantizedLstmLayer::CreateWorkload(), and LayerWithParameters< ResizeDescriptor >::PrepInfoAndDesc().
|
virtual |
Reimplemented in ConstantLayer.
Definition at line 274 of file Layer.cpp.
References Layer::OperateOnConstantTensors().
Referenced by BOOST_AUTO_TEST_CASE().
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< LstmDescriptor >, LayerWithParameters< LogSoftmaxDescriptor >, LayerWithParameters< PreCompiledDescriptor >, 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 446 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(), MemCopyLayer::CreateWorkload(), MemImportLayer::CreateWorkload(), StackLayer::CreateWorkload(), SplitterLayer::CreateWorkload(), DequantizeLayer::CreateWorkload(), NormalizationLayer::CreateWorkload(), SoftmaxLayer::CreateWorkload(), FakeQuantizationLayer::CreateWorkload(), Pooling2dLayer::CreateWorkload(), AbsLayer::CreateWorkload(), ConvertFp16ToFp32Layer::CreateWorkload(), QuantizeLayer::CreateWorkload(), ConvertBf16ToFp32Layer::CreateWorkload(), FloorLayer::CreateWorkload(), AdditionLayer::CreateWorkload(), ConvertFp32ToBf16Layer::CreateWorkload(), ResizeLayer::CreateWorkload(), RsqrtLayer::CreateWorkload(), SliceLayer::CreateWorkload(), BatchToSpaceNdLayer::CreateWorkload(), InstanceNormalizationLayer::CreateWorkload(), L2NormalizationLayer::CreateWorkload(), DebugLayer::CreateWorkload(), StridedSliceLayer::CreateWorkload(), SwitchLayer::CreateWorkload(), MapLayer::CreateWorkload(), UnmapLayer::CreateWorkload(), SpaceToDepthLayer::CreateWorkload(), ArgMinMaxLayer::CreateWorkload(), MeanLayer::CreateWorkload(), DepthToSpaceLayer::CreateWorkload(), TransposeLayer::CreateWorkload(), SubtractionLayer::CreateWorkload(), MultiplicationLayer::CreateWorkload(), PadLayer::CreateWorkload(), SpaceToBatchNdLayer::CreateWorkload(), ComparisonLayer::CreateWorkload(), DivisionLayer::CreateWorkload(), GatherLayer::CreateWorkload(), PreluLayer::CreateWorkload(), MinimumLayer::CreateWorkload(), LogSoftmaxLayer::CreateWorkload(), MaximumLayer::CreateWorkload(), ConstantLayer::CreateWorkload(), ReshapeLayer::CreateWorkload(), PermuteLayer::CreateWorkload(), DetectionPostProcessLayer::CreateWorkload(), DepthwiseConvolution2dLayer::CreateWorkload(), TransposeConvolution2dLayer::CreateWorkload(), FullyConnectedLayer::CreateWorkload(), PreCompiledLayer::CreateWorkload(), Convolution2dLayer::CreateWorkload(), BatchNormalizationLayer::CreateWorkload(), QuantizedLstmLayer::CreateWorkload(), LstmLayer::CreateWorkload(), and QLstmLayer::CreateWorkload().
|
inline |
Definition at line 344 of file Layer.hpp.
|
inline |
Definition at line 267 of file Layer.hpp.
References CreateWorkload().
Referenced by armnn::AttemptBackendAssignment(), BOOST_AUTO_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), armnn::InsertDebugLayerAfter(), and MockBackend::OptimizeSubgraphView().
|
inline |
|
inline |
Definition at line 333 of file Layer.hpp.
|
protected |
Definition at line 392 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(), ConvertFp16ToFp32Layer::ValidateTensorShapesFromInputs(), NormalizationLayer::ValidateTensorShapesFromInputs(), Pooling2dLayer::ValidateTensorShapesFromInputs(), ConvertFp32ToBf16Layer::ValidateTensorShapesFromInputs(), SoftmaxLayer::ValidateTensorShapesFromInputs(), FakeQuantizationLayer::ValidateTensorShapesFromInputs(), RsqrtLayer::ValidateTensorShapesFromInputs(), AbsLayer::ValidateTensorShapesFromInputs(), BatchToSpaceNdLayer::ValidateTensorShapesFromInputs(), FloorLayer::ValidateTensorShapesFromInputs(), ResizeLayer::ValidateTensorShapesFromInputs(), InstanceNormalizationLayer::ValidateTensorShapesFromInputs(), SliceLayer::ValidateTensorShapesFromInputs(), ConvertBf16ToFp32Layer::ValidateTensorShapesFromInputs(), DebugLayer::ValidateTensorShapesFromInputs(), L2NormalizationLayer::ValidateTensorShapesFromInputs(), StackLayer::ValidateTensorShapesFromInputs(), SwitchLayer::ValidateTensorShapesFromInputs(), MergeLayer::ValidateTensorShapesFromInputs(), DequantizeLayer::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(), PreluLayer::ValidateTensorShapesFromInputs(), ComparisonLayer::ValidateTensorShapesFromInputs(), SpaceToDepthLayer::ValidateTensorShapesFromInputs(), DepthToSpaceLayer::ValidateTensorShapesFromInputs(), FullyConnectedLayer::ValidateTensorShapesFromInputs(), LogicalBinaryLayer::ValidateTensorShapesFromInputs(), SpaceToBatchNdLayer::ValidateTensorShapesFromInputs(), DepthwiseConvolution2dLayer::ValidateTensorShapesFromInputs(), Convolution2dLayer::ValidateTensorShapesFromInputs(), SplitterLayer::ValidateTensorShapesFromInputs(), BatchNormalizationLayer::ValidateTensorShapesFromInputs(), QuantizedLstmLayer::ValidateTensorShapesFromInputs(), LstmLayer::ValidateTensorShapesFromInputs(), and QLstmLayer::ValidateTensorShapesFromInputs().
|
pure virtual |
Implemented in QLstmLayer, LstmLayer, QuantizedLstmLayer, OutputLayer, BatchNormalizationLayer, SplitterLayer, ConcatLayer, Convolution2dLayer, ComparisonLayer, DepthToSpaceLayer, DepthwiseConvolution2dLayer, FullyConnectedLayer, LogicalBinaryLayer, PreluLayer, SpaceToBatchNdLayer, SpaceToDepthLayer, TransposeConvolution2dLayer, ArgMinMaxLayer, DetectionPostProcessLayer, ElementwiseUnaryLayer, StridedSliceLayer, PreCompiledLayer, ConstantLayer, PermuteLayer, ReshapeLayer, GatherLayer, LogSoftmaxLayer, MeanLayer, PadLayer, StandInLayer, TransposeLayer, AbsLayer, BatchToSpaceNdLayer, ConvertBf16ToFp32Layer, ConvertFp16ToFp32Layer, ConvertFp32ToBf16Layer, DebugLayer, DequantizeLayer, FakeQuantizationLayer, FloorLayer, InputLayer, InstanceNormalizationLayer, L2NormalizationLayer, MapLayer, MemCopyLayer, MemImportLayer, MergeLayer, NormalizationLayer, Pooling2dLayer, ResizeLayer, RsqrtLayer, SliceLayer, SoftmaxLayer, StackLayer, SwitchLayer, UnmapLayer, ConvertFp32ToFp16Layer, FillLayer, ActivationLayer, QuantizeLayer, RankLayer, and ElementwiseBaseLayer.
Referenced by OutputSlot::IsTensorInfoSet().
void VerifyLayerConnections | ( | unsigned int | expectedConnections, |
const CheckLocation & | location | ||
) | const |
Definition at line 348 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(), ConvertFp32ToFp16Layer::ValidateTensorShapesFromInputs(), FillLayer::ValidateTensorShapesFromInputs(), DequantizeLayer::ValidateTensorShapesFromInputs(), MemImportLayer::ValidateTensorShapesFromInputs(), MergeLayer::ValidateTensorShapesFromInputs(), SoftmaxLayer::ValidateTensorShapesFromInputs(), NormalizationLayer::ValidateTensorShapesFromInputs(), RsqrtLayer::ValidateTensorShapesFromInputs(), ResizeLayer::ValidateTensorShapesFromInputs(), ConvertBf16ToFp32Layer::ValidateTensorShapesFromInputs(), ConvertFp16ToFp32Layer::ValidateTensorShapesFromInputs(), Pooling2dLayer::ValidateTensorShapesFromInputs(), AbsLayer::ValidateTensorShapesFromInputs(), FakeQuantizationLayer::ValidateTensorShapesFromInputs(), ConvertFp32ToBf16Layer::ValidateTensorShapesFromInputs(), BatchToSpaceNdLayer::ValidateTensorShapesFromInputs(), FloorLayer::ValidateTensorShapesFromInputs(), SliceLayer::ValidateTensorShapesFromInputs(), DebugLayer::ValidateTensorShapesFromInputs(), InstanceNormalizationLayer::ValidateTensorShapesFromInputs(), L2NormalizationLayer::ValidateTensorShapesFromInputs(), StackLayer::ValidateTensorShapesFromInputs(), SwitchLayer::ValidateTensorShapesFromInputs(), UnmapLayer::ValidateTensorShapesFromInputs(), MapLayer::ValidateTensorShapesFromInputs(), MemCopyLayer::ValidateTensorShapesFromInputs(), TransposeLayer::ValidateTensorShapesFromInputs(), PadLayer::ValidateTensorShapesFromInputs(), GatherLayer::ValidateTensorShapesFromInputs(), MeanLayer::ValidateTensorShapesFromInputs(), LogSoftmaxLayer::ValidateTensorShapesFromInputs(), ReshapeLayer::ValidateTensorShapesFromInputs(), PermuteLayer::ValidateTensorShapesFromInputs(), ArgMinMaxLayer::ValidateTensorShapesFromInputs(), StridedSliceLayer::ValidateTensorShapesFromInputs(), DetectionPostProcessLayer::ValidateTensorShapesFromInputs(), ElementwiseUnaryLayer::ValidateTensorShapesFromInputs(), SpaceToDepthLayer::ValidateTensorShapesFromInputs(), SpaceToBatchNdLayer::ValidateTensorShapesFromInputs(), ComparisonLayer::ValidateTensorShapesFromInputs(), LogicalBinaryLayer::ValidateTensorShapesFromInputs(), PreluLayer::ValidateTensorShapesFromInputs(), TransposeConvolution2dLayer::ValidateTensorShapesFromInputs(), DepthwiseConvolution2dLayer::ValidateTensorShapesFromInputs(), DepthToSpaceLayer::ValidateTensorShapesFromInputs(), Convolution2dLayer::ValidateTensorShapesFromInputs(), ConcatLayer::ValidateTensorShapesFromInputs(), BatchNormalizationLayer::ValidateTensorShapesFromInputs(), QuantizedLstmLayer::ValidateTensorShapesFromInputs(), LstmLayer::ValidateTensorShapesFromInputs(), and QLstmLayer::ValidateTensorShapesFromInputs().
|
protected |
Definition at line 432 of file Layer.cpp.
References TensorShape::AreAllDimensionsSpecified(), TensorShape::GetDimensionality(), armnn::NotSpecified, and armnn::ValidateOnly.
Referenced by ElementwiseBaseLayer::ValidateTensorShapesFromInputs(), RankLayer::ValidateTensorShapesFromInputs(), QuantizeLayer::ValidateTensorShapesFromInputs(), ActivationLayer::ValidateTensorShapesFromInputs(), ConvertFp32ToFp16Layer::ValidateTensorShapesFromInputs(), FillLayer::ValidateTensorShapesFromInputs(), DequantizeLayer::ValidateTensorShapesFromInputs(), MemImportLayer::ValidateTensorShapesFromInputs(), MergeLayer::ValidateTensorShapesFromInputs(), SoftmaxLayer::ValidateTensorShapesFromInputs(), NormalizationLayer::ValidateTensorShapesFromInputs(), RsqrtLayer::ValidateTensorShapesFromInputs(), ResizeLayer::ValidateTensorShapesFromInputs(), ConvertBf16ToFp32Layer::ValidateTensorShapesFromInputs(), ConvertFp16ToFp32Layer::ValidateTensorShapesFromInputs(), Pooling2dLayer::ValidateTensorShapesFromInputs(), AbsLayer::ValidateTensorShapesFromInputs(), FakeQuantizationLayer::ValidateTensorShapesFromInputs(), ConvertFp32ToBf16Layer::ValidateTensorShapesFromInputs(), BatchToSpaceNdLayer::ValidateTensorShapesFromInputs(), FloorLayer::ValidateTensorShapesFromInputs(), SliceLayer::ValidateTensorShapesFromInputs(), DebugLayer::ValidateTensorShapesFromInputs(), InstanceNormalizationLayer::ValidateTensorShapesFromInputs(), StackLayer::ValidateTensorShapesFromInputs(), L2NormalizationLayer::ValidateTensorShapesFromInputs(), SwitchLayer::ValidateTensorShapesFromInputs(), MemCopyLayer::ValidateTensorShapesFromInputs(), PadLayer::ValidateTensorShapesFromInputs(), MeanLayer::ValidateTensorShapesFromInputs(), GatherLayer::ValidateTensorShapesFromInputs(), TransposeLayer::ValidateTensorShapesFromInputs(), LogSoftmaxLayer::ValidateTensorShapesFromInputs(), ReshapeLayer::ValidateTensorShapesFromInputs(), PermuteLayer::ValidateTensorShapesFromInputs(), ArgMinMaxLayer::ValidateTensorShapesFromInputs(), StridedSliceLayer::ValidateTensorShapesFromInputs(), DetectionPostProcessLayer::ValidateTensorShapesFromInputs(), ElementwiseUnaryLayer::ValidateTensorShapesFromInputs(), TransposeConvolution2dLayer::ValidateTensorShapesFromInputs(), FullyConnectedLayer::ValidateTensorShapesFromInputs(), DepthwiseConvolution2dLayer::ValidateTensorShapesFromInputs(), ComparisonLayer::ValidateTensorShapesFromInputs(), LogicalBinaryLayer::ValidateTensorShapesFromInputs(), PreluLayer::ValidateTensorShapesFromInputs(), SpaceToBatchNdLayer::ValidateTensorShapesFromInputs(), SpaceToDepthLayer::ValidateTensorShapesFromInputs(), DepthToSpaceLayer::ValidateTensorShapesFromInputs(), Convolution2dLayer::ValidateTensorShapesFromInputs(), ConcatLayer::ValidateTensorShapesFromInputs(), SplitterLayer::ValidateTensorShapesFromInputs(), BatchNormalizationLayer::ValidateTensorShapesFromInputs(), QuantizedLstmLayer::ValidateTensorShapesFromInputs(), LstmLayer::ValidateTensorShapesFromInputs(), and QLstmLayer::ValidateTensorShapesFromInputs().
|
protected |
Definition at line 391 of file Layer.hpp.
Referenced by Layer::SetAdditionalInfo().
|
protected |
Definition at line 404 of file Layer.hpp.
Referenced by ConcatLayer::CreateWorkload(), SplitterLayer::CreateWorkload(), and Layer::Layer().
|
protected |
Definition at line 405 of file Layer.hpp.
Referenced by Layer::CloneBase(), ElementwiseBaseLayer::InferOutputShapes(), ElementwiseBaseLayer::ValidateTensorShapesFromInputs(), RankLayer::ValidateTensorShapesFromInputs(), QuantizeLayer::ValidateTensorShapesFromInputs(), ActivationLayer::ValidateTensorShapesFromInputs(), ConvertFp32ToFp16Layer::ValidateTensorShapesFromInputs(), FillLayer::ValidateTensorShapesFromInputs(), DequantizeLayer::ValidateTensorShapesFromInputs(), MemCopyLayer::ValidateTensorShapesFromInputs(), MemImportLayer::ValidateTensorShapesFromInputs(), RsqrtLayer::ValidateTensorShapesFromInputs(), ResizeLayer::ValidateTensorShapesFromInputs(), MergeLayer::ValidateTensorShapesFromInputs(), ConvertFp16ToFp32Layer::ValidateTensorShapesFromInputs(), NormalizationLayer::ValidateTensorShapesFromInputs(), ConvertBf16ToFp32Layer::ValidateTensorShapesFromInputs(), Pooling2dLayer::ValidateTensorShapesFromInputs(), ConvertFp32ToBf16Layer::ValidateTensorShapesFromInputs(), FakeQuantizationLayer::ValidateTensorShapesFromInputs(), AbsLayer::ValidateTensorShapesFromInputs(), BatchToSpaceNdLayer::ValidateTensorShapesFromInputs(), FloorLayer::ValidateTensorShapesFromInputs(), InstanceNormalizationLayer::ValidateTensorShapesFromInputs(), SliceLayer::ValidateTensorShapesFromInputs(), SoftmaxLayer::ValidateTensorShapesFromInputs(), L2NormalizationLayer::ValidateTensorShapesFromInputs(), StackLayer::ValidateTensorShapesFromInputs(), SwitchLayer::ValidateTensorShapesFromInputs(), DebugLayer::ValidateTensorShapesFromInputs(), MeanLayer::ValidateTensorShapesFromInputs(), PadLayer::ValidateTensorShapesFromInputs(), GatherLayer::ValidateTensorShapesFromInputs(), TransposeLayer::ValidateTensorShapesFromInputs(), LogSoftmaxLayer::ValidateTensorShapesFromInputs(), PermuteLayer::ValidateTensorShapesFromInputs(), ReshapeLayer::ValidateTensorShapesFromInputs(), DetectionPostProcessLayer::ValidateTensorShapesFromInputs(), StridedSliceLayer::ValidateTensorShapesFromInputs(), ElementwiseUnaryLayer::ValidateTensorShapesFromInputs(), ArgMinMaxLayer::ValidateTensorShapesFromInputs(), TransposeConvolution2dLayer::ValidateTensorShapesFromInputs(), SpaceToBatchNdLayer::ValidateTensorShapesFromInputs(), LogicalBinaryLayer::ValidateTensorShapesFromInputs(), DepthwiseConvolution2dLayer::ValidateTensorShapesFromInputs(), DepthToSpaceLayer::ValidateTensorShapesFromInputs(), PreluLayer::ValidateTensorShapesFromInputs(), SpaceToDepthLayer::ValidateTensorShapesFromInputs(), ComparisonLayer::ValidateTensorShapesFromInputs(), FullyConnectedLayer::ValidateTensorShapesFromInputs(), Convolution2dLayer::ValidateTensorShapesFromInputs(), ConcatLayer::ValidateTensorShapesFromInputs(), SplitterLayer::ValidateTensorShapesFromInputs(), BatchNormalizationLayer::ValidateTensorShapesFromInputs(), QuantizedLstmLayer::ValidateTensorShapesFromInputs(), LstmLayer::ValidateTensorShapesFromInputs(), and QLstmLayer::ValidateTensorShapesFromInputs().