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>
diff --git a/src/runtime/CPP/SingleThreadScheduler.cpp b/src/runtime/CPP/SingleThreadScheduler.cpp
index 6f67bc0..96265ac 100644
--- a/src/runtime/CPP/SingleThreadScheduler.cpp
+++ b/src/runtime/CPP/SingleThreadScheduler.cpp
@@ -37,11 +37,15 @@
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;