From bdcb4c148ee2fdeaaddf4cf1e57bbb0de02bb894 Mon Sep 17 00:00:00 2001 From: Adnan AlSinan Date: Mon, 18 Sep 2023 14:49:45 +0100 Subject: Implement tflite compliant reverse for CPU - Add support for negative axis values. - Add option to use opposite ACL convention for dimension addressing. - Add validation tests for the mentioned additions. Resolves COMPMID-6497 Change-Id: I9174b201c3adc070766cc6cffcbe4ec1fe5ec1c3 Signed-off-by: Adnan AlSinan Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10335 Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins Reviewed-by: SiCong Li Benchmark: Arm Jenkins --- tests/validation/reference/DFT.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/validation/reference/DFT.cpp') diff --git a/tests/validation/reference/DFT.cpp b/tests/validation/reference/DFT.cpp index fd126c7d73..2b03c270ac 100644 --- a/tests/validation/reference/DFT.cpp +++ b/tests/validation/reference/DFT.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2020 Arm Limited. + * Copyright (c) 2019-2020, 2023 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -400,10 +400,10 @@ SimpleTensor conv2d_dft(const SimpleTensor &src, const SimpleTensor &w, auto padded_src = pad_layer(src, padding_in); // Flip weights - std::vector axis_v = { 0, 1 }; - SimpleTensor axis{ TensorShape(2U), DataType::U32 }; + std::vector axis_v = { 0, 1 }; + SimpleTensor axis{ TensorShape(2U), DataType::S32 }; std::copy(axis_v.begin(), axis_v.begin() + axis.shape().x(), axis.data()); - auto flipped_w = reverse(w, axis); + auto flipped_w = reverse(w, axis, /* use_inverted_axis */ false); // Pad weights to have the same size as input const PaddingList paddings_w = { { 0, src.shape()[0] - 1 }, { 0, src.shape()[1] - 1 } }; -- cgit v1.2.1