From 0094c023038cbb353f60e96d1301b4bb25c9e382 Mon Sep 17 00:00:00 2001 From: Sang-Hoon Park Date: Wed, 20 Jan 2021 18:16:47 +0000 Subject: Add window parameter to scheduler To support window configured outside of kernels, the parameter is added to scheduler. The existing operators pass window from kernels to preserve the current behavior. Partial Implements: COMPMID-4003 Change-Id: I4514e12fb5b0c60e4adfc1a51e53a8a5de356a0d Signed-off-by: Sang-Hoon Park Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4892 Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins Reviewed-by: Georgios Pinitas --- arm_compute/runtime/IScheduler.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'arm_compute/runtime/IScheduler.h') diff --git a/arm_compute/runtime/IScheduler.h b/arm_compute/runtime/IScheduler.h index 309aee3bb5..d3ba86a67b 100644 --- a/arm_compute/runtime/IScheduler.h +++ b/arm_compute/runtime/IScheduler.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2020 Arm Limited. + * Copyright (c) 2017-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -35,6 +35,7 @@ namespace arm_compute { class ICPPKernel; class ITensor; +class Window; /** Scheduler interface to run kernels */ class IScheduler @@ -168,9 +169,10 @@ public: * * @param[in] kernel Kernel to execute. * @param[in] hints Hints for the scheduler. + * @param[in] window Window to use for kernel execution. * @param[in] tensors Vector containing the tensors to operate on. */ - virtual void schedule_op(ICPPKernel *kernel, const Hints &hints, ITensorPack &tensors) = 0; + virtual void schedule_op(ICPPKernel *kernel, const Hints &hints, const Window &window, ITensorPack &tensors) = 0; /** Execute all the passed workloads * @@ -205,7 +207,14 @@ protected: virtual void run_workloads(std::vector &workloads) = 0; CPUInfo _cpu_info; - void schedule_common(ICPPKernel *kernel, const Hints &hints, ITensorPack &tensors); + /** Common scheduler logic to execute the given kernel + * + * @param[in] kernel Kernel to execute. + * @param[in] hints Hints for the scheduler. + * @param[in] window Window to use for kernel execution. + * @param[in] tensors Vector containing the tensors to operate on. + */ + void schedule_common(ICPPKernel *kernel, const Hints &hints, const Window &window, ITensorPack &tensors); private: unsigned int _num_threads_hint = {}; -- cgit v1.2.1