From 2d9de0a3fa6ad858e70040124f362799a962bb6a Mon Sep 17 00:00:00 2001 From: Giorgio Arena Date: Thu, 15 Mar 2018 17:58:20 +0000 Subject: COMPMID-1009 Support 4x4 output tile for Winograd Filter Transform on OpenCL. Change-Id: I68c6453e0f192de659582404f109a89616b9fbb9 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/124811 Tested-by: Jenkins Reviewed-by: Georgios Pinitas Reviewed-by: Gian Marco Iodice --- arm_compute/core/utils/misc/ShapeCalculator.h | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'arm_compute/core/utils') diff --git a/arm_compute/core/utils/misc/ShapeCalculator.h b/arm_compute/core/utils/misc/ShapeCalculator.h index 5344ce7e74..383fc6cda6 100644 --- a/arm_compute/core/utils/misc/ShapeCalculator.h +++ b/arm_compute/core/utils/misc/ShapeCalculator.h @@ -196,23 +196,17 @@ inline TensorShape compute_fully_connected_reshaped_weights_shape(const ITensorI return output_shape; } -inline TensorShape compute_winograd_filter_transform_shape(const ITensorInfo &input) +inline TensorShape compute_winograd_filter_transform_shape(const ITensorInfo &input, const Size2D &output_tile) { - // COMPMID-984 (giaiod01) TensorShape tensor_shape{ input.tensor_shape() }; + tensor_shape.remove_dimension(get_data_layout_dimension_index(input.data_layout(), DataLayoutDimension::WIDTH)); + tensor_shape.set(Window::DimY, input.dimension(2)); + tensor_shape.set(Window::DimZ, (output_tile.width == 2) ? 16 : 36); + if(input.data_layout() == DataLayout::NCHW) { - tensor_shape.remove_dimension(0); tensor_shape.set(Window::DimX, input.dimension(3)); - tensor_shape.set(Window::DimY, input.dimension(2)); - tensor_shape.set(Window::DimZ, 16); - } - else - { - tensor_shape.remove_dimension(1); - tensor_shape.set(Window::DimY, input.dimension(2)); - tensor_shape.set(Window::DimZ, 16); } return tensor_shape; -- cgit v1.2.1