From 7657224de2b697a8a92cccf26d98e53ccd7c1a03 Mon Sep 17 00:00:00 2001 From: Giorgio Arena Date: Wed, 4 Apr 2018 17:44:26 +0100 Subject: COMPMID-926 Add depth multiplier support to NEON/CL/GLES depthwise convolution Change-Id: I03f32c62350e5ea43e77bb15fc5a832d83719e3b Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/126657 Tested-by: Jenkins Reviewed-by: Michele DiGiorgio Reviewed-by: Georgios Pinitas --- .../benchmark/fixtures/DepthwiseConvolutionLayerFixture.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'tests/benchmark/fixtures/DepthwiseConvolutionLayerFixture.h') diff --git a/tests/benchmark/fixtures/DepthwiseConvolutionLayerFixture.h b/tests/benchmark/fixtures/DepthwiseConvolutionLayerFixture.h index 9d29aee76a..9276431de8 100644 --- a/tests/benchmark/fixtures/DepthwiseConvolutionLayerFixture.h +++ b/tests/benchmark/fixtures/DepthwiseConvolutionLayerFixture.h @@ -26,6 +26,7 @@ #include "arm_compute/core/TensorShape.h" #include "arm_compute/core/Types.h" +#include "arm_compute/core/utils/misc/ShapeCalculator.h" #include "tests/Globals.h" #include "tests/Utils.h" #include "tests/framework/Fixture.h" @@ -36,14 +37,25 @@ namespace test { namespace benchmark { +using namespace arm_compute::misc::shape_calculator; + /** Fixture that can be used for NEON and CL */ template class DepthwiseConvolutionLayerFixture : public framework::Fixture { public: template - void setup(TensorShape src_shape, TensorShape weights_shape, TensorShape dst_shape, PadStrideInfo info, DataType data_type, int batches) + void setup(TensorShape src_shape, Size2D kernel_size, PadStrideInfo info, DataType data_type, int batches) { + // Get shapes + TensorShape weights_shape(kernel_size.width, kernel_size.height); + + const TensorInfo in_info(src_shape, 1, data_type); + const TensorInfo we_info(weights_shape, 1, data_type); + TensorShape dst_shape = compute_depthwise_convolution_shape(in_info, we_info, info, 1); + + weights_shape.set(2, dst_shape.z()); + // Set batched in source and destination shapes const unsigned int fixed_point_position = 4; src_shape.set(3 /* batch */, batches); -- cgit v1.2.1