aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/graph
diff options
context:
space:
mode:
authorManuel Bottini <manuel.bottini@arm.com>2019-06-17 12:04:40 +0100
committerGeorgios Pinitas <georgios.pinitas@arm.com>2019-07-11 16:14:01 +0000
commitc1b76faf6be5c33dbf3269faea95e185ac37992f (patch)
treec52ecf022bf8b5e54844258744e6a10619b68d83 /arm_compute/graph
parent0ec65b8c6438b6d12f17487fdc4c870fe37c7caa (diff)
downloadComputeLibrary-c1b76faf6be5c33dbf3269faea95e185ac37992f.tar.gz
COMPMID-2092: Refactoring interface for the deconvolution kernels (NEON/CL)
3RDPARTY_UPDATE Change-Id: Id7ddf97e2c9ceb2cb84084fab2c6f5697890c193 Signed-off-by: giuros01 <giuseppe.rossini@arm.com> Reviewed-on: https://review.mlplatform.org/c/1424 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'arm_compute/graph')
-rw-r--r--arm_compute/graph/GraphBuilder.h3
-rw-r--r--arm_compute/graph/backends/FunctionHelpers.h5
-rw-r--r--arm_compute/graph/frontend/Layers.h20
-rw-r--r--arm_compute/graph/nodes/DeconvolutionLayerNode.h13
4 files changed, 14 insertions, 27 deletions
diff --git a/arm_compute/graph/GraphBuilder.h b/arm_compute/graph/GraphBuilder.h
index 0aaed1da7d..e1049ca938 100644
--- a/arm_compute/graph/GraphBuilder.h
+++ b/arm_compute/graph/GraphBuilder.h
@@ -155,14 +155,13 @@ public:
* @param[in] kernel_spatial_extend Spatial extend of convolution kernels
* @param[in] depth Number of convolution kernels
* @param[in] deconv_info Convolution layer information
- * @param[in] inner_border Inner border (right, top)
* @param[in] weights_accessor (Optional) Accessor of the weights node data
* @param[in] bias_accessor (Optional) Accessor of the bias node data
*
* @return Node ID of the created node, EmptyNodeID in case of error
*/
static NodeID add_deconvolution_node(Graph &g, NodeParams params, NodeIdxPair input,
- Size2D kernel_spatial_extend, unsigned int depth, PadStrideInfo deconv_info, Size2D inner_border,
+ Size2D kernel_spatial_extend, unsigned int depth, PadStrideInfo deconv_info,
ITensorAccessorUPtr weights_accessor = nullptr, ITensorAccessorUPtr bias_accessor = nullptr);
/** Adds a depth concatenate node to the graph
*
diff --git a/arm_compute/graph/backends/FunctionHelpers.h b/arm_compute/graph/backends/FunctionHelpers.h
index fbf8d17f67..5ac4fdaed9 100644
--- a/arm_compute/graph/backends/FunctionHelpers.h
+++ b/arm_compute/graph/backends/FunctionHelpers.h
@@ -462,8 +462,7 @@ std::unique_ptr<IFunction> create_deconvolution_layer(DeconvolutionLayerNode &no
typename TargetInfo::TensorType *biases = get_backing_tensor<TargetInfo>(node.input(2));
typename TargetInfo::TensorType *output = get_backing_tensor<TargetInfo>(node.output(0));
- const PadStrideInfo deconv_info = node.deconvolution_info();
- const Size2D inner_border = node.inner_border();
+ const PadStrideInfo deconv_info = node.deconvolution_info();
// Create and configure function (we assume that functions have been validated before creation)
std::shared_ptr<IMemoryManager> mm = get_memory_manager(ctx, TargetInfo::TargetType);
@@ -471,7 +470,7 @@ std::unique_ptr<IFunction> create_deconvolution_layer(DeconvolutionLayerNode &no
std::tie(func, std::ignore) = create_named_memory_managed_function<DeconvolutionLayerFunction>(
std::string(), mm,
- input, weights, biases, output, deconv_info, inner_border.x(), inner_border.y());
+ input, weights, biases, output, deconv_info);
// Log info
ARM_COMPUTE_LOG_GRAPH_INFO("Instantiated "
diff --git a/arm_compute/graph/frontend/Layers.h b/arm_compute/graph/frontend/Layers.h
index f73b1f49d9..3fc4af46d5 100644
--- a/arm_compute/graph/frontend/Layers.h
+++ b/arm_compute/graph/frontend/Layers.h
@@ -370,26 +370,23 @@ class DeconvolutionLayer final : public ILayer
public:
/** Construct a convolution layer.
*
- * @param[in] conv_width Convolution width.
- * @param[in] conv_height Convolution height.
- * @param[in] ofm Output feature map.
- * @param[in] weights Accessor to get kernel weights from.
- * @param[in] bias Accessor to get kernel bias from.
- * @param[in] deconv_info Padding and stride information.
- * @param[in] inner_border Inner border padding (right, top)
+ * @param[in] conv_width Convolution width.
+ * @param[in] conv_height Convolution height.
+ * @param[in] ofm Output feature map.
+ * @param[in] weights Accessor to get kernel weights from.
+ * @param[in] bias Accessor to get kernel bias from.
+ * @param[in] deconv_info Padding and stride information.
*/
DeconvolutionLayer(unsigned int conv_width,
unsigned int conv_height,
unsigned int ofm,
ITensorAccessorUPtr weights,
ITensorAccessorUPtr bias,
- PadStrideInfo deconv_info,
- Size2D inner_border)
+ PadStrideInfo deconv_info)
: _conv_width(conv_width),
_conv_height(conv_height),
_ofm(ofm),
_deconv_info(std::move(deconv_info)),
- _inner_border(inner_border),
_weights(std::move(weights)),
_bias(std::move(bias))
{
@@ -400,7 +397,7 @@ public:
NodeIdxPair input = { s.tail_node(), 0 };
NodeParams common_params = { name(), s.hints().target_hint };
return GraphBuilder::add_deconvolution_node(s.graph(), common_params, input,
- Size2D(_conv_width, _conv_height), _ofm, _deconv_info, _inner_border,
+ Size2D(_conv_width, _conv_height), _ofm, _deconv_info,
std::move(_weights), std::move(_bias));
}
@@ -409,7 +406,6 @@ private:
unsigned int _conv_height;
unsigned int _ofm;
const PadStrideInfo _deconv_info;
- Size2D _inner_border;
ITensorAccessorUPtr _weights;
ITensorAccessorUPtr _bias;
};
diff --git a/arm_compute/graph/nodes/DeconvolutionLayerNode.h b/arm_compute/graph/nodes/DeconvolutionLayerNode.h
index 19501482c6..e6869d7aae 100644
--- a/arm_compute/graph/nodes/DeconvolutionLayerNode.h
+++ b/arm_compute/graph/nodes/DeconvolutionLayerNode.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018 ARM Limited.
+ * Copyright (c) 2018-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -36,20 +36,14 @@ class DeconvolutionLayerNode final : public INode
public:
/** Constructor
*
- * @param[in] info DeConvolution layer attributes
- * @param[in] inner_border Inner border (right, top)
+ * @param[in] info DeConvolution layer attributes
*/
- DeconvolutionLayerNode(PadStrideInfo info, Size2D inner_border);
+ DeconvolutionLayerNode(PadStrideInfo info);
/** Deconvolution metadata accessor
*
* @return Deconvolution information
*/
PadStrideInfo deconvolution_info() const;
- /** Deconvolution inner border accessor
- *
- * @return Inner border(top, right)
- */
- Size2D inner_border() const;
/** Computes deconvolution output descriptor
*
* @param[in] input_descriptor Input descriptor
@@ -70,7 +64,6 @@ public:
private:
PadStrideInfo _info;
- Size2D _inner_border;
};
} // namespace graph
} // namespace arm_compute