From 37c989a58a04985dfdc21089c7dacc7e1925a4d0 Mon Sep 17 00:00:00 2001 From: Viet-Hoa Do Date: Fri, 24 Feb 2023 15:52:21 +0000 Subject: Add support for arbitrary parameters for CPU Gather * The shape of input and indices tensors, and the gather axis can be any number, as long as these are valid and the output tensor doesn't have more dimensions than the library supports. * Update the reference code to be more generic and straightforward. * Add necessary test cases. Signed-off-by: Viet-Hoa Do Resolves: COMPMID-5919 Change-Id: Ic7e2032777aa97ecc147f61d5388528697508ab1 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9199 Tested-by: Arm Jenkins Reviewed-by: Gunes Bayir Comments-Addressed: Arm Jenkins Benchmark: Arm Jenkins --- tests/datasets/GatherDataset.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'tests/datasets') diff --git a/tests/datasets/GatherDataset.h b/tests/datasets/GatherDataset.h index 8fec5441b1..487ce19bc7 100644 --- a/tests/datasets/GatherDataset.h +++ b/tests/datasets/GatherDataset.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019, 2022 Arm Limited. + * Copyright (c) 2018-2019, 2022-2023 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -116,6 +116,13 @@ public: add_config(TensorShape(15U, 15U), TensorShape(2U, 11U), 1); add_config(TensorShape(5U, 3U, 4U), TensorShape(2U, 7U), 1); add_config(TensorShape(1U, 5U, 3U), TensorShape(1U, 7U, 3U), 1); + + add_config(TensorShape(3U, 5U), TensorShape(2U, 3U), 0); + add_config(TensorShape(9U), TensorShape(3U, 2U, 4U), 0); + add_config(TensorShape(5U, 3U, 4U), TensorShape(5U, 6U), 0); + + add_config(TensorShape(7U, 4U, 5U), TensorShape(2U, 3U), 2); + add_config(TensorShape(8U, 2U, 3U), TensorShape(4U, 2U, 5U), 2); } }; -- cgit v1.2.1