From 7889291517dd317dcac478e8d8267f2545e58511 Mon Sep 17 00:00:00 2001 From: Michalis Spyrou Date: Tue, 26 May 2020 11:52:42 +0100 Subject: COMPMID-3069: Add return statement in ST scheduler If there is no workload simply return and don't try to run the kernel when using the ST scheduler. Change-Id: I85575167b9cbd4cdc8d7849a581aada9e8a1c180 Signed-off-by: Michalis Spyrou Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3260 Tested-by: Arm Jenkins Reviewed-by: Michele Di Giorgio --- src/runtime/CPP/SingleThreadScheduler.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/runtime/CPP/SingleThreadScheduler.cpp') diff --git a/src/runtime/CPP/SingleThreadScheduler.cpp b/src/runtime/CPP/SingleThreadScheduler.cpp index 152569fb67..660a79652c 100644 --- a/src/runtime/CPP/SingleThreadScheduler.cpp +++ b/src/runtime/CPP/SingleThreadScheduler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2019 ARM Limited. + * Copyright (c) 2017-2020 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -37,7 +37,13 @@ void SingleThreadScheduler::set_num_threads(unsigned int num_threads) void SingleThreadScheduler::schedule(ICPPKernel *kernel, const Hints &hints) { - ARM_COMPUTE_UNUSED(hints); + const Window &max_window = kernel->window(); + const unsigned int num_iterations = max_window.num_iterations(hints.split_dimension()); + if(num_iterations < 1) + { + return; + } + ThreadInfo info; info.cpu_info = &_cpu_info; kernel->run(kernel->window(), info); -- cgit v1.2.1