aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2020-11-10 16:42:30 +0000
committerGeorgios Pinitas <georgios.pinitas@arm.com>2020-11-11 14:21:06 +0000
commit5f2fb59054aee2ec190d72accdb45f852caf4b87 (patch)
treec787b41d485c1798250a092a567aeb1e40d2defc
parent087ee3d521c1137b0bc611579eb1b94cc7813fb2 (diff)
downloadComputeLibrary-5f2fb59054aee2ec190d72accdb45f852caf4b87.tar.gz
COMPMID-3792: Graph examples crash on bare-metal
Restricts check of empty windows to 1D splits. This avoids out-of-bounds access when the GEMM2D Interleaved kernel is picked where the split dimension specified is MAX_UINT32. Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com> Change-Id: I65f42a0cda7b2f1ae65f29c665c2734fbc825214 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4367 Tested-by: Arm Jenkins <bsgcomp@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Sang-Hoon Park <sang-hoon.park@arm.com>
-rw-r--r--src/runtime/CPP/SingleThreadScheduler.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/runtime/CPP/SingleThreadScheduler.cpp b/src/runtime/CPP/SingleThreadScheduler.cpp
index 6f67bc005f..96265ac757 100644
--- a/src/runtime/CPP/SingleThreadScheduler.cpp
+++ b/src/runtime/CPP/SingleThreadScheduler.cpp
@@ -37,11 +37,15 @@ void SingleThreadScheduler::set_num_threads(unsigned int num_threads)
void SingleThreadScheduler::schedule(ICPPKernel *kernel, const Hints &hints)
{
- const Window &max_window = kernel->window();
- const unsigned int num_iterations = max_window.num_iterations(hints.split_dimension());
- if(num_iterations < 1)
+ const Window &max_window = kernel->window();
+
+ if(hints.split_dimension() != IScheduler::split_dimensions_all)
{
- return;
+ const unsigned int num_iterations = max_window.num_iterations(hints.split_dimension());
+ if(num_iterations < 1)
+ {
+ return;
+ }
}
ThreadInfo info;