aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/NEON/DepthwiseConvolutionLayer.cpp
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2018-02-14 19:23:44 +0000
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:47:18 +0000
commit69af6cf5ec6edce564dd5ef97baba5a1325e8763 (patch)
treec8f82cb0f5258b1f2a004631d7fa78b49b34231d /tests/validation/NEON/DepthwiseConvolutionLayer.cpp
parentb99f00d44b8962c40f1de955831f8b04c15e7386 (diff)
downloadComputeLibrary-69af6cf5ec6edce564dd5ef97baba5a1325e8763.tar.gz
COMPMID-765: Sanitize permutation vector for Permute.
If permutation vector is bigger than the tensorshape to permute then infer dimensions of size one for the extra dimensions. Change-Id: I5addb292f770d925f47f756902e16073039e8f71 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/120473 Tested-by: Jenkins <bsgcomp@arm.com> Reviewed-by: Stefana Simion <stefana.simion@arm.com> Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'tests/validation/NEON/DepthwiseConvolutionLayer.cpp')
-rw-r--r--tests/validation/NEON/DepthwiseConvolutionLayer.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/validation/NEON/DepthwiseConvolutionLayer.cpp b/tests/validation/NEON/DepthwiseConvolutionLayer.cpp
index 47e8896fd6..0cdd4c0296 100644
--- a/tests/validation/NEON/DepthwiseConvolutionLayer.cpp
+++ b/tests/validation/NEON/DepthwiseConvolutionLayer.cpp
@@ -82,8 +82,11 @@ DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(framework::da
validate(bias.info()->valid_region(), bias_valid_region);
// Validate padding
- const int step = 16 >> info.stride().first;
- const PaddingSize padding = PaddingCalculator(output_shape.x(), step).required_padding();
+ bool is_optimized_run = NEDepthwiseConvolutionLayer3x3Kernel::is_optimized_execution_possible(input_shape, info, data_type, DataLayout::NCHW);
+ const int step_non_opt_dwc = 16 >> info.stride().first;
+ const int step_bias_add = 16 / src.info()->element_size();
+ const int step = is_optimized_run ? step_bias_add : std::max(step_non_opt_dwc, step_bias_add);
+ const PaddingSize padding = PaddingCalculator(output_shape.x(), step).required_padding();
validate(dst.info()->padding(), padding);
}