| 189 | } |
| 190 | |
| 191 | void CLScheduler::enqueue_common(ICLKernel &kernel, ITensorPack &tensors, bool flush) |
| 192 | { |
| 193 | ARM_COMPUTE_TRACE_EVENT_BEGIN(ARM_COMPUTE_PROF_CAT_SCHEDULER, ARM_COMPUTE_PROF_LVL_GPU, |
| 194 | "CLScheduler::enqueue_common"); |
| 195 | ARM_COMPUTE_ERROR_ON_MSG( |
| 196 | !_is_initialised, "The CLScheduler is not initialised yet! Please call the CLScheduler::get().default_init(), \ |
| 197 | or CLScheduler::get()::init() and CLKernelLibrary::get()::init() function before running functions!"); |
| 198 | |
| 199 | const bool inject_memory = !tensors.empty(); |
| 200 | |
| 201 | // Tune the kernel if the CLTuner has been provided |
| 202 | if (_cl_tuner != nullptr) |
| 203 | { |
| 204 | inject_memory ? _cl_tuner->tune_kernel_dynamic(kernel, tensors) : _cl_tuner->tune_kernel_dynamic(kernel); |
| 205 | } |
| 206 | |
| 207 | // Run kernel |
| 208 | inject_memory ? kernel.run_op(tensors, kernel.window(), _queue) : kernel.run(kernel.window(), _queue); |
| 209 | |
| 210 | flush_queue(flush); |
| 211 | ARM_COMPUTE_TRACE_EVENT_END(ARM_COMPUTE_PROF_CAT_SCHEDULER, ARM_COMPUTE_PROF_LVL_GPU); |
| 212 | } |
| 213 | |
| 214 | void CLScheduler::flush_queue(bool flush) |
| 215 | { |
nothing calls this directly
no test coverage detected