blob: 466eda00a6f7206ec479eef03bcc584fe48817a7 [file] [log] [blame]
Gian Marco Iodice12f2b8c2020-02-13 12:27:37 +00001/*
Gian Marco Iodice37954912021-04-12 17:34:33 +01002 * Copyright (c) 2020-2021 Arm Limited.
Gian Marco Iodice12f2b8c2020-02-13 12:27:37 +00003 *
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 */
Georgios Pinitas856f66e2021-04-22 21:13:21 +010024#ifndef ARM_COMPUTE_CL_GEMM_DEFAULT_CONFIG_RESHAPED_VALHALL_H
25#define ARM_COMPUTE_CL_GEMM_DEFAULT_CONFIG_RESHAPED_VALHALL_H
Gian Marco Iodice12f2b8c2020-02-13 12:27:37 +000026
Georgios Pinitas7891a732021-08-20 21:39:25 +010027#include "src/gpu/cl/kernels/gemm/IClGemmKernelConfig.h"
Gian Marco Iodice12f2b8c2020-02-13 12:27:37 +000028
29namespace arm_compute
30{
Georgios Pinitas856f66e2021-04-22 21:13:21 +010031namespace opencl
32{
33namespace kernels
34{
35namespace gemm
Gian Marco Iodice12f2b8c2020-02-13 12:27:37 +000036{
37/** Valhall based OpenCL GEMMReshaped configuration */
Georgios Pinitas856f66e2021-04-22 21:13:21 +010038class ClGemmDefaultConfigReshapedValhall final : public IClGemmKernelConfig
Gian Marco Iodice12f2b8c2020-02-13 12:27:37 +000039{
40public:
41 /** Constructor
42 *
43 * @param[in] gpu GPU target
44 */
Georgios Pinitas856f66e2021-04-22 21:13:21 +010045 ClGemmDefaultConfigReshapedValhall(GPUTarget gpu);
Gian Marco Iodice12f2b8c2020-02-13 12:27:37 +000046
47 // Inherited overridden method
48 std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> configure(unsigned int m, unsigned int n, unsigned int k, unsigned int b, DataType data_type) override;
49
50private:
51 std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> configure_G77_f32(unsigned int m, unsigned int n, unsigned int k, unsigned int b);
52 std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> configure_G77_f16(unsigned int m, unsigned int n, unsigned int k, unsigned int b);
Gian Marco Iodice37954912021-04-12 17:34:33 +010053 std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> configure_G78_f32(unsigned int m, unsigned int n, unsigned int k, unsigned int b);
54 std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> configure_G78_f16(unsigned int m, unsigned int n, unsigned int k, unsigned int b);
Gian Marco Iodice12f2b8c2020-02-13 12:27:37 +000055 std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> configure_G77_u8(unsigned int m, unsigned int n, unsigned int k, unsigned int b);
56};
Georgios Pinitas856f66e2021-04-22 21:13:21 +010057} // namespace gemm
58} // namespace kernels
59} // namespace opencl
Gian Marco Iodice12f2b8c2020-02-13 12:27:37 +000060} // namespace arm_compute
Georgios Pinitas856f66e2021-04-22 21:13:21 +010061#endif /* ARM_COMPUTE_CL_GEMM_DEFAULT_CONFIG_RESHAPED_VALHALL_H */