From ec0113dd7749991959ae351934eea0c0d8077dcb Mon Sep 17 00:00:00 2001 From: Gunes Bayir Date: Wed, 9 Nov 2022 09:26:27 +0000 Subject: Optimize Transposed Convolution for CL backend (FP32/16) This patch optimizes transposed convolution for CL backend by rewriting it in a single kernel instead of three (flip_kernel + upsample + conv). The new kernel skips the upsampling step which reduces the input space of convolution by stride_x * stride_y, resulting in significant performance improvement. It also skips the kernel flipping by traversing the weights accordingly, thus reduces the memory footprint. Resolves: COMPMID-5676 Signed-off-by: Gunes Bayir Change-Id: I8a333212dc7c5f7f0597aa58b0d56d44814baa14 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/8588 Tested-by: Arm Jenkins Reviewed-by: Gian Marco Iodice Comments-Addressed: Arm Jenkins Benchmark: Arm Jenkins --- tests/datasets/ShapeDatasets.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'tests/datasets/ShapeDatasets.h') diff --git a/tests/datasets/ShapeDatasets.h b/tests/datasets/ShapeDatasets.h index f0ad9fa693..e4277a981e 100644 --- a/tests/datasets/ShapeDatasets.h +++ b/tests/datasets/ShapeDatasets.h @@ -549,7 +549,7 @@ public: { TensorShape{ 5U, 5U, 7U, 4U, 3U }, TensorShape{ 5U, 5U, 4U, 13U, 2U }, - TensorShape{ 5U, 5U, 3U, 5U , 2U}, + TensorShape{ 5U, 5U, 3U, 5U, 2U }, }) { } @@ -718,6 +718,7 @@ public: SmallDeconvolutionShapes() : ShapeDataset("InputShape", { + // Multiple Vector Loops for FP32 TensorShape{ 5U, 4U, 3U, 2U }, TensorShape{ 5U, 5U, 3U }, TensorShape{ 11U, 13U, 4U, 3U } @@ -726,6 +727,19 @@ public: } }; +class SmallDeconvolutionShapesWithLargerChannels final : public ShapeDataset +{ +public: + SmallDeconvolutionShapesWithLargerChannels() + : ShapeDataset("InputShape", + { + // Multiple Vector Loops for all data types + TensorShape{ 5U, 5U, 35U } + }) + { + } +}; + /** Data set containing tiny tensor shapes for direct convolution. */ class TinyDirectConvolutionShapes final : public ShapeDataset { -- cgit v1.2.1