aboutsummaryrefslogtreecommitdiff
path: root/include/armnn/INetwork.hpp
diff options
context:
space:
mode:
authorJan Eilers <jan.eilers@arm.com>2021-09-24 15:45:46 +0100
committerJan Eilers <jan.eilers@arm.com>2021-10-02 16:27:39 +0100
commit1b2654fb799c3d25ffcef4d31b5d026d359e2f8f (patch)
tree0397fdf24f286715e26a0e63bddaa0502f64caf7 /include/armnn/INetwork.hpp
parentb63a31170aee1d28267d83a4bc67b57708fb6b05 (diff)
downloadarmnn-1b2654fb799c3d25ffcef4d31b5d026d359e2f8f.tar.gz
IVGCVSW-5985 Remove deprecated code
* Removes deprecated AddLayer, IsLayerSupported functions * Marks the whole LayerVisitor class as deprecated not just the constructor. This required to wrap all Accept functions in a no deprecate macro because the LayerVisitor is used as a parameter in there * Removes usage of deprecated LayerVisitor and replaces it with ExecuteStrategy. This required a few structural changes in the unit tests * Adds a default implementation for IStrategy called StrategyBase * Changes pyarmnn to use non deprecated constructor for INetworkProperties and adds related unit test * Marks usage of deprecated code in pyarmnn as deprecated. This required to extend INetworkProperties to allow backwards compatibility * Removes deprecated functions from CpuAcc, GpuAcc and Ref backends Note: This patch breaks compatibility with backends that are not updated in this patch !android-nn-driver:6325 Signed-off-by: Jan Eilers <jan.eilers@arm.com> Change-Id: Id13b6f37a74d26eadeda2da1dc92915e725ed5a5
Diffstat (limited to 'include/armnn/INetwork.hpp')
-rw-r--r--include/armnn/INetwork.hpp89
1 files changed, 23 insertions, 66 deletions
diff --git a/include/armnn/INetwork.hpp b/include/armnn/INetwork.hpp
index 8ec8de0600..a8e6cfc0e3 100644
--- a/include/armnn/INetwork.hpp
+++ b/include/armnn/INetwork.hpp
@@ -88,8 +88,17 @@ 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;
@@ -230,12 +239,12 @@ public:
const Optional<ConstTensor>& biases,
const char* name = nullptr);
- ARMNN_DEPRECATED_MSG("This AddConvolution2dLayer overload is deprecated")
+ ARMNN_DEPRECATED_MSG_REMOVAL_DATE("This AddConvolution2dLayer overload is deprecated", "22.08")
IConnectableLayer* AddConvolution2dLayer(const Convolution2dDescriptor& convolution2dDescriptor,
const ConstTensor& weights,
const char* name = nullptr);
- ARMNN_DEPRECATED_MSG("This AddConvolution2dLayer overload is deprecated")
+ ARMNN_DEPRECATED_MSG_REMOVAL_DATE("This AddConvolution2dLayer overload is deprecated", "22.08")
IConnectableLayer* AddConvolution2dLayer(const Convolution2dDescriptor& convolution2dDescriptor,
const ConstTensor& weights,
const ConstTensor& biases,
@@ -271,19 +280,6 @@ public:
const Optional<ConstTensor>& biases,
const char* name = nullptr);
- ARMNN_DEPRECATED_MSG("This AddDepthwiseConvolution2dLayer overload is deprecated")
- IConnectableLayer* AddDepthwiseConvolution2dLayer(
- const DepthwiseConvolution2dDescriptor& convolution2dDescriptor,
- const ConstTensor& weights,
- const char* name = nullptr);
-
- ARMNN_DEPRECATED_MSG("This AddDepthwiseConvolution2dLayer overload is deprecated")
- IConnectableLayer* AddDepthwiseConvolution2dLayer(
- const DepthwiseConvolution2dDescriptor& convolution2dDescriptor,
- const ConstTensor& weights,
- const ConstTensor& biases,
- const char* name = nullptr);
-
/// Adds a Dequantize layer to the network.
/// @return - Interface for configuring the layer.
IConnectableLayer* AddDequantizeLayer(const char* name = nullptr);
@@ -337,13 +333,13 @@ public:
IConnectableLayer* AddFullyConnectedLayer(const FullyConnectedDescriptor& fullyConnectedDescriptor,
const char* name = nullptr);
- ARMNN_DEPRECATED_MSG("This AddFullyConnectedLayer overload is deprecated")
+ ARMNN_DEPRECATED_MSG_REMOVAL_DATE("This AddFullyConnectedLayer overload is deprecated", "22.05")
IConnectableLayer* AddFullyConnectedLayer(const FullyConnectedDescriptor& fullyConnectedDescriptor,
const Optional<ConstTensor>& weights,
const Optional<ConstTensor>& biases,
const char* name = nullptr);
- ARMNN_DEPRECATED_MSG("This AddFullyConnectedLayer overload is deprecated")
+ ARMNN_DEPRECATED_MSG_REMOVAL_DATE("This AddFullyConnectedLayer overload is deprecated", "22.05")
IConnectableLayer* AddFullyConnectedLayer(const FullyConnectedDescriptor& fullyConnectedDescriptor,
const ConstTensor& weights,
const Optional<ConstTensor>& biases,
@@ -414,23 +410,6 @@ public:
/// @return - Interface for configuring the layer.
IConnectableLayer* AddMergeLayer(const char* name = nullptr);
- /// Adds a concat layer to the network.
- /// @param mergerDescriptor - MergerDescriptor (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.
- /// @return - Interface for configuring the layer.
- ARMNN_DEPRECATED_MSG("Use AddConcatLayer instead")
- IConnectableLayer* AddMergerLayer(const MergerDescriptor& mergerDescriptor,
- const char* name = nullptr);
-
- /// Add absolute layer to the network.
- /// @param name - Optional name for the layer.
- /// @return - Interface for configuring the layer.
- ARMNN_DEPRECATED_MSG("Use AddElementwiseUnaryLayer instead")
- IConnectableLayer* AddAbsLayer(const char* name = nullptr);
-
/// Adds an addition layer to the network.
/// @param name - Optional name for the layer.
/// @return - Interface for configuring the layer.
@@ -460,14 +439,6 @@ public:
/// @return - Interface for configuring the layer.
IConnectableLayer* AddRankLayer(const char* name = nullptr);
- /// Adds a resize bilinear layer to the network.
- /// @param resizeDesc - Parameters for the resize operation.
- /// @param name - Optional name for the layer.
- /// @return - Interface for configuring the layer.
- ARMNN_DEPRECATED_MSG("Use AddResizeLayer instead")
- IConnectableLayer* AddResizeBilinearLayer(const ResizeBilinearDescriptor& resizeDesc,
- const char* name = nullptr);
-
/// Adds a resize layer to the network.
/// @param resizeDescriptor - Parameters for the resize operation.
/// @param name - Optional name for the layer.
@@ -608,30 +579,6 @@ public:
/// @return - Interface for configuring the layer.
IConnectableLayer* AddMinimumLayer(const char* name = nullptr);
- /// Add a Greater layer to the network.
- /// @param name - Optional name for the layer.
- /// @return - Interface for configuring the layer.
- ARMNN_DEPRECATED_MSG("Use AddComparisonLayer instead")
- IConnectableLayer* AddGreaterLayer(const char* name = nullptr);
-
- /// Add a Equal layer to the network.
- /// @param name - Optional name for the layer.
- /// @return - Interface for configuring the layer.
- ARMNN_DEPRECATED_MSG("Use AddComparisonLayer instead")
- IConnectableLayer* AddEqualLayer(const char* name = nullptr);
-
- /// Add Reciprocal of square root layer to the network.
- /// @param name - Optional name for the layer.
- /// @return - Interface for configuring the layer.
- ARMNN_DEPRECATED_MSG("Use AddElementwiseUnaryLayer instead")
- IConnectableLayer* AddRsqrtLayer(const char* name = nullptr);
-
- /// Add Gather layer to the network.
- /// @param name - Optional name for the layer.
- /// @return - Interface for configuring the layer.
- ARMNN_DEPRECATED_MSG("Use AddGatherLayer with descriptor instead")
- IConnectableLayer* AddGatherLayer(const char* name = nullptr);
-
/// Add Gather layer to the network.
/// @param descriptor - Description of the gather layer.
/// @param name - Optional name for the layer.
@@ -722,7 +669,17 @@ 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;