aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/CL/CLScheduler.cpp
diff options
context:
space:
mode:
authorMichalis Spyrou <michalis.spyrou@arm.com>2020-07-02 12:43:53 +0100
committerGeorgios Pinitas <georgios.pinitas@arm.com>2020-07-03 17:15:00 +0000
commit2aad21a900a21f467b3ec6b37420f892f0d80221 (patch)
tree7973bbf13d2bc7ea88ab0bf9d7c51e6b2d3e6907 /src/runtime/CL/CLScheduler.cpp
parentd13931d05b0d5ccea4265c342c6a3bf40a3b85cc (diff)
downloadComputeLibrary-2aad21a900a21f467b3ec6b37420f892f0d80221.tar.gz
COMPMID-3388: Async support to CLReshapeLayerKernel kernels/functions
Signed-off-by: Michalis Spyrou <michalis.spyrou@arm.com> Change-Id: I141a943dfd691069317860e852ecdd0ba7391604 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3501 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/runtime/CL/CLScheduler.cpp')
-rw-r--r--src/runtime/CL/CLScheduler.cpp23
1 files changed, 20 insertions, 3 deletions
diff --git a/src/runtime/CL/CLScheduler.cpp b/src/runtime/CL/CLScheduler.cpp
index e78eaa482f..2c1024fcc7 100644
--- a/src/runtime/CL/CLScheduler.cpp
+++ b/src/runtime/CL/CLScheduler.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2019 ARM Limited.
+ * Copyright (c) 2016-2020 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -151,7 +151,7 @@ void CLScheduler::init(cl::Context context, cl::CommandQueue queue, const cl::De
_cl_tuner = cl_tuner;
}
-void CLScheduler::enqueue(ICLKernel &kernel, bool flush)
+void CLScheduler::enqueue_common(ICLKernel &kernel, const InputTensorMap &inputs, const OutputTensorMap &outputs, bool flush)
{
ARM_COMPUTE_ERROR_ON_MSG(!_is_initialised,
"The CLScheduler is not initialised yet! Please call the CLScheduler::get().default_init(), \
@@ -165,11 +165,28 @@ void CLScheduler::enqueue(ICLKernel &kernel, bool flush)
}
// Run kernel
- kernel.run(kernel.window(), _queue);
+ if(inputs.empty())
+ {
+ kernel.run(kernel.window(), _queue);
+ }
+ else
+ {
+ kernel.run_op(inputs, outputs, kernel.window(), _queue);
+ }
if(flush)
{
_queue.flush();
}
}
+
+void CLScheduler::enqueue(ICLKernel &kernel, bool flush)
+{
+ enqueue_common(kernel, {}, {}, flush);
+}
+
+void CLScheduler::enqueue_op(ICLKernel &kernel, const InputTensorMap &inputs, const OutputTensorMap &outputs, bool flush)
+{
+ enqueue_common(kernel, inputs, outputs, flush);
+}
} // namespace arm_compute