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 --- src/runtime/OMP/OMPScheduler.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/runtime/OMP/OMPScheduler.cpp') diff --git a/src/runtime/OMP/OMPScheduler.cpp b/src/runtime/OMP/OMPScheduler.cpp index bf34b0114b..a8bd5a0d60 100644 --- a/src/runtime/OMP/OMPScheduler.cpp +++ b/src/runtime/OMP/OMPScheduler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2020 Arm Limited. + * Copyright (c) 2017-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -51,16 +51,16 @@ void OMPScheduler::set_num_threads(unsigned int num_threads) void OMPScheduler::schedule(ICPPKernel *kernel, const Hints &hints) { ITensorPack tensors; - schedule_common(kernel, hints, tensors); + schedule_common(kernel, hints, kernel->window(), tensors); } -void OMPScheduler::schedule_op(ICPPKernel *kernel, const Hints &hints, ITensorPack &tensors) +void OMPScheduler::schedule_op(ICPPKernel *kernel, const Hints &hints, const Window &window, ITensorPack &tensors) { ARM_COMPUTE_ERROR_ON_MSG(!kernel, "The child class didn't set the kernel"); ARM_COMPUTE_ERROR_ON_MSG(hints.strategy() == StrategyHint::DYNAMIC, "Dynamic scheduling is not supported in OMPScheduler"); - const Window &max_window = kernel->window(); + const Window &max_window = window; const unsigned int num_iterations = max_window.num_iterations(hints.split_dimension()); const unsigned int num_threads = std::min(num_iterations, _num_threads); -- cgit v1.2.1