From 48b3ef89de5f21a0169d8416e3d54081f82c7bf8 Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Mon, 14 Oct 2019 19:03:09 +0100 Subject: COMPMID-2577: Fuse bias addition and activation in gemm assembly kernels Change-Id: I7f52112d2d05b1ea3d3f3d4b19b8eafab05d6c44 Signed-off-by: Georgios Pinitas Reviewed-on: https://review.mlplatform.org/c/2141 Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins Reviewed-by: Pablo Marquez --- .../NEON/kernels/arm_gemm/gemm_implementation.hpp | 40 +++++++++++----------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'src/core/NEON/kernels/arm_gemm/gemm_implementation.hpp') diff --git a/src/core/NEON/kernels/arm_gemm/gemm_implementation.hpp b/src/core/NEON/kernels/arm_gemm/gemm_implementation.hpp index 55d72f88cb..569d1f44ca 100644 --- a/src/core/NEON/kernels/arm_gemm/gemm_implementation.hpp +++ b/src/core/NEON/kernels/arm_gemm/gemm_implementation.hpp @@ -34,13 +34,13 @@ namespace arm_gemm { */ template struct GemmImplementation { - const GemmMethod method; - const char * name; - std::function &, const OutputStage &)> is_supported; - std::function &, const OutputStage &)> is_recommended; - std::function *(const GemmArgs &, const OutputStage &)> instantiate; + const GemmMethod method; + const char * name; + std::function is_supported; + std::function is_recommended; + std::function *(const GemmArgs &, const OutputStage &)> instantiate; - bool do_is_supported(const GemmArgs &args, const OutputStage &os) const { + bool do_is_supported(const GemmArgs &args, const OutputStage &os) const { if (is_supported != nullptr) { return is_supported(args, os); } else { @@ -48,7 +48,7 @@ struct GemmImplementation { } } - bool do_is_recommended(const GemmArgs &args, const OutputStage &os) const { + bool do_is_recommended(const GemmArgs &args, const OutputStage &os) const { if (is_recommended != nullptr) { return is_recommended(args, os); } else { @@ -56,7 +56,7 @@ struct GemmImplementation { } } - GemmCommon *do_instantiate(const GemmArgs &args, const OutputStage &os) const { + GemmCommon *do_instantiate(const GemmArgs &args, const OutputStage &os) const { return instantiate(args, os); } }; @@ -66,13 +66,13 @@ struct GemmImplementation { * unnecessary second argument. */ template struct GemmImplementation { - const GemmMethod method; - const char * name; - std::function &)> is_supported; - std::function &)> is_recommended; - std::function *(const GemmArgs &)> instantiate; + const GemmMethod method; + const char * name; + std::function is_supported; + std::function is_recommended; + std::function *(const GemmArgs &)> instantiate; - bool do_is_supported(const GemmArgs &args, const Nothing &) const { + bool do_is_supported(const GemmArgs &args, const Nothing &) const { if (is_supported != nullptr) { return is_supported(args); } else { @@ -80,7 +80,7 @@ struct GemmImplementation { } } - bool do_is_recommended(const GemmArgs &args, const Nothing &) const { + bool do_is_recommended(const GemmArgs &args, const Nothing &) const { if (is_recommended != nullptr) { return is_recommended(args); } else { @@ -88,7 +88,7 @@ struct GemmImplementation { } } - GemmCommon *do_instantiate(const GemmArgs &args, const Nothing &) const { + GemmCommon *do_instantiate(const GemmArgs &args, const Nothing &) const { return instantiate(args); } }; @@ -116,7 +116,7 @@ const GemmImplementation *gemm_implementation_list(); * reference. */ template -bool find_implementation(const GemmArgs &args, const OutputStage &os, const GemmImplementation * &impl) { +bool find_implementation(const GemmArgs &args, const OutputStage &os, const GemmImplementation * &impl) { auto gemms = gemm_implementation_list(); const GemmConfig *cfg = args._cfg; @@ -168,7 +168,7 @@ bool find_implementation(const GemmArgs &args, const OutputStage &os, cons } template -std::vector get_compatible_kernels(const GemmArgs &args, const OutputStage &os) { +std::vector get_compatible_kernels(const GemmArgs &args, const OutputStage &os) { std::vector res; /* Find out what the default implementation in so we can set the flag accordingly later. */ @@ -190,7 +190,7 @@ std::vector get_compatible_kernels(const GemmArgs &args } template -UniqueGemmCommon gemm(const GemmArgs &args, const OutputStage &os) { +UniqueGemmCommon gemm(const GemmArgs &args, const OutputStage &os) { const GemmImplementation *impl; if (find_implementation(args, os, impl)) { @@ -201,7 +201,7 @@ UniqueGemmCommon gemm(const GemmArgs &args, const OutputStage & } template -KernelDescription get_gemm_method(const GemmArgs &args, const OutputStage &os) { +KernelDescription get_gemm_method(const GemmArgs &args, const OutputStage &os) { const GemmImplementation *impl; if (find_implementation(args, os, impl)) { -- cgit v1.2.1