diff options
author | SiCong Li <sicong.li@arm.com> | 2020-11-06 09:55:04 +0000 |
---|---|---|
committer | Georgios Pinitas <georgios.pinitas@arm.com> | 2021-04-07 14:14:23 +0000 |
commit | 37d65e4fd036529a2c7567f1987235d0b0258ab0 (patch) | |
tree | cf1166b9af7366c4b06d13d5556196032f585291 /tests/validation | |
parent | c5b1beec99d2be7ff3babbc6345b1baa81f29eb7 (diff) | |
download | ComputeLibrary-37d65e4fd036529a2c7567f1987235d0b0258ab0.tar.gz |
Review all shapes in datasets to account for padding removal Part 2
* Fix validate compare_dimensions to account for cases where 1D tensor
permuted into a 3D tensor
* Add the following configurations to stress padding removal:
* size = 1
* size = multiple of processing size
* size = non-multiple of processing size
Partially resolves COMPMID-3865
Change-Id: Iee0de4c9e72b3413c0807e2c86bc2331911a4c6f
Signed-off-by: SiCong Li <sicong.li@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4393
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'tests/validation')
-rw-r--r-- | tests/validation/CL/DepthwiseConvolutionLayerNative.cpp | 1 | ||||
-rw-r--r-- | tests/validation/Validation.h | 8 |
2 files changed, 6 insertions, 3 deletions
diff --git a/tests/validation/CL/DepthwiseConvolutionLayerNative.cpp b/tests/validation/CL/DepthwiseConvolutionLayerNative.cpp index 6b917d8962..f640ee2b18 100644 --- a/tests/validation/CL/DepthwiseConvolutionLayerNative.cpp +++ b/tests/validation/CL/DepthwiseConvolutionLayerNative.cpp @@ -30,7 +30,6 @@ #include "tests/CL/CLAccessor.h" #include "tests/CL/Helper.h" #include "tests/PaddingCalculator.h" -#include "tests/datasets/ShapeDatasets.h" #include "tests/framework/Asserts.h" #include "tests/framework/Macros.h" #include "tests/framework/datasets/Datasets.h" diff --git a/tests/validation/Validation.h b/tests/validation/Validation.h index c2df1c31c0..a75562bac2 100644 --- a/tests/validation/Validation.h +++ b/tests/validation/Validation.h @@ -157,11 +157,15 @@ bool compare_dimensions(const Dimensions<T> &dimensions1, const Dimensions<T> &d } else { - // In case a 2D shape becomes 3D after permutation, the permuted tensor will have one dimension more and the first value will be 1 - if((dimensions1.num_dimensions() != dimensions2.num_dimensions()) && ((dimensions1.num_dimensions() != (dimensions2.num_dimensions() + 1)) || (dimensions1.x() != 1))) + // In case a 1D/2D shape becomes 3D after permutation, the permuted tensor will have two/one dimension(s) more and the first (two) value(s) will be 1 + // clang-format off + if((dimensions1.num_dimensions() != dimensions2.num_dimensions()) && + ((dimensions1.num_dimensions() != (dimensions2.num_dimensions() + 1)) || (dimensions1.x() != 1)) && + ((dimensions1.num_dimensions() != (dimensions2.num_dimensions() + 2)) || (dimensions1.x() != 1) || (dimensions1.y() != 1))) { return false; } + // clang-format on if((dimensions1[0] != dimensions2[2]) || (dimensions1[1] != dimensions2[0]) || (dimensions1[2] != dimensions2[1])) { |