From 607509748bf81d72a7bd0f54d5fe5f7504c3b6ff Mon Sep 17 00:00:00 2001 From: Anitha Raj Date: Tue, 15 Aug 2023 09:40:55 +0100 Subject: Remove functionality to add padding in Y dimension in validation tests Signed-off-by: Anitha Raj Change-Id: I5b9e04f9057777bb080c40fa1f55dfee4bd866dc Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10138 Benchmark: Arm Jenkins Tested-by: Arm Jenkins Reviewed-by: Gian Marco Iodice Reviewed-by: Pablo Marquez Tello Comments-Addressed: Arm Jenkins --- tests/validation/Helpers.cpp | 23 ---------------------- tests/validation/Helpers.h | 10 ---------- .../fixtures/DepthwiseConvolutionLayerFixture.h | 1 - 3 files changed, 34 deletions(-) (limited to 'tests') diff --git a/tests/validation/Helpers.cpp b/tests/validation/Helpers.cpp index 110325c5a0..2c2d364c51 100644 --- a/tests/validation/Helpers.cpp +++ b/tests/validation/Helpers.cpp @@ -350,29 +350,6 @@ void add_padding_x(std::initializer_list tensors, const DataLayout &d } } -void add_padding_y(std::initializer_list tensors, const DataLayout &data_layout) -{ - if(data_layout == DataLayout::NHWC) - { - constexpr unsigned int lower = 1U; - constexpr unsigned int upper = 4U; - - std::uniform_int_distribution distribution(lower, upper); - size_t seed_offset = 0; - - for(ITensor *tensor : tensors) - { - ARM_COMPUTE_ERROR_ON(!tensor->info()->is_resizable()); - - std::mt19937 gen(library->seed() + seed_offset++); - - const unsigned int top = distribution(gen); - const unsigned int bottom = distribution(gen); - - tensor->info()->extend_padding(PaddingSize(top, 0U, bottom, 0U)); - } - } -} QuantizationInfo calculate_mat_mul_dst_q_info(const QuantizationInfo &a_q_info, const QuantizationInfo &b_q_info, int m, int n, int k, DataType data_type) { diff --git a/tests/validation/Helpers.h b/tests/validation/Helpers.h index df3b08ba53..3f91d55db1 100644 --- a/tests/validation/Helpers.h +++ b/tests/validation/Helpers.h @@ -243,16 +243,6 @@ std::pair get_symm_quantized_per_channel_bounds(const QuantizationInfo */ void add_padding_x(std::initializer_list tensors, const DataLayout &data_layout = DataLayout::NHWC, bool only_right_pad = false); -/** Add random padding along the Y axis (between 1 and 4 rows per side) to all the input tensors. - * This is used in our validation suite in order to simulate implicit padding addition after configuring, but before allocating. - * - * @param[in] tensors List of tensors to add padding to - * @param[in] data_layout (Optional) Data layout of the operator - * - * @note This function adds padding to the input tensors only if data_layout == DataLayout::NHWC - */ -void add_padding_y(std::initializer_list tensors, const DataLayout &data_layout = DataLayout::NHWC); - /** For MatMulLowp, given the Lhs/Rhs matrix quantization informations and the matrix multiplication dimensions, * calculate a suitable output quantization for obtaining non-saturated outputs with high probability. */ diff --git a/tests/validation/fixtures/DepthwiseConvolutionLayerFixture.h b/tests/validation/fixtures/DepthwiseConvolutionLayerFixture.h index 5a00c7c2d6..d291a7736a 100644 --- a/tests/validation/fixtures/DepthwiseConvolutionLayerFixture.h +++ b/tests/validation/fixtures/DepthwiseConvolutionLayerFixture.h @@ -342,7 +342,6 @@ public: add_padding_x({ &_src, &_biases, &_target }, _data_layout); add_padding_x({ &_weights }, _data_layout, true); - add_padding_y({ &_src, &_target }, _data_layout); // Create Depthwise Convolution configure function const ConvolutionInfo info -- cgit v1.2.1