diff options
author | Adnan AlSinan <adnan.alsinan@arm.com> | 2023-09-18 14:49:45 +0100 |
---|---|---|
committer | Adnan AlSinan <adnan.alsinan@arm.com> | 2023-09-27 15:13:29 +0000 |
commit | bdcb4c148ee2fdeaaddf4cf1e57bbb0de02bb894 (patch) | |
tree | ee9743ddfe42b800bbc54dc3c273c188cb779017 /tests/validation/reference/DFT.cpp | |
parent | 729099c5d134c2c34459a2bdbd5453ad4ca68cac (diff) | |
download | ComputeLibrary-bdcb4c148ee2fdeaaddf4cf1e57bbb0de02bb894.tar.gz |
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 <adnan.alsinan@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10335
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: SiCong Li <sicong.li@arm.com>
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'tests/validation/reference/DFT.cpp')
-rw-r--r-- | tests/validation/reference/DFT.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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<T> conv2d_dft(const SimpleTensor<T> &src, const SimpleTensor<T> &w, auto padded_src = pad_layer(src, padding_in); // Flip weights - std::vector<uint32_t> axis_v = { 0, 1 }; - SimpleTensor<uint32_t> axis{ TensorShape(2U), DataType::U32 }; + std::vector<uint32_t> axis_v = { 0, 1 }; + SimpleTensor<int32_t> 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 } }; |