blob: 9e517488af48086ed7f836c0f82e2464b40f5dda [file] [log] [blame]
SiCong Lia8d80582023-05-19 14:23:37 +01001/*
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 */
24
25#ifndef ACL_TESTS_DATASETS_SMALLMATMULMMULDATASET
26#define ACL_TESTS_DATASETS_SMALLMATMULMMULDATASET
27
28#include "arm_compute/core/TensorShape.h"
29#include "arm_compute/core/Types.h"
30#include "tests/datasets/MatMulDataset.h"
31
32namespace arm_compute
33{
34namespace test
35{
36namespace datasets
37{
38/** MatMul MMUL shapes are similar to MatMul shapes except that K has to be a multiple of MMUL_K0 which is 4 (e.g. see src/gpu/cl/kernels/ClMatMulNativeMMULKernel.cpp for the definition)
39 */
40class SmallMatMulMMULDataset final : public MatMulDataset
41{
42public:
43 SmallMatMulMMULDataset()
44 {
45 add_config(TensorShape(8U, 4U, 2U, 2U), TensorShape(2U, 8U, 2U, 2U), TensorShape(2U, 4U, 2U, 2U));
46 add_config(TensorShape(28U, 1U), TensorShape(23U, 28U), TensorShape(23U, 1U));
47 add_config(TensorShape(8U, 4U, 2U), TensorShape(16U, 8U, 2U), TensorShape(16U, 4U, 2U));
48 add_config(TensorShape(32U, 2U), TensorShape(17U, 32U), TensorShape(17U, 2U));
49 add_config(TensorShape(8U, 6U), TensorShape(7U, 8U), TensorShape(7U, 6U));
50 }
51};
52
53class TinyMatMulMMULDataset final : public MatMulDataset
54{
55public:
56 TinyMatMulMMULDataset()
57 {
58 add_config(TensorShape(4U, 4U), TensorShape(4U, 4U), TensorShape(4U, 4U));
59 }
60};
61
62} // namespace datasets
63} // namespace test
64} // namespace arm_compute
65
66#endif /* ACL_TESTS_DATASETS_SMALLMATMULMMULDATASET */