aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/runtime/CL/CLScheduler.h
diff options
context:
space:
mode:
authorGiorgio Arena <giorgio.arena@arm.com>2022-03-03 10:09:01 +0000
committerGiorgio Arena <giorgio.arena@arm.com>2022-03-08 10:41:03 +0000
commit232c45253a84c16fc70eae6406cac5f4048efaca (patch)
tree32aa46ed0cb2bdc9877709d0573f45778894fefe /arm_compute/runtime/CL/CLScheduler.h
parent4cbcb840caca1346de5f2271b67e4ede17b72734 (diff)
downloadComputeLibrary-232c45253a84c16fc70eae6406cac5f4048efaca.tar.gz
Merge kernel prototype patch
Resolves: COMPMID-5151 Signed-off-by: Giorgio Arena <giorgio.arena@arm.com> Change-Id: Ic4024d5cd4819fe917a1d49621f1866ae2e90a37 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/7260 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: SiCong Li <sicong.li@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/runtime/CL/CLScheduler.h')
-rw-r--r--arm_compute/runtime/CL/CLScheduler.h36
1 files changed, 35 insertions, 1 deletions
diff --git a/arm_compute/runtime/CL/CLScheduler.h b/arm_compute/runtime/CL/CLScheduler.h
index 37d9e2ad05..7ad59782e7 100644
--- a/arm_compute/runtime/CL/CLScheduler.h
+++ b/arm_compute/runtime/CL/CLScheduler.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2021 Arm Limited.
+ * Copyright (c) 2016-2022 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -35,6 +35,20 @@
#include "arm_compute/runtime/CL/CLTypes.h"
#include "arm_compute/runtime/CL/ICLTuner.h"
+#if defined(ENABLE_EXPERIMENTAL_DYNAMIC_FUSION)
+namespace arm_compute
+{
+namespace experimental
+{
+namespace dynamic_fusion
+{
+struct TensorBinding;
+struct ClExecutionDescriptor;
+} // namespace dynamic_fusion
+} // namespace experimental
+} // namespace arm_compute
+#endif // defined(ENABLE_EXPERIMENTAL_DYNAMIC_FUSION)
+
namespace arm_compute
{
class ICLKernel;
@@ -87,6 +101,21 @@ public:
*/
void enqueue_op(ICLKernel &kernel, ITensorPack &tensors, bool flush = true);
+#if defined(ENABLE_EXPERIMENTAL_DYNAMIC_FUSION)
+
+ /** Schedule the execution of the passed kernel if possible.
+ * Use TensorBinding instead of ITensorPack for working with dynamic fusion
+ * @note Does not support dynamic tuning yet
+ *
+ * @param[in] kernel Kernel to execute.
+ * @param[in] tensors Map containing the tensors to operate on.
+ * @param[in] exec_desc Execution descriptor
+ * @param[in] flush (Optional) Specifies if the command queue will be flushed after running the kernel. This will be ignored if job chaining is enabled.
+ */
+ void enqueue_op(ICLKernel &kernel, experimental::dynamic_fusion::TensorBinding &tensors, const experimental::dynamic_fusion::ClExecutionDescriptor &exec_desc, bool flush = true);
+
+#endif // defined(ENABLE_EXPERIMENTAL_DYNAMIC_FUSION)
+
/** Initialises the context and command queue to be used by the scheduler.
*
* @param[in] context A CL context.
@@ -173,6 +202,11 @@ public:
private:
void enqueue_common(ICLKernel &kernel, ITensorPack &tensors, bool flush);
+
+#if defined(ENABLE_EXPERIMENTAL_DYNAMIC_FUSION)
+ void enqueue_common(ICLKernel &kernel, experimental::dynamic_fusion::TensorBinding &tensors, const experimental::dynamic_fusion::ClExecutionDescriptor &exec_desc, bool flush);
+#endif // defined(ENABLE_EXPERIMENTAL_DYNAMIC_FUSION)
+
/** Flag to ensure symbols initialisation is happening before Scheduler creation */
static std::once_flag _initialize_symbols;