From 7cd26d4a1b14bc4bf7c61496803416ab3d84791f Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Wed, 9 Jan 2019 18:35:17 +0000 Subject: COMPMID-1867: Add NEON/SVE GEMM Hybrid kernels. Change-Id: Ib40a9921e7f9a6a8be6c38872d6b3a0f24ed0cd3 Reviewed-on: https://review.mlplatform.org/515 Reviewed-by: Anthony Barbier Tested-by: Arm Jenkins --- src/core/NEON/kernels/arm_gemm/gemm_int16.cpp | 39 ++++++++++++++------------- 1 file changed, 21 insertions(+), 18 deletions(-) (limited to 'src/core/NEON/kernels/arm_gemm/gemm_int16.cpp') 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 { -public: - UniqueGemmCommon instantiate(const GemmArgs &args) override { - return UniqueGemmCommon(new GemmInterleaved(args)); - } - - GemmImpl_gemm_s16_interleaved() : GemmImplementation(GemmMethod::GEMM_INTERLEAVED) { } -}; - -static GemmImpl_gemm_s16_interleaved gemm_s16_interleaved_impl{}; - -static std::vector *> gemm_s16_methods = { - &gemm_s16_interleaved_impl +static const GemmImplementation gemm_s16_methods[] = { +{ + GemmMethod::GEMM_INTERLEAVED, + "gemm_s16_12x8", + nullptr, + nullptr, + [](const GemmArgs &args) { return new GemmInterleaved(args); } +}, +{ + GemmMethod::DEFAULT, + "", + nullptr, + nullptr, + nullptr +} }; template<> -std::vector *> &gemm_implementation_list() { +const GemmImplementation *gemm_implementation_list() { return gemm_s16_methods; } /* Explicitly instantiate the external functions for these types. */ -template UniqueGemmCommon gemm(GemmArgs &args, GemmConfig *cfg); -template GemmMethod get_gemm_method(GemmArgs &args); -template bool method_is_compatible(GemmMethod method, GemmArgs &args); +template UniqueGemmCommon gemm(const GemmArgs &args); +template KernelDescription get_gemm_method(const GemmArgs &args); +template bool method_is_compatible(GemmMethod method, const GemmArgs &args); +template std::vector get_compatible_kernels (const GemmArgs &args); } // namespace arm_gemm -- cgit v1.2.1