diff options
author | Viet-Hoa Do <viet-hoa.do@arm.com> | 2023-06-27 16:33:57 +0100 |
---|---|---|
committer | Viet-Hoa Do <viet-hoa.do@arm.com> | 2023-07-07 15:35:39 +0000 |
commit | 019a7d9fb5f988c47adb1327492db62869cfa6ac (patch) | |
tree | 1997a53960fde52d3657f6a056a7e02aae2fcb44 /src/runtime | |
parent | 5153fe4b989768907ed588ecdb859d6a81b72992 (diff) | |
download | ComputeLibrary-019a7d9fb5f988c47adb1327492db62869cfa6ac.tar.gz |
Enable transpose convolution with non-square kernels
Resolves: COMPMID-6319
Signed-off-by: Viet-Hoa Do <viet-hoa.do@arm.com>
Change-Id: I49a17ff973efc88b7ce0334c47ecf076c03f4cc3
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9829
Reviewed-by: Jakub Sujak <jakub.sujak@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/runtime')
-rw-r--r-- | src/runtime/CL/functions/CLDirectDeconvolutionLayer.cpp | 4 | ||||
-rw-r--r-- | src/runtime/NEON/functions/NEDeconvolutionLayer.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/runtime/CL/functions/CLDirectDeconvolutionLayer.cpp b/src/runtime/CL/functions/CLDirectDeconvolutionLayer.cpp index b263d73e9e..88c3c6193c 100644 --- a/src/runtime/CL/functions/CLDirectDeconvolutionLayer.cpp +++ b/src/runtime/CL/functions/CLDirectDeconvolutionLayer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2021 Arm Limited. + * Copyright (c) 2019-2021, 2023 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -67,8 +67,8 @@ Status CLDirectDeconvolutionLayer::validate(const ITensorInfo *input, const ITen const size_t idx_h = get_data_layout_dimension_index(data_layout, DataLayoutDimension::HEIGHT); const size_t idx_c = get_data_layout_dimension_index(data_layout, DataLayoutDimension::CHANNEL); - ARM_COMPUTE_RETURN_ERROR_ON(weights->dimension(idx_w) != weights->dimension(idx_h)); ARM_COMPUTE_RETURN_ERROR_ON(weights->dimension(idx_w) < 1); + ARM_COMPUTE_RETURN_ERROR_ON(weights->dimension(idx_h) < 1); auto out_dims = deconvolution_output_dimensions(input->dimension(idx_w), input->dimension(idx_h), weights->dimension(idx_w), weights->dimension(idx_h), info); diff --git a/src/runtime/NEON/functions/NEDeconvolutionLayer.cpp b/src/runtime/NEON/functions/NEDeconvolutionLayer.cpp index 8534d2a8f3..439aff0840 100644 --- a/src/runtime/NEON/functions/NEDeconvolutionLayer.cpp +++ b/src/runtime/NEON/functions/NEDeconvolutionLayer.cpp @@ -89,8 +89,8 @@ Status NEDeconvolutionLayer::validate(const ITensorInfo *input, const ITensorInf ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F32, DataType::F16, DataType::QASYMM8, DataType::QASYMM8_SIGNED); const unsigned int width_idx = get_data_layout_dimension_index(weights->data_layout(), DataLayoutDimension::WIDTH); const unsigned int height_idx = get_data_layout_dimension_index(weights->data_layout(), DataLayoutDimension::HEIGHT); - ARM_COMPUTE_RETURN_ERROR_ON(weights->dimension(width_idx) != weights->dimension(height_idx)); ARM_COMPUTE_RETURN_ERROR_ON(weights->dimension(width_idx) < 1); + ARM_COMPUTE_RETURN_ERROR_ON(weights->dimension(height_idx) < 1); ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_LAYOUT(weights, input); if(is_data_type_quantized_per_channel(weights->data_type()) && is_data_type_quantized(input->data_type())) { |