aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichalis Spyrou <michalis.spyrou@arm.com>2020-05-26 11:52:42 +0100
committerMichalis Spyrou <michalis.spyrou@arm.com>2020-05-26 21:48:02 +0000
commit7889291517dd317dcac478e8d8267f2545e58511 (patch)
tree74f06872243d7a9169fb82bd46bfc035c99bcfad
parentc8bdeaacc2f02625b900be7b6ccb26a4b663eead (diff)
downloadComputeLibrary-7889291517dd317dcac478e8d8267f2545e58511.tar.gz
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 <michalis.spyrou@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3260 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
-rw-r--r--src/runtime/CPP/SingleThreadScheduler.cpp10
1 files changed, 8 insertions, 2 deletions
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);