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>
diff --git a/src/graph/nodes/ConvolutionLayerNode.cpp b/src/graph/nodes/ConvolutionLayerNode.cpp
index a982570..ee9dde9 100644
--- a/src/graph/nodes/ConvolutionLayerNode.cpp
+++ b/src/graph/nodes/ConvolutionLayerNode.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2019 Arm Limited.
+ * Copyright (c) 2018-2019, 2021 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -83,6 +83,11 @@
_fused_activation = fused_activation;
}
+void ConvolutionLayerNode::set_convolution_info(PadStrideInfo info)
+{
+ _info = info;
+}
+
TensorDescriptor ConvolutionLayerNode::compute_output_descriptor(const TensorDescriptor &input_descriptor,
const TensorDescriptor &weights_descriptor,
const PadStrideInfo &info)