aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiorgio Arena <giorgio.arena@arm.com>2017-11-15 13:36:15 +0000
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:35:24 +0000
commit82afedf2598c8fc5a428ecbd729dd8204b46fd43 (patch)
tree987bc328d2e936aff83b4bce47d167a25d648832
parent02aabcca4904adba592fc9840085c87f336d11fb (diff)
downloadComputeLibrary-82afedf2598c8fc5a428ecbd729dd8204b46fd43.tar.gz
COMPMID-678 Align Convolution Interfaces
Change-Id: I257a09860dd82e7bb7a767edf96dcaf31b512855 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/95865 Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
-rw-r--r--arm_compute/core/CL/kernels/CLDepthwiseConvolution3x3Kernel.h4
-rw-r--r--arm_compute/core/NEON/kernels/NEDepthwiseConvolution3x3Kernel.h4
-rw-r--r--arm_compute/runtime/CL/functions/CLDepthwiseConvolution.h8
-rw-r--r--arm_compute/runtime/NEON/functions/NEDepthwiseConvolution.h4
-rw-r--r--src/core/CL/kernels/CLDepthwiseConvolution3x3Kernel.cpp2
-rw-r--r--src/core/NEON/kernels/NEDepthwiseConvolution3x3Kernel.cpp2
-rw-r--r--src/runtime/CL/functions/CLDepthwiseConvolution.cpp6
-rw-r--r--src/runtime/CL/functions/CLDepthwiseSeparableConvolutionLayer.cpp2
-rw-r--r--src/runtime/NEON/functions/NEDepthwiseConvolution.cpp4
-rw-r--r--tests/benchmark/fixtures/DepthwiseConvolutionFixture.h2
-rw-r--r--tests/validation/NEON/DepthwiseConvolution.cpp2
-rw-r--r--tests/validation/fixtures/DepthwiseConvolutionFixture.h2
12 files changed, 21 insertions, 21 deletions
diff --git a/arm_compute/core/CL/kernels/CLDepthwiseConvolution3x3Kernel.h b/arm_compute/core/CL/kernels/CLDepthwiseConvolution3x3Kernel.h
index 4d4c288533..1eca33ffb7 100644
--- a/arm_compute/core/CL/kernels/CLDepthwiseConvolution3x3Kernel.h
+++ b/arm_compute/core/CL/kernels/CLDepthwiseConvolution3x3Kernel.h
@@ -48,13 +48,13 @@ public:
/** Initialize the function's source, destination, conv and border_size.
*
* @param[in] input Source tensor. DataType supported: F32.
- * @param[out] output Destination tensor. Data type supported: Same as @p input.
* @param[in] weights Weights tensor. A 3D tensor with dimensions [3, 3, IFM]. Data type supported: Same as @p input.
* @param[in] biases (Optional) Biases tensor. A 1D tensor with dimensions [IFM]. Must be nullptr if not needed.
* Data type supported: Same as @p input.
+ * @param[out] output Destination tensor. Data type supported: Same as @p input.
* @param[in] conv_info Padding and stride information to use for the convolution.
*/
- void configure(const ICLTensor *input, ICLTensor *output, const ICLTensor *weights, const ICLTensor *biases, const PadStrideInfo &conv_info);
+ void configure(const ICLTensor *input, const ICLTensor *weights, const ICLTensor *biases, ICLTensor *output, const PadStrideInfo &conv_info);
// Inherited methods overridden:
void run(const Window &window, cl::CommandQueue &queue) override;
diff --git a/arm_compute/core/NEON/kernels/NEDepthwiseConvolution3x3Kernel.h b/arm_compute/core/NEON/kernels/NEDepthwiseConvolution3x3Kernel.h
index 14b774c426..a32a06b61d 100644
--- a/arm_compute/core/NEON/kernels/NEDepthwiseConvolution3x3Kernel.h
+++ b/arm_compute/core/NEON/kernels/NEDepthwiseConvolution3x3Kernel.h
@@ -48,11 +48,11 @@ public:
/** Initialize the function's source, destination, conv and border_size.
*
* @param[in] input Source tensor. DataType supported: F32.
- * @param[out] output Destination tensor. Data type supported: Same as @p input.
* @param[in] weights Weights tensor. This is a 3D tensor with dimensions [3, 3, IFM]. Data type supported: Same as @p input.
+ * @param[out] output Destination tensor. Data type supported: Same as @p input.
* @param[in] conv_info Padding and stride information to use for the convolution.
*/
- void configure(const ITensor *input, ITensor *output, const ITensor *weights, const PadStrideInfo &conv_info);
+ void configure(const ITensor *input, const ITensor *weights, ITensor *output, const PadStrideInfo &conv_info);
// Inherited methods overridden:
void run(const Window &window, const ThreadInfo &info) override;
diff --git a/arm_compute/runtime/CL/functions/CLDepthwiseConvolution.h b/arm_compute/runtime/CL/functions/CLDepthwiseConvolution.h
index 7cf5f64115..7c35c2a4af 100644
--- a/arm_compute/runtime/CL/functions/CLDepthwiseConvolution.h
+++ b/arm_compute/runtime/CL/functions/CLDepthwiseConvolution.h
@@ -52,13 +52,13 @@ public:
/** Initialize the function's source, destination, conv and border_size.
*
* @param[in, out] input Source tensor. Data type supported: F32. (Written to only for border filling).
- * @param[out] output Destination tensor. Data type supported: same as @p input.
* @param[in] weights Weights tensor. A 3D tensor with shape [3, 3, IFM]. Data type supported: Same as @p input.
* @param[in] biases (Optional) Biases tensor. A 1D tensor with shape [IFM]. Must be nullptr if not needed.
* Data type supported: Same as @p input.
+ * @param[out] output Destination tensor. Data type supported: same as @p input.
* @param[in] conv_info Padding and stride information to use for the convolution.
*/
- void configure(ICLTensor *input, ICLTensor *output, const ICLTensor *weights, const ICLTensor *biases, const PadStrideInfo &conv_info);
+ void configure(ICLTensor *input, const ICLTensor *weights, const ICLTensor *biases, ICLTensor *output, const PadStrideInfo &conv_info);
// Inherited methods overriden:
void run() override;
@@ -84,13 +84,13 @@ public:
/** Initialize the function's source, destination, weights and convolution information.
*
* @param[in, out] input Source tensor. Data type supported: F32. (Written to only for border filling).
- * @param[out] output Destination tensor. Data type supported: same as @p input.
* @param[in] weights Weights tensor. These are 3D tensors with shape [kernel_x, kernel_y, IFM]. Data type supported: Same as @p input.
* @param[in] biases (Optional) Biases tensor. A 1D tensor with shape [IFM]. Must be nullptr if not needed.
* Data type supported: Same as @p input.
+ * @param[out] output Destination tensor. Data type supported: same as @p input.
* @param[in] conv_info Padding and stride information to use for the convolution.
*/
- void configure(ICLTensor *input, ICLTensor *output, const ICLTensor *weights, const ICLTensor *biases, const PadStrideInfo &conv_info);
+ void configure(ICLTensor *input, const ICLTensor *weights, const ICLTensor *biases, ICLTensor *output, const PadStrideInfo &conv_info);
// Inherited methods overriden:
void run() override;
diff --git a/arm_compute/runtime/NEON/functions/NEDepthwiseConvolution.h b/arm_compute/runtime/NEON/functions/NEDepthwiseConvolution.h
index f1eae9a96e..acf66f8dd4 100644
--- a/arm_compute/runtime/NEON/functions/NEDepthwiseConvolution.h
+++ b/arm_compute/runtime/NEON/functions/NEDepthwiseConvolution.h
@@ -51,13 +51,13 @@ public:
/** Initialize the function's source, destination, kernels and border_size.
*
* @param[in, out] input Source tensor. Data type supported: F32. (Written to only for border filling).
- * @param[out] output Destination tensor. Data type supported: same as @p input.
* @param[in] weights Weights tensor. These are 3D tensors with shape [3, 3, IFM]. Data type supported: Same as @p input.
* @param[in] biases (Optional) Biases tensor. A 1D tensor with shape [IFM]. Must be nullptr if not needed.
* Data type supported: Same as @p input.
+ * @param[out] output Destination tensor. Data type supported: same as @p input.
* @param[in] conv_info Padding and stride information to use for the convolution.
*/
- void configure(ITensor *input, ITensor *output, const ITensor *weights, const ITensor *biases, const PadStrideInfo &conv_info);
+ void configure(ITensor *input, const ITensor *weights, const ITensor *biases, ITensor *output, const PadStrideInfo &conv_info);
// Inherited methods overriden:
void run() override;
diff --git a/src/core/CL/kernels/CLDepthwiseConvolution3x3Kernel.cpp b/src/core/CL/kernels/CLDepthwiseConvolution3x3Kernel.cpp
index 7b5dfd6e98..5f42450b9f 100644
--- a/src/core/CL/kernels/CLDepthwiseConvolution3x3Kernel.cpp
+++ b/src/core/CL/kernels/CLDepthwiseConvolution3x3Kernel.cpp
@@ -46,7 +46,7 @@ BorderSize CLDepthwiseConvolution3x3Kernel::border_size() const
return _border_size;
}
-void CLDepthwiseConvolution3x3Kernel::configure(const ICLTensor *input, ICLTensor *output, const ICLTensor *weights, const ICLTensor *biases, const PadStrideInfo &conv_info)
+void CLDepthwiseConvolution3x3Kernel::configure(const ICLTensor *input, const ICLTensor *weights, const ICLTensor *biases, ICLTensor *output, const PadStrideInfo &conv_info)
{
ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F32);
ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(output, 1, DataType::F32);
diff --git a/src/core/NEON/kernels/NEDepthwiseConvolution3x3Kernel.cpp b/src/core/NEON/kernels/NEDepthwiseConvolution3x3Kernel.cpp
index 62aa934f26..5c4bd34e05 100644
--- a/src/core/NEON/kernels/NEDepthwiseConvolution3x3Kernel.cpp
+++ b/src/core/NEON/kernels/NEDepthwiseConvolution3x3Kernel.cpp
@@ -50,7 +50,7 @@ BorderSize NEDepthwiseConvolution3x3Kernel::border_size() const
return _border_size;
}
-void NEDepthwiseConvolution3x3Kernel::configure(const ITensor *input, ITensor *output, const ITensor *weights, const PadStrideInfo &conv_info)
+void NEDepthwiseConvolution3x3Kernel::configure(const ITensor *input, const ITensor *weights, ITensor *output, const PadStrideInfo &conv_info)
{
ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F32);
ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, output, weights);
diff --git a/src/runtime/CL/functions/CLDepthwiseConvolution.cpp b/src/runtime/CL/functions/CLDepthwiseConvolution.cpp
index bfc792c942..156565950a 100644
--- a/src/runtime/CL/functions/CLDepthwiseConvolution.cpp
+++ b/src/runtime/CL/functions/CLDepthwiseConvolution.cpp
@@ -35,13 +35,13 @@ CLDepthwiseConvolution3x3::CLDepthwiseConvolution3x3()
{
}
-void CLDepthwiseConvolution3x3::configure(ICLTensor *input, ICLTensor *output, const ICLTensor *weights, const ICLTensor *biases, const PadStrideInfo &conv_info)
+void CLDepthwiseConvolution3x3::configure(ICLTensor *input, const ICLTensor *weights, const ICLTensor *biases, ICLTensor *output, const PadStrideInfo &conv_info)
{
ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F32);
ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(output, 1, DataType::F32);
ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, weights);
- _kernel.configure(input, output, weights, biases, conv_info);
+ _kernel.configure(input, weights, biases, output, conv_info);
_border_handler.configure(input, _kernel.border_size(), BorderMode::CONSTANT, PixelValue(0));
}
@@ -57,7 +57,7 @@ CLDepthwiseConvolution::CLDepthwiseConvolution()
{
}
-void CLDepthwiseConvolution::configure(ICLTensor *input, ICLTensor *output, const ICLTensor *weights, const ICLTensor *biases, const PadStrideInfo &conv_info)
+void CLDepthwiseConvolution::configure(ICLTensor *input, const ICLTensor *weights, const ICLTensor *biases, ICLTensor *output, const PadStrideInfo &conv_info)
{
ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F32);
ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, weights);
diff --git a/src/runtime/CL/functions/CLDepthwiseSeparableConvolutionLayer.cpp b/src/runtime/CL/functions/CLDepthwiseSeparableConvolutionLayer.cpp
index 14ab808dbf..af2c6f0eb8 100644
--- a/src/runtime/CL/functions/CLDepthwiseSeparableConvolutionLayer.cpp
+++ b/src/runtime/CL/functions/CLDepthwiseSeparableConvolutionLayer.cpp
@@ -39,7 +39,7 @@ void CLDepthwiseSeparableConvolutionLayer::configure(ICLTensor *input, const ICL
const ICLTensor *pointwise_weights, const ICLTensor *pointwise_biases, ICLTensor *output,
const PadStrideInfo &depthwise_conv_info, const PadStrideInfo &pointwise_conv_info)
{
- _depthwise_conv.configure(input, depthwise_out, depthwise_weights, depthwise_biases, depthwise_conv_info);
+ _depthwise_conv.configure(input, depthwise_weights, depthwise_biases, depthwise_out, depthwise_conv_info);
_pointwise_conv.configure(depthwise_out, pointwise_weights, pointwise_biases, output, pointwise_conv_info);
}
diff --git a/src/runtime/NEON/functions/NEDepthwiseConvolution.cpp b/src/runtime/NEON/functions/NEDepthwiseConvolution.cpp
index 3be8d976a5..fd8d419fa1 100644
--- a/src/runtime/NEON/functions/NEDepthwiseConvolution.cpp
+++ b/src/runtime/NEON/functions/NEDepthwiseConvolution.cpp
@@ -36,13 +36,13 @@ NEDepthwiseConvolution3x3::NEDepthwiseConvolution3x3()
{
}
-void NEDepthwiseConvolution3x3::configure(ITensor *input, ITensor *output, const ITensor *weights, const ITensor *biases, const PadStrideInfo &conv_info)
+void NEDepthwiseConvolution3x3::configure(ITensor *input, const ITensor *weights, const ITensor *biases, ITensor *output, const PadStrideInfo &conv_info)
{
ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F32);
ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, output, weights);
// Call convolution kernel
- _kernel.configure(input, output, weights, conv_info);
+ _kernel.configure(input, weights, output, conv_info);
_border_handler.configure(input, _kernel.border_size(), BorderMode::CONSTANT, PixelValue(static_cast<float>(0.f)));
if(biases != nullptr)
{
diff --git a/tests/benchmark/fixtures/DepthwiseConvolutionFixture.h b/tests/benchmark/fixtures/DepthwiseConvolutionFixture.h
index 0095509cf7..6de7bcadeb 100644
--- a/tests/benchmark/fixtures/DepthwiseConvolutionFixture.h
+++ b/tests/benchmark/fixtures/DepthwiseConvolutionFixture.h
@@ -54,7 +54,7 @@ public:
dst = create_tensor<TensorType>(dst_shape, data_type, 1, fixed_point_position);
// Create and configure function
- depth_conv.configure(&src, &dst, &weights, &biases, info);
+ depth_conv.configure(&src, &weights, &biases, &dst, info);
// Allocate tensors
src.allocator()->allocate();
diff --git a/tests/validation/NEON/DepthwiseConvolution.cpp b/tests/validation/NEON/DepthwiseConvolution.cpp
index 9e2dd92d06..6e8aa46ed0 100644
--- a/tests/validation/NEON/DepthwiseConvolution.cpp
+++ b/tests/validation/NEON/DepthwiseConvolution.cpp
@@ -65,7 +65,7 @@ DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(framework::da
// Create and configure function
NEDepthwiseConvolution3x3 depthwise_layer;
- depthwise_layer.configure(&src, &dst, &weights, &bias, info);
+ depthwise_layer.configure(&src, &weights, &bias, &dst, info);
// Validate valid region
const ValidRegion input_valid_region = shape_to_valid_region(input_shape);
diff --git a/tests/validation/fixtures/DepthwiseConvolutionFixture.h b/tests/validation/fixtures/DepthwiseConvolutionFixture.h
index d883807537..f49e76c70c 100644
--- a/tests/validation/fixtures/DepthwiseConvolutionFixture.h
+++ b/tests/validation/fixtures/DepthwiseConvolutionFixture.h
@@ -80,7 +80,7 @@ protected:
// Create Depthwise Convolution configure function
FunctionType depthwise_convolution;
- depthwise_convolution.configure(&src, &dst, &weights, &biases, pad_stride_info);
+ depthwise_convolution.configure(&src, &weights, &biases, &dst, pad_stride_info);
// Allocate tensors
src.allocator()->allocate();