From 1b2654fb799c3d25ffcef4d31b5d026d359e2f8f Mon Sep 17 00:00:00 2001 From: Jan Eilers Date: Fri, 24 Sep 2021 15:45:46 +0100 Subject: 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 Change-Id: Id13b6f37a74d26eadeda2da1dc92915e725ed5a5 --- src/armnn/Network.hpp | 48 ++++-------------------------------------------- 1 file changed, 4 insertions(+), 44 deletions(-) (limited to 'src/armnn/Network.hpp') diff --git a/src/armnn/Network.hpp b/src/armnn/Network.hpp index 11759c71de..eb1d39d2f6 100644 --- a/src/armnn/Network.hpp +++ b/src/armnn/Network.hpp @@ -41,9 +41,6 @@ public: IConnectableLayer* AddInputLayer(LayerBindingId id, const char* name = nullptr); - ARMNN_DEPRECATED_MSG("Use AddElementwiseUnaryLayer instead") - IConnectableLayer* AddAbsLayer(const char* name = nullptr); - IConnectableLayer* AddActivationLayer(const ActivationDescriptor& activationDescriptor, const char* name = nullptr); @@ -78,12 +75,12 @@ public: const Optional& 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, @@ -105,19 +102,6 @@ public: const Optional& 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); - IConnectableLayer* AddDequantizeLayer(const char* name = nullptr); IConnectableLayer* AddDetectionPostProcessLayer( @@ -130,9 +114,6 @@ public: IConnectableLayer* AddElementwiseUnaryLayer(const ElementwiseUnaryDescriptor& elementwiseUnaryDescriptor, const char* name = nullptr); - ARMNN_DEPRECATED_MSG("Use AddComparisonLayer instead") - IConnectableLayer* AddEqualLayer(const char* name = nullptr); - IConnectableLayer* AddMergeLayer(const char* name = nullptr); IConnectableLayer* AddFillLayer(const FillDescriptor& fillDescriptor, @@ -148,21 +129,9 @@ public: const Optional& biases, const char* name = nullptr); - ARMNN_DEPRECATED_MSG("This AddFullyConnectedLayer overload is deprecated") - IConnectableLayer* AddFullyConnectedLayer(const FullyConnectedDescriptor& fullyConnectedDescriptor, - const ConstTensor& weights, - const Optional& biases, - const char* name = nullptr); - - ARMNN_DEPRECATED_MSG("This AddGatherLayer overload is deprecated") - IConnectableLayer* AddGatherLayer(const char* name = nullptr); - IConnectableLayer* AddGatherLayer(const GatherDescriptor& gatherDescriptor, const char* name = nullptr); - ARMNN_DEPRECATED_MSG("Use AddComparisonLayer instead") - IConnectableLayer* AddGreaterLayer(const char* name = nullptr); - IConnectableLayer* AddInstanceNormalizationLayer(const InstanceNormalizationDescriptor& desc, const char* name = nullptr); @@ -185,10 +154,6 @@ public: IConnectableLayer* AddMinimumLayer(const char* name = nullptr); - ARMNN_DEPRECATED_MSG("Use AddConcatLayer instead") - IConnectableLayer* AddMergerLayer(const MergerDescriptor& mergerDescriptor, - const char* name = nullptr); - IConnectableLayer* AddMultiplicationLayer(const char* name = nullptr); IConnectableLayer* AddNormalizationLayer(const NormalizationDescriptor& normalizationDescriptor, @@ -220,19 +185,12 @@ public: IConnectableLayer* AddReduceLayer(const ReduceDescriptor& reduceDescriptor, const char* name = nullptr); - ARMNN_DEPRECATED_MSG("Use AddResizeLayer instead") - IConnectableLayer* AddResizeBilinearLayer(const ResizeBilinearDescriptor& resizeDesc, - const char* name = nullptr); - IConnectableLayer* AddResizeLayer(const ResizeDescriptor& resizeDescriptor, const char* name = nullptr); IConnectableLayer* AddReshapeLayer(const ReshapeDescriptor& reshapeDescriptor, const char* name = nullptr); - ARMNN_DEPRECATED_MSG("Use AddElementwiseUnaryLayer instead") - IConnectableLayer* AddRsqrtLayer(const char* name = nullptr); - IConnectableLayer* AddShapeLayer(const char* name = nullptr); IConnectableLayer* AddSliceLayer(const SliceDescriptor& sliceDescriptor, const char* name = nullptr); @@ -274,7 +232,9 @@ public: const LstmInputParams& params, const char* name = nullptr); + ARMNN_NO_DEPRECATE_WARN_BEGIN void Accept(ILayerVisitor& visitor) const; + ARMNN_NO_DEPRECATE_WARN_END void ExecuteStrategy(IStrategy& strategy) const; -- cgit v1.2.1