aboutsummaryrefslogtreecommitdiff
path: root/tests/datasets/SmallConvolutionLayerDataset.h
diff options
context:
space:
mode:
authorMichele Di Giorgio <michele.digiorgio@arm.com>2020-04-29 15:14:18 +0100
committerMichele Di Giorgio <michele.digiorgio@arm.com>2020-05-13 10:02:20 +0000
commite37662a34659a2d6649b9793e62f6a9110437684 (patch)
tree325593180725c774d22d3b46ef710e728afae877 /tests/datasets/SmallConvolutionLayerDataset.h
parentea2ce177dd444b5670e12d5b427359ce77b8cc89 (diff)
downloadComputeLibrary-e37662a34659a2d6649b9793e62f6a9110437684.tar.gz
COMPMID-3128: Test improvement for GEMMConvolutionLayer on CL and NEON(Function-level)
Cleaning up GEMMConvolutionLayer tests by doing the following: - Remove unnecessary configuration tests - Remove redundant tests > Redundant shapes > For large shapes there are already tests for each internal kernel/function - Test NHWC 1x1 kernel 1x1 stride to stress _skip_im2col - Stimulate gemm3d to skip col2im - Test asymmetric padding - Test batch size equal to one and different than one - Test fully connected convolution - Test with a few different padding values - Test 1D kernel - Test with FLOOR rounding policy Change-Id: I88e7009b8e9c991994ed264476c16a79a0de4a68 Signed-off-by: Michele Di Giorgio <michele.digiorgio@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3150 Tested-by: Arm Jenkins <bsgcomp@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Sang-Hoon Park <sang-hoon.park@arm.com>
Diffstat (limited to 'tests/datasets/SmallConvolutionLayerDataset.h')
-rw-r--r--tests/datasets/SmallConvolutionLayerDataset.h41
1 files changed, 18 insertions, 23 deletions
diff --git a/tests/datasets/SmallConvolutionLayerDataset.h b/tests/datasets/SmallConvolutionLayerDataset.h
index e85978c49a..e426b288b4 100644
--- a/tests/datasets/SmallConvolutionLayerDataset.h
+++ b/tests/datasets/SmallConvolutionLayerDataset.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2019 ARM Limited.
+ * Copyright (c) 2017-2020 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -149,38 +149,33 @@ class SmallConvolutionLayerDataset final : public ConvolutionLayerDataset
public:
SmallConvolutionLayerDataset()
{
- add_config(TensorShape(224U, 224U, 3U), TensorShape(3U, 3U, 3U, 32U), TensorShape(32U), TensorShape(112U, 112U, 32U),
- PadStrideInfo(2, 2, /*left*/ 0, /*right*/ 1, /*top*/ 0, /*bottom*/ 1, DimensionRoundingType::FLOOR));
-
// 1D Kernel
add_config(TensorShape(1U, 5U, 2U), TensorShape(1U, 3U, 2U, 3U), TensorShape(3U), TensorShape(1U, 7U, 3U), PadStrideInfo(1, 1, 0, 0, 2, 2, DimensionRoundingType::FLOOR));
+ // 1x1 Kernel with Stride (1, 1) and NHWC data layout in order to test skipping Im2Col
+ add_config(TensorShape(1U, 5U, 2U), TensorShape(1U, 1U, 2U, 3U), TensorShape(3U), TensorShape(1U, 5U, 3U), PadStrideInfo(1, 1, 0, 0));
+
// Batch size 1
- add_config(TensorShape(23U, 27U, 5U), TensorShape(3U, 3U, 5U, 21U), TensorShape(21U), TensorShape(11U, 25U, 21U), PadStrideInfo(2, 1, 0, 0));
- add_config(TensorShape(33U, 27U, 7U), TensorShape(5U, 5U, 7U, 16U), TensorShape(16U), TensorShape(11U, 12U, 16U), PadStrideInfo(3, 2, 1, 0));
- add_config(TensorShape(17U, 31U, 2U), TensorShape(5U, 5U, 2U, 19U), TensorShape(19U), TensorShape(15U, 15U, 19U), PadStrideInfo(1, 2, 1, 1));
- add_config(TensorShape(23U, 27U, 5U), TensorShape(3U, 1U, 5U, 21U), TensorShape(21U), TensorShape(11U, 27U, 21U), PadStrideInfo(2, 1, 0, 0));
- add_config(TensorShape(33U, 27U, 7U), TensorShape(5U, 7U, 7U, 16U), TensorShape(16U), TensorShape(11U, 11U, 16U), PadStrideInfo(3, 2, 1, 0));
- add_config(TensorShape(17U, 31U, 2U), TensorShape(5U, 3U, 2U, 19U), TensorShape(19U), TensorShape(15U, 16U, 19U), PadStrideInfo(1, 2, 1, 1));
- add_config(TensorShape(3U, 3U, 1U), TensorShape(2U, 2U, 1U, 11U), TensorShape(11U), TensorShape(2U, 2U, 11U), PadStrideInfo(1, 1, 0, 0));
- // Batch size 4
+ add_config(TensorShape(23U, 27U, 5U), TensorShape(3U, 3U, 5U, 2U), TensorShape(2U), TensorShape(11U, 25U, 2U), PadStrideInfo(2, 1, 0, 0));
+ add_config(TensorShape(33U, 27U, 7U), TensorShape(5U, 5U, 7U, 3U), TensorShape(3U), TensorShape(11U, 12U, 3U), PadStrideInfo(3, 2, 1, 0));
+ add_config(TensorShape(17U, 31U, 2U), TensorShape(5U, 5U, 2U, 4U), TensorShape(4U), TensorShape(15U, 15U, 4U), PadStrideInfo(1, 2, 1, 1));
+ add_config(TensorShape(3U, 3U, 1U), TensorShape(2U, 2U, 1U, 5U), TensorShape(5U), TensorShape(2U, 2U, 5U), PadStrideInfo(1, 1, 0, 0));
+
+ // Batch size different than one
add_config(TensorShape(23U, 27U, 5U, 4U), TensorShape(3U, 3U, 5U, 21U), TensorShape(21U), TensorShape(11U, 25U, 21U, 4U), PadStrideInfo(2, 1, 0, 0));
add_config(TensorShape(33U, 27U, 7U, 4U), TensorShape(5U, 5U, 7U, 16U), TensorShape(16U), TensorShape(11U, 12U, 16U, 4U), PadStrideInfo(3, 2, 1, 0));
add_config(TensorShape(17U, 31U, 2U, 4U), TensorShape(5U, 5U, 2U, 19U), TensorShape(19U), TensorShape(15U, 15U, 19U, 4U), PadStrideInfo(1, 2, 1, 1));
- add_config(TensorShape(23U, 27U, 5U, 4U), TensorShape(3U, 1U, 5U, 21U), TensorShape(21U), TensorShape(11U, 27U, 21U, 4U), PadStrideInfo(2, 1, 0, 0));
- add_config(TensorShape(33U, 27U, 7U, 4U), TensorShape(5U, 7U, 7U, 16U), TensorShape(16U), TensorShape(11U, 11U, 16U, 4U), PadStrideInfo(3, 2, 1, 0));
- add_config(TensorShape(17U, 31U, 2U, 4U), TensorShape(5U, 3U, 2U, 19U), TensorShape(19U), TensorShape(15U, 16U, 19U, 4U), PadStrideInfo(1, 2, 1, 1));
- // Arbitrary batch size
- add_config(TensorShape(33U, 27U, 7U, 5U), TensorShape(5U, 7U, 7U, 16U), TensorShape(16U), TensorShape(11U, 11U, 16U, 5U), PadStrideInfo(3, 2, 1, 0));
+
// FC convolution
add_config(TensorShape(1U, 1U, 1024U), TensorShape(1U, 1U, 1024U, 1001U), TensorShape(1001U), TensorShape(1U, 1U, 1001U), PadStrideInfo(1, 1, 0, 0));
+
// Asymmetric padding
- add_config(TensorShape(33U, 27U, 7U, 5U), TensorShape(5U, 7U, 7U, 16U), TensorShape(16U), TensorShape(11U, 12U, 16U, 5U), PadStrideInfo(3, 2, 1, 1, 2, 0, DimensionRoundingType::FLOOR));
- add_config(TensorShape(33U, 27U, 7U, 5U), TensorShape(5U, 7U, 7U, 16U), TensorShape(16U), TensorShape(11U, 12U, 16U, 5U), PadStrideInfo(3, 2, 1, 1, 0, 2, DimensionRoundingType::FLOOR));
- add_config(TensorShape(33U, 27U, 7U, 5U), TensorShape(5U, 7U, 7U, 16U), TensorShape(16U), TensorShape(11U, 12U, 16U, 5U), PadStrideInfo(3, 2, 2, 1, 2, 0, DimensionRoundingType::FLOOR));
- add_config(TensorShape(33U, 27U, 7U, 5U), TensorShape(5U, 7U, 7U, 16U), TensorShape(16U), TensorShape(11U, 12U, 16U, 5U), PadStrideInfo(3, 2, 1, 3, 0, 2, DimensionRoundingType::FLOOR));
- add_config(TensorShape(33U, 27U, 7U, 5U), TensorShape(5U, 7U, 7U, 16U), TensorShape(16U), TensorShape(10U, 11U, 16U, 5U), PadStrideInfo(3, 2, 1, 0, 1, 0, DimensionRoundingType::FLOOR));
- add_config(TensorShape(33U, 27U, 7U, 5U), TensorShape(5U, 7U, 7U, 16U), TensorShape(16U), TensorShape(10U, 11U, 16U, 5U), PadStrideInfo(3, 2, 0, 1, 0, 1, DimensionRoundingType::FLOOR));
+ add_config(TensorShape(33U, 27U, 3U), TensorShape(5U, 7U, 3U, 4U), TensorShape(4U), TensorShape(11U, 12U, 4U), PadStrideInfo(3, 2, 1, 1, 2, 0, DimensionRoundingType::FLOOR));
+ add_config(TensorShape(33U, 27U, 3U), TensorShape(5U, 7U, 3U, 4U), TensorShape(4U), TensorShape(11U, 12U, 4U), PadStrideInfo(3, 2, 1, 1, 0, 2, DimensionRoundingType::FLOOR));
+ add_config(TensorShape(33U, 27U, 3U), TensorShape(5U, 7U, 3U, 4U), TensorShape(4U), TensorShape(11U, 12U, 4U), PadStrideInfo(3, 2, 2, 1, 2, 0, DimensionRoundingType::FLOOR));
+ add_config(TensorShape(33U, 27U, 3U), TensorShape(5U, 7U, 3U, 4U), TensorShape(4U), TensorShape(11U, 12U, 4U), PadStrideInfo(3, 2, 1, 3, 0, 2, DimensionRoundingType::FLOOR));
+ add_config(TensorShape(33U, 27U, 3U), TensorShape(5U, 7U, 3U, 4U), TensorShape(4U), TensorShape(10U, 11U, 4U), PadStrideInfo(3, 2, 1, 0, 1, 0, DimensionRoundingType::FLOOR));
+ add_config(TensorShape(33U, 27U, 3U), TensorShape(5U, 7U, 3U, 4U), TensorShape(4U), TensorShape(10U, 11U, 4U), PadStrideInfo(3, 2, 0, 1, 0, 1, DimensionRoundingType::FLOOR));
add_config(TensorShape(5U, 4U, 3U, 2U), TensorShape(4U, 4U, 3U, 1U), TensorShape(1U), TensorShape(2U, 1U, 1U, 2U), PadStrideInfo(1, 1, 0, 0, 0, 0, DimensionRoundingType::FLOOR));
}