diff options
author | Gunes Bayir <gunes.bayir@arm.com> | 2021-09-01 16:20:54 +0100 |
---|---|---|
committer | Georgios Pinitas <georgios.pinitas@arm.com> | 2021-09-07 13:57:06 +0000 |
commit | 814bddfd92c568cfb0bcfc23537b7658f29628c4 (patch) | |
tree | 1c74063ced2fd5a4be4fe1dc61d9e5d870df4419 /arm_compute/graph/nodes | |
parent | aed63ee175e0d64c934389e9d1b2edd0cb1a5cdd (diff) | |
download | ComputeLibrary-814bddfd92c568cfb0bcfc23537b7658f29628c4.tar.gz |
Fuse pad layer with subsequent convolution layer
Fusing occurs only if
- the padding is only for height/width
- padding pixel value is 0
- padding node output has no accessors
Resolves: COMPMID-4702
Signed-off-by: Gunes Bayir <gunes.bayir@arm.com>
Change-Id: I0755d5fb0bd3a55d9f10b32ce9da44e7c5a25279
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/6189
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Pablo Marquez Tello <pablo.tello@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Comments-Addressed: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'arm_compute/graph/nodes')
-rw-r--r-- | arm_compute/graph/nodes/ConvolutionLayerNode.h | 7 | ||||
-rw-r--r-- | arm_compute/graph/nodes/DepthwiseConvolutionLayerNode.h | 7 | ||||
-rw-r--r-- | arm_compute/graph/nodes/PadLayerNode.h | 5 |
3 files changed, 16 insertions, 3 deletions
diff --git a/arm_compute/graph/nodes/ConvolutionLayerNode.h b/arm_compute/graph/nodes/ConvolutionLayerNode.h index e4151c0f17..99effa07dc 100644 --- a/arm_compute/graph/nodes/ConvolutionLayerNode.h +++ b/arm_compute/graph/nodes/ConvolutionLayerNode.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 Arm Limited. + * Copyright (c) 2018-2019, 2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -90,6 +90,11 @@ public: * @param[in] fused_activation Fused activation to set */ void set_fused_activation(ActivationLayerInfo fused_activation); + /** Sets convolution info + * + * @param[in] info Convolution info to set + */ + void set_convolution_info(PadStrideInfo info); /** Computes convolution output descriptor * * @param[in] input_descriptor Input descriptor diff --git a/arm_compute/graph/nodes/DepthwiseConvolutionLayerNode.h b/arm_compute/graph/nodes/DepthwiseConvolutionLayerNode.h index 59847a92fc..5df86983f0 100644 --- a/arm_compute/graph/nodes/DepthwiseConvolutionLayerNode.h +++ b/arm_compute/graph/nodes/DepthwiseConvolutionLayerNode.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 Arm Limited. + * Copyright (c) 2018-2019, 2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -78,6 +78,11 @@ public: * @param[in] fused_activation Fused activation to set */ void set_fused_activation(ActivationLayerInfo fused_activation); + /** Sets convolution info + * + * @param[in] info Convolution info to set + */ + void set_convolution_info(PadStrideInfo info); /** Computes depthwise convolution output descriptor * * @param[in] input_descriptor Input descriptor diff --git a/arm_compute/graph/nodes/PadLayerNode.h b/arm_compute/graph/nodes/PadLayerNode.h index 8fcbc52313..d6ff3553da 100644 --- a/arm_compute/graph/nodes/PadLayerNode.h +++ b/arm_compute/graph/nodes/PadLayerNode.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2020 Arm Limited. + * Copyright (c) 2018-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -58,6 +58,9 @@ public: TensorDescriptor configure_output(size_t idx) const override; void accept(INodeVisitor &v) override; +public: + static constexpr NodeType node_type = NodeType::PadLayer; + private: PaddingList _padding; PixelValue _pad_value; |