aboutsummaryrefslogtreecommitdiff
path: root/tests/benchmark/fixtures/DepthwiseConvolutionLayerFixture.h
diff options
context:
space:
mode:
authorGiorgio Arena <giorgio.arena@arm.com>2018-04-04 17:44:26 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:50:48 +0000
commit7657224de2b697a8a92cccf26d98e53ccd7c1a03 (patch)
tree1dcfa4541dbaf753854a628c93991652158d373e /tests/benchmark/fixtures/DepthwiseConvolutionLayerFixture.h
parente74b201ca1abca040ca9f30837fdf19aa610e7c4 (diff)
downloadComputeLibrary-7657224de2b697a8a92cccf26d98e53ccd7c1a03.tar.gz
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 <bsgcomp@arm.com> Reviewed-by: Michele DiGiorgio <michele.digiorgio@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'tests/benchmark/fixtures/DepthwiseConvolutionLayerFixture.h')
-rw-r--r--tests/benchmark/fixtures/DepthwiseConvolutionLayerFixture.h14
1 files changed, 13 insertions, 1 deletions
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 <typename TensorType, typename Function, typename Accessor>
class DepthwiseConvolutionLayerFixture : public framework::Fixture
{
public:
template <typename...>
- 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);