diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2020-07-17 12:47:56 +0100 |
---|---|---|
committer | Gian Marco Iodice <gianmarco.iodice@arm.com> | 2020-07-20 07:34:56 +0000 |
commit | 9c82e014260a997fe784affc7e0545972c3511e5 (patch) | |
tree | 404b1ab89ab9b62b9883c182f81b4bf4b53448ad /src/runtime/CL/CLScheduler.cpp | |
parent | ba2cc1aea6bcd16b3ad81b55be18911af83d2113 (diff) | |
download | ComputeLibrary-9c82e014260a997fe784affc7e0545972c3511e5.tar.gz |
COMPMID-3604: Graph failures during tuning
Update ICLTuner interface to account for the new memory injection
interface.
Redirect to appropriate kernel execution interface depending on if the
kernel supports memory injection or not.
Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com>
Change-Id: I8ce29f5c22f1865c9e688d12b65e68ee4486f99c
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3588
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/runtime/CL/CLScheduler.cpp')
-rw-r--r-- | src/runtime/CL/CLScheduler.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/runtime/CL/CLScheduler.cpp b/src/runtime/CL/CLScheduler.cpp index 56f5f212a8..5ef66f456a 100644 --- a/src/runtime/CL/CLScheduler.cpp +++ b/src/runtime/CL/CLScheduler.cpp @@ -157,22 +157,16 @@ void CLScheduler::enqueue_common(ICLKernel &kernel, const InputTensorMap &inputs "The CLScheduler is not initialised yet! Please call the CLScheduler::get().default_init(), \ or CLScheduler::get()::init() and CLKernelLibrary::get()::init() function before running functions!"); + const bool inject_memory = !inputs.empty(); + // Tune the kernel if the CLTuner has been provided if(_cl_tuner != nullptr) { - // Tune the OpenCL kernel - _cl_tuner->tune_kernel_dynamic(kernel); + inject_memory ? _cl_tuner->tune_kernel_dynamic(kernel, inputs, outputs) : _cl_tuner->tune_kernel_dynamic(kernel); } // Run kernel - if(inputs.empty()) - { - kernel.run(kernel.window(), _queue); - } - else - { - kernel.run_op(inputs, outputs, kernel.window(), _queue); - } + inject_memory ? kernel.run_op(inputs, outputs, kernel.window(), _queue) : kernel.run(kernel.window(), _queue); if(flush) { |