From 2aad21a900a21f467b3ec6b37420f892f0d80221 Mon Sep 17 00:00:00 2001 From: Michalis Spyrou Date: Thu, 2 Jul 2020 12:43:53 +0100 Subject: COMPMID-3388: Async support to CLReshapeLayerKernel kernels/functions Signed-off-by: Michalis Spyrou Change-Id: I141a943dfd691069317860e852ecdd0ba7391604 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3501 Tested-by: Arm Jenkins Reviewed-by: Georgios Pinitas Comments-Addressed: Arm Jenkins --- arm_compute/runtime/CL/CLScheduler.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'arm_compute/runtime/CL/CLScheduler.h') diff --git a/arm_compute/runtime/CL/CLScheduler.h b/arm_compute/runtime/CL/CLScheduler.h index 573248ebbe..95fdffef34 100644 --- a/arm_compute/runtime/CL/CLScheduler.h +++ b/arm_compute/runtime/CL/CLScheduler.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2019 ARM Limited. + * Copyright (c) 2016-2020 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -29,6 +29,7 @@ #include "arm_compute/core/CL/OpenCL.h" #include "arm_compute/core/Error.h" #include "arm_compute/core/Types.h" +#include "arm_compute/core/experimental/Types.h" #include "arm_compute/runtime/CL/ICLTuner.h" namespace arm_compute @@ -72,6 +73,14 @@ public: * @param[in] flush (Optional) Specifies if the command queue will be flushed after running the kernel. */ void enqueue(ICLKernel &kernel, bool flush = true); + /** Schedule the execution of the passed kernel if possible. + * + * @param[in] kernel Kernel to execute. + * @param[in] inputs Vector containing the input tensors. + * @param[in] outputs Vector containing the output tensors. + * @param[in] flush (Optional) Specifies if the command queue will be flushed after running the kernel. + */ + void enqueue_op(ICLKernel &kernel, const InputTensorMap &inputs, const OutputTensorMap &outputs, bool flush = true); /** Initialises the context and command queue to be used by the scheduler. * @@ -143,6 +152,7 @@ public: bool is_initialised() const; private: + void enqueue_common(ICLKernel &kernel, const InputTensorMap &inputs, const OutputTensorMap &outputs, bool flush); /** Flag to ensure symbols initialisation is happening before Scheduler creation */ static std::once_flag _initialize_symbols; -- cgit v1.2.1