From 5ae8d804d67f57fbfa793800ddcc21a5aff954dd Mon Sep 17 00:00:00 2001 From: Giorgio Arena Date: Thu, 18 Nov 2021 18:02:13 +0000 Subject: Enable kernel selection testing (Phase #1) Change-Id: I1d65fb9d3a7583cf8d4163ca7c0fbee27dc52633 Signed-off-by: Yair Schwarzbaum Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/6767 Reviewed-by: Giorgio Arena Tested-by: Arm Jenkins Comments-Addressed: Arm Jenkins --- src/cpu/kernels/CpuActivationKernel.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'src/cpu/kernels/CpuActivationKernel.h') diff --git a/src/cpu/kernels/CpuActivationKernel.h b/src/cpu/kernels/CpuActivationKernel.h index 8e78d86016..ac974850aa 100644 --- a/src/cpu/kernels/CpuActivationKernel.h +++ b/src/cpu/kernels/CpuActivationKernel.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2021 Arm Limited. + * Copyright (c) 2017-2022 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -34,8 +34,11 @@ namespace cpu namespace kernels { /** Interface for the activation kernel */ -class CpuActivationKernel : public ICpuKernel +class CpuActivationKernel : public NewICpuKernel { +private: + using ActivationKernelPtr = std::add_pointer::type; + public: CpuActivationKernel() = default; ARM_COMPUTE_DISALLOW_COPY_ALLOW_MOVE(CpuActivationKernel); @@ -70,8 +73,14 @@ public: void run_op(ITensorPack &tensors, const Window &window, const ThreadInfo &info) override; const char *name() const override; -private: - using ActivationKernelPtr = std::add_pointer::type; + struct ActivationKernel + { + const char *name; + const DataTypeISASelectorPtr is_selected; + ActivationKernelPtr ukernel; + }; + + static const std::vector &get_available_kernels(); private: ActivationLayerInfo _act_info{}; -- cgit v1.2.1