diff options
author | Jan Eilers <jan.eilers@arm.com> | 2021-09-24 15:45:46 +0100 |
---|---|---|
committer | Jan Eilers <jan.eilers@arm.com> | 2021-10-02 16:27:39 +0100 |
commit | 1b2654fb799c3d25ffcef4d31b5d026d359e2f8f (patch) | |
tree | 0397fdf24f286715e26a0e63bddaa0502f64caf7 /include/armnn/ILayerVisitor.hpp | |
parent | b63a31170aee1d28267d83a4bc67b57708fb6b05 (diff) | |
download | armnn-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/ILayerVisitor.hpp')
-rw-r--r-- | include/armnn/ILayerVisitor.hpp | 70 |
1 files changed, 3 insertions, 67 deletions
diff --git a/include/armnn/ILayerVisitor.hpp b/include/armnn/ILayerVisitor.hpp index cceb545a3a..a57db3ce18 100644 --- a/include/armnn/ILayerVisitor.hpp +++ b/include/armnn/ILayerVisitor.hpp @@ -13,21 +13,13 @@ namespace armnn { -class ILayerVisitor +class ARMNN_DEPRECATED_MSG_REMOVAL_DATE("Use ABI stable IStrategy instead.", "22.05") ILayerVisitor { protected: - ARMNN_DEPRECATED_MSG("Use ABI stable IStrategy instead.") ILayerVisitor() {} virtual ~ILayerVisitor() {} public: - /// Function an absolute 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. - ARMNN_DEPRECATED_MSG("Use VisitElementwiseUnaryLayer instead") - virtual void VisitAbsLayer(const IConnectableLayer* layer, - const char* name = nullptr) = 0; /// 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. @@ -93,13 +85,7 @@ public: /// @param name - Optional name for the layer. virtual void VisitConcatLayer(const IConnectableLayer* layer, const OriginsDescriptor& concatDescriptor, - const char* name = nullptr) - { - // default implementation to ease transition while MergerLayer is being deprecated - ARMNN_NO_DEPRECATE_WARN_BEGIN - VisitMergerLayer(layer, concatDescriptor, name); - ARMNN_NO_DEPRECATE_WARN_END - } + 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. @@ -178,13 +164,6 @@ public: const ElementwiseUnaryDescriptor& elementwiseUnaryDescriptor, const char* name = nullptr) = 0; - /// Function an Equal 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. - ARMNN_DEPRECATED_MSG("Use VisitComparisonLayer instead") - virtual void VisitEqualLayer(const IConnectableLayer* layer, - 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 @@ -216,7 +195,7 @@ public: /// @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("Use VisitFullyConnectedLayer without ConstTensors") + ARMNN_DEPRECATED_MSG_REMOVAL_DATE("Use VisitFullyConnectedLayer without ConstTensors", "22.05") virtual void VisitFullyConnectedLayer(const IConnectableLayer* layer, const FullyConnectedDescriptor& fullyConnectedDescriptor, const ConstTensor& weights, @@ -225,26 +204,12 @@ public: /// 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 name - Optional name for the layer. - ARMNN_DEPRECATED_MSG("Use VisitGatherLayer with descriptor instead") - virtual void VisitGatherLayer(const IConnectableLayer* layer, - 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 a Greater 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. - ARMNN_DEPRECATED_MSG("Use VisitComparisonLayer instead") - virtual void VisitGreaterLayer(const IConnectableLayer* layer, - 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 @@ -318,18 +283,6 @@ public: virtual void VisitMergeLayer(const IConnectableLayer* layer, const char* name = nullptr) = 0; - /// Function that a merger 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 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. - ARMNN_DEPRECATED_MSG("Use VisitConcatLayer instead") - virtual void VisitMergerLayer(const IConnectableLayer* layer, - const MergerDescriptor& mergerDescriptor, - 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. @@ -437,15 +390,6 @@ public: const ReshapeDescriptor& reshapeDescriptor, const char* name = nullptr) = 0; - /// Function that a resize bilinear 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 resizeDesc - Parameters for the resize operation. - /// @param name - Optional name for the layer. - ARMNN_DEPRECATED_MSG("Use VisitResizeLayer instead") - virtual void VisitResizeBilinearLayer(const IConnectableLayer* layer, - const ResizeBilinearDescriptor& resizeDesc, - 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. @@ -454,14 +398,6 @@ public: const ResizeDescriptor& resizeDescriptor, const char* name = nullptr) = 0; - /// Function a Reciprocal of square root 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. - ARMNN_DEPRECATED_MSG("Use VisitElementwiseUnaryLayer instead") - virtual void VisitRsqrtLayer(const IConnectableLayer* layer, - 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. |