aboutsummaryrefslogtreecommitdiff
path: root/include/armnn
diff options
context:
space:
mode:
Diffstat (limited to 'include/armnn')
-rw-r--r--include/armnn/BackendHelper.hpp4
-rw-r--r--include/armnn/Descriptors.hpp6
-rw-r--r--include/armnn/ILayerVisitor.hpp534
-rw-r--r--include/armnn/INetwork.hpp24
-rw-r--r--include/armnn/IStrategy.hpp5
-rw-r--r--include/armnn/LayerVisitorBase.hpp271
-rw-r--r--include/armnn/backends/CMakeLists.txt1
-rw-r--r--include/armnn/backends/CpuTensorHandleFwd.hpp20
-rw-r--r--include/armnn/backends/IBackendInternal.hpp4
-rw-r--r--include/armnn/backends/TensorHandle.hpp13
10 files changed, 5 insertions, 877 deletions
diff --git a/include/armnn/BackendHelper.hpp b/include/armnn/BackendHelper.hpp
index 87b99f03f0..09c7385d5c 100644
--- a/include/armnn/BackendHelper.hpp
+++ b/include/armnn/BackendHelper.hpp
@@ -467,10 +467,6 @@ Optional<const BackendOptions::BackendOption> GetCapability(const std::string& b
Optional<const BackendOptions::BackendOption> GetCapability(const std::string& backendCapabilityName,
const armnn::BackendId& backend);
-/// Convenience function to check a capability on a backend
-ARMNN_DEPRECATED_MSG_REMOVAL_DATE("This function has been deprecated in favour of GetBackendCapability", "22.05")
-bool IsCapabilitySupported(const armnn::BackendId& backend, armnn::BackendCapability capability);
-
/// Returns the number of cached files if backend supports caching
unsigned int GetNumberOfCacheFiles(const armnn::BackendId& backend);
diff --git a/include/armnn/Descriptors.hpp b/include/armnn/Descriptors.hpp
index 7f46c6a79d..628d045529 100644
--- a/include/armnn/Descriptors.hpp
+++ b/include/armnn/Descriptors.hpp
@@ -480,11 +480,7 @@ struct FullyConnectedDescriptor : BaseDescriptor
&& m_ConstantWeights == rhs.m_ConstantWeights;
}
- /// Get the number of views/inputs.
- ARMNN_DEPRECATED_MSG_REMOVAL_DATE("Use GetNumInputs instead", "22.05")
- uint32_t GetNumViews() const;
-
- /// Get the number of views/inputs.
+ /// Get the number of inputs.
uint32_t GetNumInputs() const;
/// Enable/disable bias.
diff --git a/include/armnn/ILayerVisitor.hpp b/include/armnn/ILayerVisitor.hpp
deleted file mode 100644
index a0c782e66e..0000000000
--- a/include/armnn/ILayerVisitor.hpp
+++ /dev/null
@@ -1,534 +0,0 @@
-//
-// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
-// SPDX-License-Identifier: MIT
-//
-#pragma once
-
-#include <armnn/Deprecated.hpp>
-#include <armnn/DescriptorsFwd.hpp>
-#include <armnn/NetworkFwd.hpp>
-#include <armnn/Optional.hpp>
-#include <armnn/TensorFwd.hpp>
-#include <armnn/Types.hpp>
-
-namespace armnn
-{
-class ARMNN_DEPRECATED_MSG_REMOVAL_DATE("Use ABI stable IStrategy instead.", "22.05") ILayerVisitor
-{
-protected:
- ILayerVisitor() {}
- virtual ~ILayerVisitor() {}
-
-public:
-
- /// Function that an activation layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param activationDescriptor - ActivationDescriptor to configure the activation.
- /// @param name - Optional name for the layer.
- virtual void VisitActivationLayer(const IConnectableLayer* layer,
- const ActivationDescriptor& activationDescriptor,
- const char* name = nullptr) = 0;
-
- /// Function that an addition layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param name - Optional name for the layer.
- virtual void VisitAdditionLayer(const IConnectableLayer* layer,
- const char* name = nullptr) = 0;
-
- /// Function that an arg min max layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param argMinMaxDescriptor - ArgMinMaxDescriptor to configure the activation.
- /// @param name - Optional name for the layer.
- virtual void VisitArgMinMaxLayer(const IConnectableLayer* layer,
- const ArgMinMaxDescriptor& argMinMaxDescriptor,
- const char* name = nullptr) = 0;
-
- /// Function that a batch normalization layer should call back to when its Accept(ILayerVisitor&)
- /// function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param mean - Pre-calculated mean for each channel.
- /// @param variance - Pre-calculated variance for each channel.
- /// @param beta - Per-channel additive factor.
- /// @param gamma - Per-channel multiplicative factor.
- /// @param name - Optional name for the layer.
- virtual void VisitBatchNormalizationLayer(const IConnectableLayer* layer,
- const BatchNormalizationDescriptor& desc,
- const ConstTensor& mean,
- const ConstTensor& variance,
- const ConstTensor& beta,
- const ConstTensor& gamma,
- const char* name = nullptr) = 0;
-
- /// Function that a batch to space ND layer should call back to when its Accept(ILayerVisitor&)
- /// function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param batchToSpaceNdDescriptor - Description of the layer.
- /// @param name - Optional name for the layer.
- virtual void VisitBatchToSpaceNdLayer(const IConnectableLayer* layer,
- const BatchToSpaceNdDescriptor& batchToSpaceNdDescriptor,
- const char* name = nullptr) = 0;
-
- /// Function a Comparison layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param comparisonDescriptor - Description of the layer.
- /// @param name - Optional name for the layer.
- virtual void VisitComparisonLayer(const IConnectableLayer* layer,
- const ComparisonDescriptor& comparisonDescriptor,
- const char* name = nullptr) = 0;
-
- /// Function that a concat layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param concatDescriptor - ConcatDescriptor (synonym for OriginsDescriptor) to configure the concatenation
- /// process. Number of Views must be equal to the number of inputs, and their order
- /// must match - e.g. first view corresponds to the first input, second view to the
- /// second input, etc....
- /// @param name - Optional name for the layer.
- virtual void VisitConcatLayer(const IConnectableLayer* layer,
- const OriginsDescriptor& concatDescriptor,
- const char* name = nullptr) = 0;
-
- /// Function a layer with no inputs and a single output, which always corresponds to
- /// the passed in constant tensor should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param input - Tensor to be provided as the only output of the layer. The layer will maintain
- /// its own copy of the tensor data, meaning the memory referenced by @a input can
- /// be freed or reused after this function is called.
- /// @param name - Optional name for the layer.
- virtual void VisitConstantLayer(const IConnectableLayer* layer,
- const ConstTensor& input,
- const char* name = nullptr) = 0;
-
- /// Function that a 2D convolution layer should call back to when its Accept(ILayerVisitor&)
- /// function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param convolution2dDescriptor - Description of the 2D convolution layer.
- /// @param name - Optional name for the layer.
- virtual void VisitConvolution2dLayer(const IConnectableLayer* layer,
- const Convolution2dDescriptor& convolution2dDescriptor,
- const char* name = nullptr) = 0;
-
- /// Function that a 2D convolution layer should call back to when its Accept(ILayerVisitor&)
- /// function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param convolution2dDescriptor - Description of the 2D convolution layer.
- /// @param weights - Tensor for the weights data.
- /// @param biases - Optional tensor for the bias data. If specified, must match the output tensor shape.
- /// @param name - Optional name for the layer.
- ARMNN_DEPRECATED_MSG("Use VisitConvolution2dLayer without ConstTensors")
- virtual void VisitConvolution2dLayer(const IConnectableLayer* layer,
- const Convolution2dDescriptor& convolution2dDescriptor,
- const ConstTensor& weights,
- const Optional<ConstTensor>& biases,
- const char* name = nullptr) = 0;
-
- /// Function a depth to space layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param depthToSpaceDescriptor - Parameters for the depth to space operation.
- /// @param name - Optional name for the layer.
- virtual void VisitDepthToSpaceLayer(const IConnectableLayer* layer,
- const DepthToSpaceDescriptor& depthToSpaceDescriptor,
- const char* name = nullptr) = 0;
-
- /// Function that a 2D depthwise convolution layer with biases should call back to when its
- /// Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param convolution2dDescriptor - Description of the 2D depthwise convolution layer.
- /// @param name - Optional name for the layer.
- virtual void VisitDepthwiseConvolution2dLayer(const IConnectableLayer* layer,
- const DepthwiseConvolution2dDescriptor& convolution2dDescriptor,
- const char* name = nullptr) = 0;
-
- /// Function that a 2D depthwise convolution layer with biases should call back to when its
- /// Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param convolution2dDescriptor - Description of the 2D depthwise convolution layer.
- /// @param weights - Tensor for the weights. Expected format: [channelMultiplier, inputChannels, height, width].
- /// @param biases - Optional tensor for the bias data. If specified, must match the output tensor shape.
- /// @param name - Optional name for the layer.
- ARMNN_DEPRECATED_MSG("Use VisitDepthwiseConvolution2dLayer without ConstTensors")
- virtual void VisitDepthwiseConvolution2dLayer(const IConnectableLayer* layer,
- const DepthwiseConvolution2dDescriptor& convolution2dDescriptor,
- const ConstTensor& weights,
- const Optional<ConstTensor>& biases,
- const char* name = nullptr) = 0;
-
- /// Function that a Dequantize layer should call back to when its
- /// Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param name - Optional name for the layer.
- virtual void VisitDequantizeLayer(const IConnectableLayer* layer,
- const char* name = nullptr) = 0;
-
- /// Function that a Detection PostProcess layer should call back to when its
- /// Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param descriptor - Description of the Detection PostProcess layer.
- /// @param anchors - Tensor for the anchors.
- /// @param name - Optional name for the layer.
- virtual void VisitDetectionPostProcessLayer(const IConnectableLayer* layer,
- const DetectionPostProcessDescriptor& descriptor,
- const ConstTensor& anchors,
- const char* name = nullptr) = 0;
-
- /// Function a division layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param name - Optional name for the layer.
- virtual void VisitDivisionLayer(const IConnectableLayer* layer,
- const char* name = nullptr) = 0;
-
- /// Function a ElementwiseUnary layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param elementwiseUnaryDescriptor - Description of the layer.
- /// @param name - Optional name for the layer.
- virtual void VisitElementwiseUnaryLayer(const IConnectableLayer* layer,
- const ElementwiseUnaryDescriptor& elementwiseUnaryDescriptor,
- const char* name = nullptr) = 0;
-
- /// Function a fill layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param fillDescriptor - Description of the layer
- /// @param name - Optional name for the layer.
- virtual void VisitFillLayer(const IConnectableLayer* layer,
- const FillDescriptor& fillDescriptor,
- const char* name = nullptr) = 0;
-
- /// Function a floor layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param name - Optional name for the layer.
- virtual void VisitFloorLayer(const IConnectableLayer* layer,
- const char* name = nullptr) = 0;
-
-
- /// Function that a fully connected layer should call back to when its Accept(ILayerVisitor&)
- /// function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param fullyConnectedDescriptor - Description of the fully connected layer.
- /// @param name - Optional name for the layer.
- virtual void VisitFullyConnectedLayer(const IConnectableLayer* layer,
- const FullyConnectedDescriptor& fullyConnectedDescriptor,
- const char* name = nullptr) = 0;
-
- /// Function that a fully connected layer should call back to when its Accept(ILayerVisitor&)
- /// function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param fullyConnectedDescriptor - Description of the fully connected layer.
- /// @param weights - Tensor for the weights data.
- /// @param biases - Optional tensor for the bias data.
- /// @param name - Optional name for the layer.
- ARMNN_DEPRECATED_MSG_REMOVAL_DATE("Use VisitFullyConnectedLayer without ConstTensors", "22.05")
- virtual void VisitFullyConnectedLayer(const IConnectableLayer* layer,
- const FullyConnectedDescriptor& fullyConnectedDescriptor,
- const ConstTensor& weights,
- const Optional<ConstTensor>& biases,
- const char* name = nullptr) = 0;
-
- /// Function a Gather layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param gatherDescriptor - Parameters for the gather operation.
- /// @param name - Optional name for the layer.
- virtual void VisitGatherLayer(const IConnectableLayer* layer,
- const GatherDescriptor& gatherDescriptor,
- const char* name = nullptr) = 0;
-
- /// Function that an InputLayer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param id - User generated id to uniquely identify a particular input. The same id needs to be specified
- /// when passing the inputs to the IRuntime::EnqueueWorkload() function.
- /// @param name - Optional name for the layer.
- virtual void VisitInputLayer(const IConnectableLayer* layer,
- LayerBindingId id,
- const char* name = nullptr) = 0;
-
- /// Function that an instance normalization layer should call back to when its Accept(ILayerVisitor&)
- /// function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param desc - Parameters for the instance normalization operation.
- /// @param name - Optional name for the layer.
- virtual void VisitInstanceNormalizationLayer(const IConnectableLayer* layer,
- const InstanceNormalizationDescriptor& desc,
- const char* name = nullptr) = 0;
-
- /// Function that an L2 normalization layer should call back to when its Accept(ILayerVisitor&)
- /// function is invoked. Normalization is performed along dimension 1, but requires a 4d input.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param desc - Parameters for the L2 normalization operation.
- /// @param name - Optional name for the layer.
- virtual void VisitL2NormalizationLayer(const IConnectableLayer* layer,
- const L2NormalizationDescriptor& desc,
- const char* name = nullptr) = 0;
-
- /// Function that a log softmax layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param logSoftmaxDescriptor - LogSoftmaxDescriptor to configure the log softmax.
- /// @param name - Optional name for the layer.
- virtual void VisitLogSoftmaxLayer(const IConnectableLayer* layer,
- const LogSoftmaxDescriptor& logSoftmaxDescriptor,
- const char* name = nullptr) = 0;
-
- /// Function that a logical binary layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param logicalBinaryDescriptor - LogicalBinaryDescriptor to configure the logical unary layer.
- /// @param name - Optional name for the layer.
- virtual void VisitLogicalBinaryLayer(const IConnectableLayer* layer,
- const LogicalBinaryDescriptor& logicalBinaryDescriptor,
- const char* name = nullptr) = 0;
-
- /// Function an Lstm layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param descriptor - Parameters controlling the operation of the Lstm operation.
- /// @param params - The weights and biases for the LSTM cell.
- /// @param name - Optional name for the layer.
- virtual void VisitLstmLayer(const IConnectableLayer* layer,
- const LstmDescriptor& descriptor,
- const LstmInputParams& params,
- const char* name = nullptr) = 0;
-
- /// Function a Maximum layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param name - Optional name for the layer.
- virtual void VisitMaximumLayer(const IConnectableLayer* layer,
- const char* name = nullptr) = 0;
-
- /// Function a Mean layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param meanDescriptor - Parameters for the mean operation.
- /// @param name - Optional name for the layer.
- virtual void VisitMeanLayer(const IConnectableLayer* layer,
- const MeanDescriptor& meanDescriptor,
- const char* name = nullptr) = 0;
-
- /// Function that a merge layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param name - Optional name for the layer.
- virtual void VisitMergeLayer(const IConnectableLayer* layer,
- const char* name = nullptr) = 0;
-
- /// Function a Minimum layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param name - Optional name for the layer.
- virtual void VisitMinimumLayer(const IConnectableLayer* layer,
- const char* name = nullptr) = 0;
-
- /// Function that a multiplication layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param name - Optional name for the layer.
- virtual void VisitMultiplicationLayer(const IConnectableLayer* layer,
- const char* name = nullptr) = 0;
-
- /// Function that a normalization layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param normalizationDescriptor - NormalizationDescriptor to configure the normalization.
- /// @param name - Optional name for the layer.
- virtual void VisitNormalizationLayer(const IConnectableLayer* layer,
- const NormalizationDescriptor& normalizationDescriptor,
- const char* name = nullptr) = 0;
-
- /// Function an output layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param id - User generated id to uniquely identify a particular output. The same id needs to be specified
- /// when passing the outputs to the IRuntime::EnqueueWorkload() function.
- /// @param name - Optional name for the layer.
- virtual void VisitOutputLayer(const IConnectableLayer* layer,
- LayerBindingId id,
- const char* name = nullptr) = 0;
-
- /// Function a pad layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param paddings - n by 2 tensor, where n is the rank of the input tensor,
- /// such that paddings[i,0] indicates the amount of padding to add in front of dimension i, and
- /// paddings[i,1] indicates the amount of padding to add after the end of dimension i
- /// @param name - Optional name for the layer.
- virtual void VisitPadLayer(const IConnectableLayer* layer,
- const PadDescriptor& padDescriptor,
- const char* name = nullptr) = 0;
-
- /// Function that a permute layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param permuteDescriptor - PermuteDescriptor to configure the permute.
- /// @param name - Optional name for the layer.
- virtual void VisitPermuteLayer(const IConnectableLayer* layer,
- const PermuteDescriptor& permuteDescriptor,
- const char* name = nullptr) = 0;
-
- /// Function that a pooling layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param pooling2dDescriptor - Pooling2dDescriptor to configure the pooling.
- /// @param name - Optional name for the layer.
- virtual void VisitPooling2dLayer(const IConnectableLayer* layer,
- const Pooling2dDescriptor& pooling2dDescriptor,
- const char* name = nullptr) = 0;
-
- /// Function that a pooling layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param pooling3dDescriptor - Pooling3dDescriptor to configure the pooling.
- /// @param name - Optional name for the layer.
- virtual void VisitPooling3dLayer(const IConnectableLayer* layer,
- const Pooling3dDescriptor& pooling3dDescriptor,
- const char* name = nullptr) = 0;
-
- /// Function that a PReLU activation layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param name - Optional name for the layer.
- virtual void VisitPreluLayer(const IConnectableLayer* layer,
- const char* name = nullptr) = 0;
-
- /// Function a quantize layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param name - Optional name for the layer.
- virtual void VisitQuantizeLayer(const IConnectableLayer* layer,
- const char* name = nullptr) = 0;
-
- /// Function a QLstm layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param descriptor - Parameters controlling the operation of the QLstm operation.
- /// @param params - The weights and biases for the layer
- /// @param name - Optional name for the layer.
- virtual void VisitQLstmLayer(const IConnectableLayer* layer,
- const QLstmDescriptor& descriptor,
- const LstmInputParams& params,
- const char* name = nullptr) = 0;
-
- /// Function a QuantizedLstm layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param params - The weights and biases for the Quantized LSTM cell
- /// @param name - Optional name for the layer.
- virtual void VisitQuantizedLstmLayer(const IConnectableLayer* layer,
- const QuantizedLstmInputParams& params,
- const char* name = nullptr) = 0;
-
- /// Function a rank layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param name - Optional name for the layer.
- virtual void VisitRankLayer(const IConnectableLayer* layer,
- const char* name = nullptr) = 0;
-
- /// Function that a reduce layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param ReduceDescriptor - Parameters for the reduce max operation.
- /// @param name - Optional name for the layer.
- virtual void VisitReduceLayer(const IConnectableLayer* layer,
- const ReduceDescriptor& reduceDescriptor,
- const char* name = nullptr) = 0;
-
- /// Function a reshape layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param reshapeDescriptor - Parameters for the reshape operation.
- /// @param name - Optional name for the layer.
- virtual void VisitReshapeLayer(const IConnectableLayer* layer,
- const ReshapeDescriptor& reshapeDescriptor,
- const char* name = nullptr) = 0;
-
- /// Function that a resize layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param resizeDescriptor - Parameters for the resize operation.
- /// @param name - Optional name for the layer.
- virtual void VisitResizeLayer(const IConnectableLayer* layer,
- const ResizeDescriptor& resizeDescriptor,
- const char* name = nullptr) = 0;
-
- /// Function that a slice layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param sliceDescriptor - SliceDescriptor to configure the slice operation.
- /// @param name - Optional name for the layer.
- virtual void VisitSliceLayer(const IConnectableLayer* layer,
- const SliceDescriptor& sliceDescriptor,
- const char* name = nullptr) = 0;
-
-
- /// Function that a softmax layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param softmaxDescriptor - SoftmaxDescriptor to configure the softmax.
- /// @param name - Optional name for the layer.
- virtual void VisitSoftmaxLayer(const IConnectableLayer* layer,
- const SoftmaxDescriptor& softmaxDescriptor,
- const char* name = nullptr) = 0;
-
- /// Function a space to batch layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param spaceToBatchNdDescriptor - Parameters for the space to batch operation.
- /// @param name - Optional name for the layer.
- virtual void VisitSpaceToBatchNdLayer(const IConnectableLayer* layer,
- const SpaceToBatchNdDescriptor& spaceToBatchNdDescriptor,
- const char* name = nullptr) = 0;
-
- /// Function a space to depth layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param spaceToDepthDescriptor - Parameters for the space to depth operation.
- /// @param name - Optional name for the layer.
- virtual void VisitSpaceToDepthLayer(const IConnectableLayer* layer,
- const SpaceToDepthDescriptor& spaceToDepthDescriptor,
- const char* name = nullptr) = 0;
-
- /// Function that a splitter layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param splitterDescriptor - ViewsDescriptor to configure the splitting process.
- /// Number of Views must be equal to the number of outputs,
- /// and their order must match - e.g. first view corresponds to
- /// the first output, second view to the second output, etc....
- /// @param name - Optional name for the layer.
- virtual void VisitSplitterLayer(const IConnectableLayer* layer,
- const ViewsDescriptor& splitterDescriptor,
- const char* name = nullptr) = 0;
-
- /// Function a stack layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param stackDescriptor - Parameters for the stack operation.
- /// @param name - Optional name for the layer.
- virtual void VisitStackLayer(const IConnectableLayer* layer,
- const StackDescriptor& stackDescriptor,
- const char* name = nullptr) = 0;
-
- /// Function a StandInLayer should call back to when its Accept(ILaterVisitor&) function is invoked
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param standInDescriptor - Parameters for the stand-in layer.
- /// @param name - Optional name for the layer.
- virtual void VisitStandInLayer(const IConnectableLayer* layer,
- const StandInDescriptor& standInDescriptor,
- const char* name = nullptr) = 0;
-
- /// Function a strided slice layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param stridedSliceDescriptor - Parameters for the strided slice operation.
- /// @param name - Optional name for the layer.
- virtual void VisitStridedSliceLayer(const IConnectableLayer* layer,
- const StridedSliceDescriptor& stridedSliceDescriptor,
- const char* name = nullptr) = 0;
-
- /// Function a subtraction layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param name - Optional name for the layer.
- virtual void VisitSubtractionLayer(const IConnectableLayer* layer,
- const char* name = nullptr) = 0;
-
- /// Function a switch layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param name - Optional name for the layer.
- virtual void VisitSwitchLayer(const IConnectableLayer* layer,
- const char* name = nullptr) = 0;
-
- /// Function that a 2D transpose convolution layer should call back to when its Accept(ILayerVisitor&)
- /// function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param descriptor - Description of the 2D transpose convolution layer.
- /// @param weights - Tensor for the weights data.
- /// @param biases - Optional tensor for the bias data.
- /// @param name - Optional name for the layer.
- virtual void VisitTransposeConvolution2dLayer(const IConnectableLayer* layer,
- const TransposeConvolution2dDescriptor& descriptor,
- const ConstTensor& weights,
- const Optional<ConstTensor>& biases,
- const char* name = nullptr) = 0;
-
- /// Function that a transpose layer should call back to when its Accept(ILayerVisitor&) function is invoked.
- /// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param transposeDescriptor - TransposeDescriptor to configure the transpose.
- /// @param name - Optional name for the layer.
- virtual void VisitTransposeLayer(const IConnectableLayer* layer,
- const TransposeDescriptor& transposeDescriptor,
- const char* name = nullptr) = 0;
-
- virtual void StartVisit() {}
- virtual void FinishVisit() {}
-
-};
-} // namespace armnn
diff --git a/include/armnn/INetwork.hpp b/include/armnn/INetwork.hpp
index 1ed560040f..94afbf346a 100644
--- a/include/armnn/INetwork.hpp
+++ b/include/armnn/INetwork.hpp
@@ -7,7 +7,6 @@
#include <armnn/BackendOptions.hpp>
#include <armnn/Deprecated.hpp>
#include <armnn/DescriptorsFwd.hpp>
-#include <armnn/ILayerVisitor.hpp>
#include <armnn/IStrategy.hpp>
#include <armnn/NetworkFwd.hpp>
#include <armnn/Optional.hpp>
@@ -95,18 +94,6 @@ public:
/// Returns the unique id of the layer
virtual LayerGuid GetGuid() const = 0;
- // The Accept function needs to be wrapped in a no warn macro to avoid deprecation warnings from
- // the deprecated ILayerVisitor which is used in the function.
- ARMNN_NO_DEPRECATE_WARN_BEGIN
- /// Apply a visitor to this layer
- ARMNN_DEPRECATED_MSG_REMOVAL_DATE("Accept is deprecated. The ILayerVisitor that works in conjunction with this "
- "Accept function is deprecated. Use IStrategy in combination with "
- "ExecuteStrategy instead, which is an ABI/API stable version of the "
- "visitor pattern.",
- "22.05")
- virtual void Accept(ILayerVisitor& visitor) const = 0;
- ARMNN_NO_DEPRECATE_WARN_END
-
/// Apply a visitor to this layer
virtual void ExecuteStrategy(IStrategy& strategy) const = 0;
@@ -764,17 +751,6 @@ public:
IConnectableLayer* AddChannelShuffleLayer(const ChannelShuffleDescriptor& descriptor,
const char* name = nullptr);
- // The Accept function needs to be wrapped in a no warn macro to avoid deprecation warnings from
- // the deprecated ILayerVisitor which is used in the function.
- ARMNN_NO_DEPRECATE_WARN_BEGIN
- /// Apply a visitor to this layer
- ARMNN_DEPRECATED_MSG_REMOVAL_DATE("Accept is deprecated. The ILayerVisitor that works in conjunction with this "
- "Accept function is deprecated. Use IStrategy in combination with "
- "ExecuteStrategy instead, which is an ABI/API stable version of the "
- "visitor pattern.",
- "22.05")
- void Accept(ILayerVisitor& visitor) const;
- ARMNN_NO_DEPRECATE_WARN_END
void ExecuteStrategy(IStrategy& strategy) const;
diff --git a/include/armnn/IStrategy.hpp b/include/armnn/IStrategy.hpp
index 8d29565dcc..aed881c0dd 100644
--- a/include/armnn/IStrategy.hpp
+++ b/include/armnn/IStrategy.hpp
@@ -7,6 +7,9 @@
#include <armnn/DescriptorsFwd.hpp>
#include <armnn/Types.hpp>
+#include <armnn/NetworkFwd.hpp>
+#include <armnn/TensorFwd.hpp>
+
namespace armnn
{
@@ -17,7 +20,7 @@ IStrategy() {}
virtual ~IStrategy() {}
public:
-virtual void ExecuteStrategy(const armnn::IConnectableLayer* layer,
+virtual void ExecuteStrategy(const IConnectableLayer* layer,
const armnn::BaseDescriptor& descriptor,
const std::vector<armnn::ConstTensor>& constants,
const char* name,
diff --git a/include/armnn/LayerVisitorBase.hpp b/include/armnn/LayerVisitorBase.hpp
deleted file mode 100644
index 025fca7eb0..0000000000
--- a/include/armnn/LayerVisitorBase.hpp
+++ /dev/null
@@ -1,271 +0,0 @@
-//
-// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
-// SPDX-License-Identifier: MIT
-//
-
-#pragma once
-
-#include <armnn/ILayerVisitor.hpp>
-
-namespace armnn
-{
-
-struct VisitorThrowingPolicy
-{
- static void Apply(const std::string& errorMessage = "") { throw UnimplementedException(errorMessage); }
-};
-
-struct VisitorNoThrowPolicy
-{
- static void Apply(const std::string&) {}
-};
-
-/// Visitor base class with empty implementations.
-ARMNN_NO_DEPRECATE_WARN_BEGIN
-template<typename DefaultPolicy>
-class LayerVisitorBase : public ILayerVisitor
-{
-protected:
- LayerVisitorBase() {}
- virtual ~LayerVisitorBase() {}
-
-public:
-
- void VisitActivationLayer(const IConnectableLayer*,
- const ActivationDescriptor&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitAdditionLayer(const IConnectableLayer*,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitArgMinMaxLayer(const IConnectableLayer*,
- const ArgMinMaxDescriptor&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitBatchNormalizationLayer(const IConnectableLayer*,
- const BatchNormalizationDescriptor&,
- const ConstTensor&,
- const ConstTensor&,
- const ConstTensor&,
- const ConstTensor&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitBatchToSpaceNdLayer(const IConnectableLayer*,
- const BatchToSpaceNdDescriptor&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitComparisonLayer(const IConnectableLayer*,
- const ComparisonDescriptor&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitConcatLayer(const IConnectableLayer*,
- const ConcatDescriptor&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitConstantLayer(const IConnectableLayer*,
- const ConstTensor&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitConvolution2dLayer(const IConnectableLayer*,
- const Convolution2dDescriptor&,
- const ConstTensor&,
- const Optional<ConstTensor>&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitConvolution2dLayer(const IConnectableLayer*,
- const Convolution2dDescriptor&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitDepthToSpaceLayer(const IConnectableLayer*,
- const DepthToSpaceDescriptor&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitDepthwiseConvolution2dLayer(const IConnectableLayer*,
- const DepthwiseConvolution2dDescriptor&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitDepthwiseConvolution2dLayer(const IConnectableLayer*,
- const DepthwiseConvolution2dDescriptor&,
- const ConstTensor&,
- const Optional<ConstTensor>&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitDequantizeLayer(const IConnectableLayer*,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitDetectionPostProcessLayer(const IConnectableLayer*,
- const DetectionPostProcessDescriptor&,
- const ConstTensor&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitDivisionLayer(const IConnectableLayer*,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitElementwiseUnaryLayer(const IConnectableLayer*,
- const ElementwiseUnaryDescriptor&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitFillLayer(const IConnectableLayer*,
- const FillDescriptor&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitFloorLayer(const IConnectableLayer*,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitFullyConnectedLayer(const IConnectableLayer*,
- const FullyConnectedDescriptor&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitFullyConnectedLayer(const IConnectableLayer*,
- const FullyConnectedDescriptor&,
- const ConstTensor&,
- const Optional<ConstTensor>&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitGatherLayer(const IConnectableLayer*,
- const GatherDescriptor&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitInputLayer(const IConnectableLayer*,
- LayerBindingId,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitInstanceNormalizationLayer(const IConnectableLayer*,
- const InstanceNormalizationDescriptor&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitL2NormalizationLayer(const IConnectableLayer*,
- const L2NormalizationDescriptor&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitLogSoftmaxLayer(const IConnectableLayer*,
- const LogSoftmaxDescriptor&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitLogicalBinaryLayer(const IConnectableLayer*,
- const LogicalBinaryDescriptor&,
- const char*) override {DefaultPolicy::Apply(__func__); }
-
- void VisitLstmLayer(const IConnectableLayer*,
- const LstmDescriptor&,
- const LstmInputParams&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitMaximumLayer(const IConnectableLayer*,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitMeanLayer(const IConnectableLayer*,
- const MeanDescriptor&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitMergeLayer(const IConnectableLayer*,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitMinimumLayer(const IConnectableLayer*,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitMultiplicationLayer(const IConnectableLayer*,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitNormalizationLayer(const IConnectableLayer*,
- const NormalizationDescriptor&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitOutputLayer(const IConnectableLayer*,
- LayerBindingId,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitPadLayer(const IConnectableLayer*,
- const PadDescriptor&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitPermuteLayer(const IConnectableLayer*,
- const PermuteDescriptor&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitPooling2dLayer(const IConnectableLayer*,
- const Pooling2dDescriptor&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitPreluLayer(const IConnectableLayer*,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitQuantizeLayer(const IConnectableLayer*,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitQLstmLayer(const IConnectableLayer*,
- const QLstmDescriptor&,
- const LstmInputParams&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitQuantizedLstmLayer(const IConnectableLayer*,
- const QuantizedLstmInputParams&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitRankLayer(const IConnectableLayer*,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitReduceLayer(const IConnectableLayer*,
- const ReduceDescriptor&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitReshapeLayer(const IConnectableLayer*,
- const ReshapeDescriptor&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitResizeLayer(const IConnectableLayer*,
- const ResizeDescriptor&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitSliceLayer(const IConnectableLayer*,
- const SliceDescriptor&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitSoftmaxLayer(const IConnectableLayer*,
- const SoftmaxDescriptor&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitSpaceToBatchNdLayer(const IConnectableLayer*,
- const SpaceToBatchNdDescriptor&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitSpaceToDepthLayer(const IConnectableLayer*,
- const SpaceToDepthDescriptor&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitSplitterLayer(const IConnectableLayer*,
- const ViewsDescriptor&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitStackLayer(const IConnectableLayer*,
- const StackDescriptor&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitStandInLayer(const IConnectableLayer*,
- const StandInDescriptor&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitStridedSliceLayer(const IConnectableLayer*,
- const StridedSliceDescriptor&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitSubtractionLayer(const IConnectableLayer*,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitSwitchLayer(const IConnectableLayer*,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitTransposeConvolution2dLayer(const IConnectableLayer*,
- const TransposeConvolution2dDescriptor&,
- const ConstTensor&,
- const Optional<ConstTensor>&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
- void VisitTransposeLayer(const IConnectableLayer*,
- const TransposeDescriptor&,
- const char*) override { DefaultPolicy::Apply(__func__); }
-
-};
-ARMNN_NO_DEPRECATE_WARN_END
-
-} // namespace armnn
diff --git a/include/armnn/backends/CMakeLists.txt b/include/armnn/backends/CMakeLists.txt
index 19046ed977..978916e2b0 100644
--- a/include/armnn/backends/CMakeLists.txt
+++ b/include/armnn/backends/CMakeLists.txt
@@ -4,7 +4,6 @@
#
list(APPEND armnnBackendsAPI_sources
- CpuTensorHandleFwd.hpp
TensorHandleFwd.hpp
DynamicBackend.hpp
IBackendInternal.hpp
diff --git a/include/armnn/backends/CpuTensorHandleFwd.hpp b/include/armnn/backends/CpuTensorHandleFwd.hpp
deleted file mode 100644
index a5a28d8135..0000000000
--- a/include/armnn/backends/CpuTensorHandleFwd.hpp
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-// Copyright © 2017 Arm Ltd. All rights reserved.
-// SPDX-License-Identifier: MIT
-//
-
-// This file is deprecated and will be removed soon.
-// Please use the new file include/armnn/TensorHandleFwd.hpp instead.
-
-#pragma once
-
-namespace armnn
-{
-
-class ConstCpuTensorHandle;
-class CpuTensorHandle;
-class ScopedCpuTensorHandle;
-class PassthroughCpuTensorHandle;
-class ConstPassthroughCpuTensorHandle;
-
-} // namespace armnn
diff --git a/include/armnn/backends/IBackendInternal.hpp b/include/armnn/backends/IBackendInternal.hpp
index 98f0eaacd7..e393a7e1c5 100644
--- a/include/armnn/backends/IBackendInternal.hpp
+++ b/include/armnn/backends/IBackendInternal.hpp
@@ -172,10 +172,6 @@ public:
return BackendCapabilities("IBackendInternal NullCapabilities");
};
- /// Returns true if backend support the capability false otherwise
- ARMNN_DEPRECATED_MSG_REMOVAL_DATE("This function has been deprecated in favour of GetCapability", "22.05")
- virtual bool HasCapability(BackendCapability /*capabilityClass*/) const { return false; }
-
/// Signals the backend to use a custom memory allocator provided by the user
///
/// \param allocator - a pointer to the provided ICustomAllocator to use with this backend
diff --git a/include/armnn/backends/TensorHandle.hpp b/include/armnn/backends/TensorHandle.hpp
index 2e6c8485d1..c69f7c8083 100644
--- a/include/armnn/backends/TensorHandle.hpp
+++ b/include/armnn/backends/TensorHandle.hpp
@@ -251,17 +251,4 @@ private:
std::shared_ptr<ConstTensorHandle> m_TensorHandle;
};
-using ConstCpuTensorHandle ARMNN_DEPRECATED_MSG_REMOVAL_DATE("ConstCpuTensorHandle is deprecated, "
- "use ConstTensorHandle instead", "22.05") = ConstTensorHandle;
-using CpuTensorHandle ARMNN_DEPRECATED_MSG_REMOVAL_DATE("CpuTensorHandle is deprecated, "
- "use TensorHandle instead", "22.05") = TensorHandle;
-using ScopedCpuTensorHandle ARMNN_DEPRECATED_MSG_REMOVAL_DATE("ScopedCpuTensorHandle is deprecated, "
- "use ScopedTensorHandle instead", "22.05") = ScopedTensorHandle;
-using PassthroughCpuTensorHandle ARMNN_DEPRECATED_MSG_REMOVAL_DATE("PassthroughCpuTensorHandle is deprecated, use "
- "PassthroughTensorHandle instead",
- "22.05") = PassthroughTensorHandle;
-using ConstPassthroughCpuTensorHandle ARMNN_DEPRECATED_MSG_REMOVAL_DATE("ConstPassthroughCpuTensorHandle is "
- "deprecated, use ConstPassthroughTensorHandle "
- "instead", "22.05") = ConstPassthroughTensorHandle;
-
} // namespace armnn