diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2019-01-09 18:35:17 +0000 |
---|---|---|
committer | Georgios Pinitas <georgios.pinitas@arm.com> | 2019-01-18 13:41:40 +0000 |
commit | 7cd26d4a1b14bc4bf7c61496803416ab3d84791f (patch) | |
tree | 12cc4a27d7ecebc69a43e96b1f46c7eb05437978 /src/core/NEON/kernels/arm_gemm/gemm_int16.cpp | |
parent | 3ac2f3a1d9297220d1b0ce920dd13fdd4edcc187 (diff) | |
download | ComputeLibrary-7cd26d4a1b14bc4bf7c61496803416ab3d84791f.tar.gz |
COMPMID-1867: Add NEON/SVE GEMM Hybrid kernels.
Change-Id: Ib40a9921e7f9a6a8be6c38872d6b3a0f24ed0cd3
Reviewed-on: https://review.mlplatform.org/515
Reviewed-by: Anthony Barbier <Anthony.barbier@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/core/NEON/kernels/arm_gemm/gemm_int16.cpp')
-rw-r--r-- | src/core/NEON/kernels/arm_gemm/gemm_int16.cpp | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/src/core/NEON/kernels/arm_gemm/gemm_int16.cpp b/src/core/NEON/kernels/arm_gemm/gemm_int16.cpp index ad171a7f9a..b4503dd6a2 100644 --- a/src/core/NEON/kernels/arm_gemm/gemm_int16.cpp +++ b/src/core/NEON/kernels/arm_gemm/gemm_int16.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -32,30 +32,33 @@ namespace arm_gemm { -class GemmImpl_gemm_s16_interleaved : public GemmImplementation<int16_t, int32_t> { -public: - UniqueGemmCommon<int16_t, int32_t> instantiate(const GemmArgs<int32_t> &args) override { - return UniqueGemmCommon<int16_t, int32_t>(new GemmInterleaved<gemm_s16_12x8, int16_t, int32_t>(args)); - } - - GemmImpl_gemm_s16_interleaved() : GemmImplementation<int16_t, int32_t>(GemmMethod::GEMM_INTERLEAVED) { } -}; - -static GemmImpl_gemm_s16_interleaved gemm_s16_interleaved_impl{}; - -static std::vector<GemmImplementation<int16_t, int32_t> *> gemm_s16_methods = { - &gemm_s16_interleaved_impl +static const GemmImplementation<int16_t, int32_t> gemm_s16_methods[] = { +{ + GemmMethod::GEMM_INTERLEAVED, + "gemm_s16_12x8", + nullptr, + nullptr, + [](const GemmArgs<int32_t> &args) { return new GemmInterleaved<gemm_s16_12x8, int16_t, int32_t>(args); } +}, +{ + GemmMethod::DEFAULT, + "", + nullptr, + nullptr, + nullptr +} }; template<> -std::vector<GemmImplementation<int16_t, int32_t> *> &gemm_implementation_list<int16_t, int32_t>() { +const GemmImplementation<int16_t, int32_t> *gemm_implementation_list<int16_t, int32_t>() { return gemm_s16_methods; } /* Explicitly instantiate the external functions for these types. */ -template UniqueGemmCommon<int16_t, int32_t> gemm<int16_t, int32_t>(GemmArgs<int32_t> &args, GemmConfig *cfg); -template GemmMethod get_gemm_method<int16_t, int32_t>(GemmArgs<int32_t> &args); -template bool method_is_compatible<int16_t, int32_t>(GemmMethod method, GemmArgs<int32_t> &args); +template UniqueGemmCommon<int16_t, int32_t> gemm<int16_t, int32_t>(const GemmArgs<int32_t> &args); +template KernelDescription get_gemm_method<int16_t, int32_t>(const GemmArgs<int32_t> &args); +template bool method_is_compatible<int16_t, int32_t>(GemmMethod method, const GemmArgs<int32_t> &args); +template std::vector<std::string> get_compatible_kernels<int16_t, int32_t> (const GemmArgs<int32_t> &args); } // namespace arm_gemm |