From fa79fda2c797282de3589aaa69b06e065e8a21e0 Mon Sep 17 00:00:00 2001 From: Mohammed Suhail Munshi Date: Tue, 20 Sep 2022 11:49:23 +0100 Subject: =?UTF-8?q?Optimize=20Neon=E2=84=A2=20Logistic=20Activation=20-=20?= =?UTF-8?q?Use=20a=201d=20execution=20window=20to=20improve=20memory=20acc?= =?UTF-8?q?ess=20pattern.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolves: [COMPMID-5465] Signed-off-by: Mohammed Suhail Munshi Change-Id: Ida30669ffa06eb002ca43a6edf15e25a6eaad2f6 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/8344 Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins Reviewed-by: Gunes Bayir Benchmark: Arm Jenkins --- src/cpu/operators/CpuActivation.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/cpu/operators/CpuActivation.cpp') diff --git a/src/cpu/operators/CpuActivation.cpp b/src/cpu/operators/CpuActivation.cpp index 3945fa59a5..197e9850b9 100644 --- a/src/cpu/operators/CpuActivation.cpp +++ b/src/cpu/operators/CpuActivation.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Arm Limited. + * Copyright (c) 2021-2022 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -23,6 +23,7 @@ */ #include "src/cpu/operators/CpuActivation.h" +#include "arm_compute/runtime/NEON/NEScheduler.h" #include "src/common/IOperator.h" #include "src/common/utils/LegacySupport.h" #include "src/common/utils/Log.h" @@ -46,6 +47,13 @@ Status CpuActivation::validate(const ITensorInfo *input, const ITensorInfo *outp return kernels::CpuActivationKernel::validate(input, output, activation_info); } +void CpuActivation::run(ITensorPack &tensors) +{ + ARM_COMPUTE_ERROR_ON_MSG(tensors.empty(), "No inputs provided"); + auto split_dimension = static_cast(_kernel.get())->get_split_dimension_hint(); + NEScheduler::get().schedule_op(_kernel.get(), split_dimension, _kernel->window(), tensors); +} + std::tuple CpuContext::create_activation(const AclTensorDescriptor &src, const AclTensorDescriptor &dst, const AclActivationDescriptor &act, bool is_validate) { TensorInfo src_info = detail::convert_to_legacy_tensor_info(src); -- cgit v1.2.1