diff options
author | Manuel Bottini <manuel.bottini@arm.com> | 2019-06-17 12:04:40 +0100 |
---|---|---|
committer | Georgios Pinitas <georgios.pinitas@arm.com> | 2019-07-11 16:14:01 +0000 |
commit | c1b76faf6be5c33dbf3269faea95e185ac37992f (patch) | |
tree | c52ecf022bf8b5e54844258744e6a10619b68d83 /src/runtime/CL/functions/CLDirectDeconvolutionLayer.cpp | |
parent | 0ec65b8c6438b6d12f17487fdc4c870fe37c7caa (diff) | |
download | ComputeLibrary-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 'src/runtime/CL/functions/CLDirectDeconvolutionLayer.cpp')
-rw-r--r-- | src/runtime/CL/functions/CLDirectDeconvolutionLayer.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/runtime/CL/functions/CLDirectDeconvolutionLayer.cpp b/src/runtime/CL/functions/CLDirectDeconvolutionLayer.cpp index 6e14e26cbd..c1a39ef26a 100644 --- a/src/runtime/CL/functions/CLDirectDeconvolutionLayer.cpp +++ b/src/runtime/CL/functions/CLDirectDeconvolutionLayer.cpp @@ -55,7 +55,6 @@ Status CLDirectDeconvolutionLayer::validate(const ITensorInfo *input, const ITen ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(input, weights, output); ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::QASYMM8, DataType::F16, DataType::F32); ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_LAYOUT(input, weights); - const DataLayout data_layout = input->data_layout(); const size_t idx_w = get_data_layout_dimension_index(data_layout, DataLayoutDimension::WIDTH); @@ -95,11 +94,11 @@ Status CLDirectDeconvolutionLayer::validate(const ITensorInfo *input, const ITen unsigned int padx = 0; unsigned int pady = 0; - const TensorShape scale_out_shape = compute_deconvolution_upsampled_shape(*input, *weights, stride_x, stride_y, 0, 0, out_dims, padx, pady); + const TensorShape scale_out_shape = compute_deconvolution_upsampled_shape(*input, *weights, stride_x, stride_y, out_dims, padx, pady); TensorInfo scale_out_info(input->clone()->set_is_resizable(true).reset_padding().set_tensor_shape(scale_out_shape).set_data_layout(data_layout)); const PadStrideInfo conv_info(1, 1, 0, 0, 0, 0, DimensionRoundingType::CEIL); - ARM_COMPUTE_RETURN_ON_ERROR(CLDeconvolutionLayerUpsample::validate(input, &scale_out_info, BorderSize(), info)); + ARM_COMPUTE_RETURN_ON_ERROR(CLDeconvolutionLayerUpsample::validate(input, &scale_out_info, info)); ARM_COMPUTE_RETURN_ON_ERROR(CLConvolutionLayer::validate(&scale_out_info, weights, bias, output, conv_info, weights_info)); return Status{}; @@ -141,7 +140,7 @@ void CLDirectDeconvolutionLayer::configure(ICLTensor *input, ICLTensor *weights, // Find the upsampled dimensions and the padding needed for the convolution with stride 1 in order to match output shape unsigned int padx = 0; unsigned int pady = 0; - const TensorShape scale_out_shape = compute_deconvolution_upsampled_shape(*input->info(), *weights->info(), stride_x, stride_y, 0, 0, out_dims, padx, pady); + const TensorShape scale_out_shape = compute_deconvolution_upsampled_shape(*input->info(), *weights->info(), stride_x, stride_y, out_dims, padx, pady); TensorInfo scale_out_info(scale_out_shape, 1, input->info()->data_type(), input->info()->quantization_info()); scale_out_info.set_data_layout(data_layout); @@ -149,7 +148,7 @@ void CLDirectDeconvolutionLayer::configure(ICLTensor *input, ICLTensor *weights, // configure scale function const PadStrideInfo upsample_info(stride_x, stride_y, padx / 2, pady / 2); - _scale_f.configure(input, &_scaled_output, BorderSize(), upsample_info); + _scale_f.configure(input, &_scaled_output, upsample_info); // Setup the function to convolve the upscaled output const PadStrideInfo conv_info(1, 1, 0, 0, 0, 0, DimensionRoundingType::CEIL); |