aboutsummaryrefslogtreecommitdiff
path: root/tests/datasets
diff options
context:
space:
mode:
authorViet-Hoa Do <viet-hoa.do@arm.com>2023-02-24 15:52:21 +0000
committerViet-Hoa Do <viet-hoa.do@arm.com>2023-03-08 15:09:25 +0000
commit37c989a58a04985dfdc21089c7dacc7e1925a4d0 (patch)
tree6e60ada38ceaf2b651cc44a481004abbb89ceae4 /tests/datasets
parent98aca0fda7f7c7c16bd2d1cf5386246ad796d9de (diff)
downloadComputeLibrary-37c989a58a04985dfdc21089c7dacc7e1925a4d0.tar.gz
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 <viet-hoa.do@arm.com> Resolves: COMPMID-5919 Change-Id: Ic7e2032777aa97ecc147f61d5388528697508ab1 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9199 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Gunes Bayir <gunes.bayir@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'tests/datasets')
-rw-r--r--tests/datasets/GatherDataset.h9
1 files changed, 8 insertions, 1 deletions
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);
}
};