blob: aa6ecc29199ff36e09003fcd244209eabf4ca15b [file] [log] [blame]
Pablo Telloeb82fd22018-02-23 13:43:50 +00001/*
Michael Tyler74921ee2023-04-12 17:43:17 +01002 * Copyright (c) 2017-2020, 2022-2023 Arm Limited.
Pablo Telloeb82fd22018-02-23 13:43:50 +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 */
24#ifdef __aarch64__
25
26#include "arm_gemm.hpp"
27#include "gemm_common.hpp"
David Manselle39334c2018-07-06 17:53:35 +010028#include "gemm_implementation.hpp"
Pablo Telloeb82fd22018-02-23 13:43:50 +000029#include "gemm_interleaved.hpp"
30
Georgios Pinitasc0b6f762020-11-02 01:37:17 +000031#include "kernels/a64_gemm_s16_8x12.hpp"
Pablo Telloeb82fd22018-02-23 13:43:50 +000032
Anthony Barbier5f707732018-07-03 16:22:02 +010033namespace arm_gemm {
34
Georgios Pinitas7cd26d42019-01-09 18:35:17 +000035static const GemmImplementation<int16_t, int32_t> gemm_s16_methods[] = {
36{
37 GemmMethod::GEMM_INTERLEAVED,
Georgios Pinitasc0b6f762020-11-02 01:37:17 +000038 "a64_gemm_s16_8x12",
Georgios Pinitas7cd26d42019-01-09 18:35:17 +000039 nullptr,
40 nullptr,
Georgios Pinitasc0b6f762020-11-02 01:37:17 +000041 [](const GemmArgs &args) { return new GemmInterleaved<cls_a64_gemm_s16_8x12, int16_t, int32_t>(args); }
Georgios Pinitas7cd26d42019-01-09 18:35:17 +000042},
43{
44 GemmMethod::DEFAULT,
45 "",
46 nullptr,
47 nullptr,
48 nullptr
49}
David Manselle39334c2018-07-06 17:53:35 +010050};
51
Anthony Barbier5f707732018-07-03 16:22:02 +010052template<>
Georgios Pinitas7cd26d42019-01-09 18:35:17 +000053const GemmImplementation<int16_t, int32_t> *gemm_implementation_list<int16_t, int32_t>() {
David Manselle39334c2018-07-06 17:53:35 +010054 return gemm_s16_methods;
Pablo Telloeb82fd22018-02-23 13:43:50 +000055}
56
David Manselle39334c2018-07-06 17:53:35 +010057/* Explicitly instantiate the external functions for these types. */
Georgios Pinitas48b3ef82019-10-14 19:03:09 +010058template UniqueGemmCommon<int16_t, int32_t> gemm<int16_t, int32_t, Nothing>(const GemmArgs &args, const Nothing &);
Francesco Petrogalli553f6952022-06-30 10:22:01 +000059template bool has_opt_gemm<int16_t, int32_t, Nothing>(WeightFormat &weight_format, const GemmArgs &args, const Nothing &);
Michael Tyler74921ee2023-04-12 17:43:17 +010060template KernelDescription get_gemm_method<int16_t, int32_t, Nothing>(const GemmArgs &args, const Nothing &);
Georgios Pinitas48b3ef82019-10-14 19:03:09 +010061template std::vector<KernelDescription> get_compatible_kernels<int16_t, int32_t, Nothing> (const GemmArgs &args, const Nothing &);
David Manselle39334c2018-07-06 17:53:35 +010062
Pablo Telloeb82fd22018-02-23 13:43:50 +000063} // namespace arm_gemm
64
Georgios Pinitascfa2bba2019-06-27 17:00:52 +010065#endif // __aarch64__