blob: 8f6c000d3726efcc850a50ceee66d7b0e5e22bd4 [file] [log] [blame]
Ramy Elgammal2b6ebfe2023-03-09 21:15:37 +00001/*
2 * Copyright (c) 2023 Arm Limited.
3 *
4 * SPDX-License-Identifier: MIT
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to
8 * deal in the Software without restriction, including without limitation the
9 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 * sell copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in all
14 * copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 * SOFTWARE.
23 */
Gunes Bayir8918b232023-03-17 13:52:21 +000024#ifndef ACL_TESTS_DATASETS_LARGEMATMULDATASET
25#define ACL_TESTS_DATASETS_LARGEMATMULDATASET
Ramy Elgammal2b6ebfe2023-03-09 21:15:37 +000026
27#include "arm_compute/core/TensorShape.h"
28#include "arm_compute/core/Types.h"
Gunes Bayir8918b232023-03-17 13:52:21 +000029#include "tests/datasets/MatMulDataset.h"
Ramy Elgammal2b6ebfe2023-03-09 21:15:37 +000030
31namespace arm_compute
32{
33namespace test
34{
35namespace datasets
36{
Gunes Bayir8918b232023-03-17 13:52:21 +000037class LargeMatMulDataset final : public MatMulDataset
Ramy Elgammal2b6ebfe2023-03-09 21:15:37 +000038{
39public:
Gunes Bayir8918b232023-03-17 13:52:21 +000040 LargeMatMulDataset()
Ramy Elgammal2b6ebfe2023-03-09 21:15:37 +000041 {
42 add_config(TensorShape(21U, 13U, 3U, 2U), TensorShape(33U, 21U, 3U, 2U), TensorShape(33U, 13U, 3U, 2U));
43 add_config(TensorShape(38U, 12U, 1U, 5U), TensorShape(21U, 38U, 1U, 5U), TensorShape(21U, 12U, 1U, 5U));
44 add_config(TensorShape(45U, 38U, 3U, 2U), TensorShape(21U, 45U, 3U, 2U), TensorShape(21U, 38U, 3U, 2U));
45 }
46};
47
Gunes Bayir8918b232023-03-17 13:52:21 +000048class HighDimensionalMatMulDataset final : public MatMulDataset
Ramy Elgammal2b6ebfe2023-03-09 21:15:37 +000049{
50public:
Gunes Bayir8918b232023-03-17 13:52:21 +000051 HighDimensionalMatMulDataset()
Ramy Elgammal2b6ebfe2023-03-09 21:15:37 +000052 {
53 add_config(TensorShape(5U, 5U, 2U, 2U, 2U, 2U), TensorShape(5U, 5U, 2U, 2U, 2U, 2U), TensorShape(5U, 5U, 2U, 2U, 2U, 2U)); // 6D tensor
54 }
55};
56
Gunes Bayirbbeef722023-03-20 10:19:10 +000057class LargeMatMulDatasetRhsExportToCLImageRhsNT final : public MatMulDataset
58{
59public:
60 // For shape choices, please refer to the explanations given in SmallMatMulDatasetRhsExportToCLImageRhsNT
61 LargeMatMulDatasetRhsExportToCLImageRhsNT()
62 {
63 add_config(TensorShape(21U, 13U, 3U, 2U), TensorShape(32U, 21U, 3U, 2U), TensorShape(32U, 13U, 3U, 2U));
64 add_config(TensorShape(38U, 12U, 1U, 5U, 2U), TensorShape(20U, 38U, 1U, 5U, 2U), TensorShape(20U, 12U, 1U, 5U, 2U));
65 add_config(TensorShape(45U, 38U, 3U, 2U, 3U), TensorShape(20U, 45U, 3U, 2U, 3U), TensorShape(20U, 38U, 3U, 2U, 3U));
66 }
67};
Ramy Elgammalb531b752023-03-20 10:19:10 +000068class LargeMatMulDatasetRhsExportToCLImageRhsT final : public MatMulDataset
69{
70public:
71 // For shape choices, please refer to the explanations given in SmallMatMulDatasetRhsExportToCLImageRhsT
72 LargeMatMulDatasetRhsExportToCLImageRhsT()
73 {
74 add_config(TensorShape(28U, 13U, 3U, 2U), TensorShape(32U, 28U, 3U, 2U), TensorShape(32U, 13U, 3U, 2U));
75 add_config(TensorShape(40U, 12U, 1U, 5U, 2U), TensorShape(20U, 40U, 1U, 5U, 2U), TensorShape(20U, 12U, 1U, 5U, 2U));
76 add_config(TensorShape(44U, 38U, 3U, 2U, 3U), TensorShape(20U, 44U, 3U, 2U, 3U), TensorShape(20U, 38U, 3U, 2U, 3U));
77 }
78};
Ramy Elgammal2b6ebfe2023-03-09 21:15:37 +000079} // namespace datasets
80} // namespace test
81} // namespace arm_compute
Gunes Bayir8918b232023-03-17 13:52:21 +000082#endif /* ACL_TESTS_DATASETS_LARGEMATMULDATASET */