From 6f8b17dedb7b53b550e6210fd1c78c3a3e086271 Mon Sep 17 00:00:00 2001 From: Joseph Dobson Date: Tue, 11 Feb 2020 19:32:11 +0000 Subject: [ONCPUML-7] arm_compute support for ND parallelism Currently 1D ranges of work are specified by the scheduler via two integers, start and end. This limit opportunities for advance parallelism and scheduling This patch expands the interfaces to allow for ND parallism. `GemmCommon::get_window_size` now returns an `NDRange` specifying the work in N-dimensions rather than with the single integer it used prior (1D) Execute now takes an `NDCoordinate` which specifies an `NDRange` with a start position for that work along with an `NDCoordinate` to specify the thread location In addition to expanding the interface to enable this functionality, we have added the capability to SGEMM when the number of threads is high this has the effective of allowing a much greater degree of parallelism where te problem dimension would previously have limited the number of threads. Change-Id: I3e1a8b7276216627bec4ff6f24ac2147552ea9fb Signed-off-by: Joseph Dobson Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/2962 Tested-by: Arm Jenkins Reviewed-by: Gian Marco Iodice Comments-Addressed: Arm Jenkins --- arm_compute/runtime/IScheduler.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'arm_compute/runtime/IScheduler.h') diff --git a/arm_compute/runtime/IScheduler.h b/arm_compute/runtime/IScheduler.h index f68294016a..a5e20ee627 100644 --- a/arm_compute/runtime/IScheduler.h +++ b/arm_compute/runtime/IScheduler.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2019 ARM Limited. + * Copyright (c) 2017-2020 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -27,6 +27,7 @@ #include "arm_compute/core/CPP/CPPTypes.h" #include +#include namespace arm_compute { @@ -42,6 +43,13 @@ public: STATIC, /**< Split the workload evenly among the threads */ DYNAMIC, /**< Split the workload dynamically using a bucket system */ }; + + /** When arm_compute::ISchedular::Hints::_split_dimension is initialized with this value + * then the schedular is free to break down the problem space over as many dimensions + * as it wishes + */ + static constexpr unsigned int split_dimensions_all = std::numeric_limits::max(); + /** Scheduler hints * * Collection of preferences set by the function regarding how to split a given workload -- cgit v1.2.1