22.02
|
#include <Layer.hpp>
Public Member Functions | |
OutputSlot (Layer &owner, OutputHandler &outputHandler) | |
OutputSlot (const OutputSlot &)=delete | |
OutputSlot & | operator= (const OutputSlot &)=delete |
OutputSlot & | operator= (OutputSlot &&)=delete |
OutputSlot (OutputSlot &&)=default | |
~OutputSlot () | |
Layer & | GetOwningLayer () const |
const IConnectableLayer & | GetOwningIConnectableLayer () const override |
LayerGuid | GetOwningLayerGuid () const override |
const OutputHandler & | GetOutputHandler () const |
OutputHandler & | GetOutputHandler () |
int | Connect (InputSlot &destination) |
void | Disconnect (InputSlot &slot) |
const std::vector< InputSlot * > & | GetConnections () const |
const std::vector< EdgeStrategy > & | GetEdgeStrategies () const |
bool | ValidateTensorShape (const TensorShape &shape) const |
void | DisconnectAll () |
void | MoveAllConnections (OutputSlot &destination) |
Moves all connections to another OutputSlot. More... | |
unsigned int | GetNumConnections () const override |
const InputSlot * | GetConnection (unsigned int index) const override |
InputSlot * | GetConnection (unsigned int index) override |
void | SetTensorInfo (const TensorInfo &tensorInfo) override |
const TensorInfo & | GetTensorInfo () const override |
bool | IsTensorInfoSet () const override |
int | Connect (IInputSlot &destination) override |
void | Disconnect (IInputSlot &slot) override |
unsigned int | CalculateIndexOnOwner () const override |
bool | operator== (const OutputSlot &other) const |
void | SetTensorHandleFactory (const ITensorHandleFactory::FactoryId &id) |
ITensorHandleFactory::FactoryId | GetTensorHandleFactoryId () const |
void | SetEdgeStrategy (unsigned int connectionIndex, EdgeStrategy strategy) |
EdgeStrategy | GetEdgeStrategyForConnection (unsigned int connectionIdx) const |
Additional Inherited Members | |
Protected Member Functions inherited from IOutputSlot | |
~IOutputSlot () | |
Not user deletable. More... | |
|
inlineexplicit |
Definition at line 89 of file Layer.hpp.
|
delete |
|
default |
|
inline |
|
overridevirtual |
Implements IOutputSlot.
Definition at line 133 of file Layer.cpp.
References ARMNN_ASSERT_MSG, Layer::GetNumOutputSlots(), Layer::GetOutputSlot(), and InputSlot::GetOwningLayer().
Referenced by DebugLayer::CreateWorkload().
int Connect | ( | InputSlot & | destination | ) |
Definition at line 86 of file Layer.cpp.
References armnn::numeric_cast(), InputSlot::SetConnection(), and armnn::Undefined.
Referenced by NetworkImpl::AddFullyConnectedLayer(), CreateTestNetwork(), InputSlot::Insert(), Graph::InsertNewLayer(), OutputSlot::MoveAllConnections(), and TEST_SUITE().
|
inlineoverridevirtual |
void Disconnect | ( | InputSlot & | slot | ) |
Definition at line 94 of file Layer.cpp.
References InputSlot::SetConnection().
|
inlineoverridevirtual |
Implements IOutputSlot.
Definition at line 156 of file Layer.hpp.
References armnnUtils::operator==().
void DisconnectAll | ( | ) |
Definition at line 110 of file Layer.cpp.
References InputSlot::GetConnection().
|
overridevirtual |
Implements IOutputSlot.
Definition at line 49 of file Layer.cpp.
Referenced by SplitterLayer::CreateWorkload(), OutputSlot::operator==(), and TEST_SUITE().
|
overridevirtual |
Implements IOutputSlot.
|
inline |
Definition at line 130 of file Layer.hpp.
Referenced by Graph::AddCompatibilityLayers(), armnn::CalculateSlotOption(), armnn::CalculateSlotOptionForInput(), SquashEqualSiblingsImpl< Comparable >::Run(), and armnn::SelectTensorHandleStrategy().
|
inline |
Definition at line 131 of file Layer.hpp.
Referenced by Graph::AddCompatibilityLayers().
EdgeStrategy GetEdgeStrategyForConnection | ( | unsigned int | connectionIdx | ) | const |
Definition at line 189 of file Layer.cpp.
Referenced by TEST_SUITE().
|
inlineoverridevirtual |
Implements IOutputSlot.
Definition at line 143 of file Layer.hpp.
References InputSlot::GetConnection(), armnn::GetTensorInfo(), and armnn::numeric_cast().
Referenced by ConcatLayer::CreateWorkload(), OutputSlot::operator==(), LoadedNetwork::RegisterDebugCallback(), OptimizeConsecutiveReshapesImpl::Run(), MovePermuteUpImpl::Run(), MoveTransposeUpImpl::Run(), SquashEqualSiblingsImpl< Comparable >::Run(), and AddBroadcastReshapeLayerImpl::Run().
|
inline |
Definition at line 124 of file Layer.hpp.
Referenced by ConcatLayer::CreateWorkload(), OutputSlot::MoveAllConnections(), and TEST_SUITE().
|
inline |
|
overridevirtual |
Implements IOutputSlot.
|
inline |
Definition at line 118 of file Layer.hpp.
References InputSlot::GetOwningIConnectableLayer().
Referenced by armnn::CalculateSlotOption(), armnn::CalculateSlotOptionForInput(), DebugLayer::CreateWorkload(), ConcatLayer::CreateWorkload(), armnn::optimizations::pad_fold::FoldPadIntoLayer2dImpl(), Layer::GetPriority(), Graph::InsertNewLayer(), OptimizeConsecutiveReshapesImpl::Run(), PermuteAndBatchToSpaceAsDepthToSpaceImpl< PermuteType >::Run(), OptimizeInverseConversionsImpl::Run(), OptimizeInversePermutesImpl< PermuteType >::Run(), MovePermuteUpImpl::Run(), RedirectMembersToConstantInputsImpl::Run(), MoveTransposeUpImpl::Run(), FuseBatchNorm< ConvLayer, ArmnnType, T >::Run(), AddBroadcastReshapeLayerImpl::Run(), and Graph::SerializeToDot().
|
overridevirtual |
Implements IOutputSlot.
Definition at line 169 of file Layer.cpp.
References Layer::GetGuid(), and InputSlot::GetOwningLayer().
ITensorHandleFactory::FactoryId GetTensorHandleFactoryId | ( | ) | const |
Definition at line 179 of file Layer.cpp.
Referenced by Graph::AddCompatibilityLayers(), SplitterLayer::CreateTensorHandles(), ConcatLayer::CreateTensorHandles(), Layer::CreateTensorHandles(), SplitterLayer::CreateWorkload(), ConcatLayer::CreateWorkload(), LoadedNetwork::ImportInputs(), LoadedNetwork::ImportOutputs(), and TEST_SUITE().
|
overridevirtual |
Implements IOutputSlot.
Definition at line 66 of file Layer.cpp.
Referenced by armnn::CheckScaleSetOnQuantizedType(), ConcatLayer::CreateWorkload(), armnn::optimizations::pad_fold::FoldPadIntoLayer2dImpl(), Layer::GetDataType(), LoadedNetwork::ImportInputs(), LoadedNetwork::ImportOutputs(), armnn::InsertConvertBf16ToFp32LayersBefore(), armnn::InsertConvertFp16ToFp32LayersBefore(), armnn::InsertConvertFp32ToBf16LayersAfter(), armnn::InsertConvertFp32ToBf16LayersBefore(), armnn::InsertConvertFp32ToFp16LayersAfter(), armnn::InsertDebugLayerAfter(), NeonBackend::OptimizeSubgraphView(), ClBackend::OptimizeSubgraphView(), PermuteAndBatchToSpaceAsDepthToSpaceImpl< PermuteType >::Run(), AddBroadcastReshapeLayerImpl::Run(), FuseBatchNorm< ConvLayer, ArmnnType, T >::Run(), Graph::SerializeToDot(), TEST_SUITE(), Layer::ValidateAndCopyShape(), ElementwiseBaseLayer::ValidateTensorShapesFromInputs(), RankLayer::ValidateTensorShapesFromInputs(), QuantizeLayer::ValidateTensorShapesFromInputs(), ActivationLayer::ValidateTensorShapesFromInputs(), ConvertFp32ToFp16Layer::ValidateTensorShapesFromInputs(), ReduceLayer::ValidateTensorShapesFromInputs(), FillLayer::ValidateTensorShapesFromInputs(), ConvertFp16ToFp32Layer::ValidateTensorShapesFromInputs(), SwitchLayer::ValidateTensorShapesFromInputs(), RsqrtLayer::ValidateTensorShapesFromInputs(), InstanceNormalizationLayer::ValidateTensorShapesFromInputs(), ConvertFp32ToBf16Layer::ValidateTensorShapesFromInputs(), BatchToSpaceNdLayer::ValidateTensorShapesFromInputs(), MergeLayer::ValidateTensorShapesFromInputs(), L2NormalizationLayer::ValidateTensorShapesFromInputs(), AbsLayer::ValidateTensorShapesFromInputs(), MemCopyLayer::ValidateTensorShapesFromInputs(), DebugLayer::ValidateTensorShapesFromInputs(), CastLayer::ValidateTensorShapesFromInputs(), NormalizationLayer::ValidateTensorShapesFromInputs(), Pooling2dLayer::ValidateTensorShapesFromInputs(), Pooling3dLayer::ValidateTensorShapesFromInputs(), SoftmaxLayer::ValidateTensorShapesFromInputs(), DequantizeLayer::ValidateTensorShapesFromInputs(), MemImportLayer::ValidateTensorShapesFromInputs(), ResizeLayer::ValidateTensorShapesFromInputs(), ConvertBf16ToFp32Layer::ValidateTensorShapesFromInputs(), ShapeLayer::ValidateTensorShapesFromInputs(), SliceLayer::ValidateTensorShapesFromInputs(), FakeQuantizationLayer::ValidateTensorShapesFromInputs(), FloorLayer::ValidateTensorShapesFromInputs(), StackLayer::ValidateTensorShapesFromInputs(), TransposeLayer::ValidateTensorShapesFromInputs(), MeanLayer::ValidateTensorShapesFromInputs(), LogSoftmaxLayer::ValidateTensorShapesFromInputs(), ChannelShuffleLayer::ValidateTensorShapesFromInputs(), PadLayer::ValidateTensorShapesFromInputs(), PermuteLayer::ValidateTensorShapesFromInputs(), ReshapeLayer::ValidateTensorShapesFromInputs(), ConstantLayer::ValidateTensorShapesFromInputs(), Convolution3dLayer::ValidateTensorShapesFromInputs(), StridedSliceLayer::ValidateTensorShapesFromInputs(), ElementwiseUnaryLayer::ValidateTensorShapesFromInputs(), DetectionPostProcessLayer::ValidateTensorShapesFromInputs(), ArgMinMaxLayer::ValidateTensorShapesFromInputs(), GatherLayer::ValidateTensorShapesFromInputs(), SpaceToDepthLayer::ValidateTensorShapesFromInputs(), DepthwiseConvolution2dLayer::ValidateTensorShapesFromInputs(), TransposeConvolution2dLayer::ValidateTensorShapesFromInputs(), LogicalBinaryLayer::ValidateTensorShapesFromInputs(), ComparisonLayer::ValidateTensorShapesFromInputs(), DepthToSpaceLayer::ValidateTensorShapesFromInputs(), PreluLayer::ValidateTensorShapesFromInputs(), SpaceToBatchNdLayer::ValidateTensorShapesFromInputs(), Convolution2dLayer::ValidateTensorShapesFromInputs(), FullyConnectedLayer::ValidateTensorShapesFromInputs(), SplitterLayer::ValidateTensorShapesFromInputs(), LstmLayer::ValidateTensorShapesFromInputs(), ConcatLayer::ValidateTensorShapesFromInputs(), UnidirectionalSequenceLstmLayer::ValidateTensorShapesFromInputs(), BatchNormalizationLayer::ValidateTensorShapesFromInputs(), QuantizedLstmLayer::ValidateTensorShapesFromInputs(), and QLstmLayer::ValidateTensorShapesFromInputs().
|
overridevirtual |
Implements IOutputSlot.
Definition at line 71 of file Layer.cpp.
References InputSlot::GetOwningLayer(), armnn::InferAndValidate, and Layer::ValidateTensorShapesFromInputs().
Referenced by AddBroadcastReshapeLayerImpl::Run().
void MoveAllConnections | ( | OutputSlot & | destination | ) |
Moves all connections to another OutputSlot.
Definition at line 119 of file Layer.cpp.
References ARMNN_ASSERT_MSG, OutputSlot::Connect(), InputSlot::GetConnection(), OutputSlot::GetOutputHandler(), armnn::GetTensorInfo(), OutputHandler::SetTensorInfo(), and armnn::Undefined.
Referenced by Graph::InsertNewLayer(), TransposeAsReshapeImpl::Run(), PermuteAsReshapeImpl::Run(), OptimizeConsecutiveReshapesImpl::Run(), OptimizeInverseConversionsImpl::Run(), PermuteAndBatchToSpaceAsDepthToSpaceImpl< PermuteType >::Run(), OptimizeInversePermutesImpl< PermuteType >::Run(), and FuseBatchNorm< ConvLayer, ArmnnType, T >::Run().
|
delete |
|
delete |
bool operator== | ( | const OutputSlot & | other | ) | const |
Definition at line 146 of file Layer.cpp.
References InputSlot::GetConnection(), OutputSlot::GetConnection(), and OutputSlot::GetNumConnections().
void SetEdgeStrategy | ( | unsigned int | connectionIndex, |
EdgeStrategy | strategy | ||
) |
Definition at line 184 of file Layer.cpp.
Referenced by Graph::AddCompatibilityLayers(), InputSlot::Insert(), armnn::SelectTensorHandleStrategy(), and TEST_SUITE().
void SetTensorHandleFactory | ( | const ITensorHandleFactory::FactoryId & | id | ) |
Definition at line 174 of file Layer.cpp.
Referenced by Graph::AddCompatibilityLayers(), and armnn::SelectTensorHandleStrategy().
|
overridevirtual |
Implements IOutputSlot.
Definition at line 61 of file Layer.cpp.
Referenced by NetworkImpl::AddFullyConnectedLayer(), armnn::AttemptBackendAssignment(), armnn::ChainReduceLayers(), armnn::CheckScaleSetOnQuantizedType(), armnn::InsertConvertBf16ToFp32LayersBefore(), armnn::InsertConvertFp16ToFp32LayersBefore(), armnn::InsertConvertFp32ToBf16LayersAfter(), armnn::InsertConvertFp32ToBf16LayersBefore(), armnn::InsertConvertFp32ToFp16LayersAfter(), armnn::InsertDebugLayerAfter(), AddBroadcastReshapeLayerImpl::Run(), TEST_SUITE(), and Layer::ValidateAndCopyShape().
bool ValidateTensorShape | ( | const TensorShape & | shape | ) | const |
Definition at line 80 of file Layer.cpp.
References ARMNN_ASSERT_MSG.