24 #ifndef ARM_COMPUTE_CLSCHEDULER_H 25 #define ARM_COMPUTE_CLSCHEDULER_H 108 cl::CommandQueue &
queue();
166 static std::once_flag _initialize_symbols;
168 cl::Context _context;
169 cl::CommandQueue _queue;
171 bool _is_initialised;
173 std::unique_ptr<ICLTuner> _cl_default_static_tuner;
void set_target(GPUTarget target)
Accessor to set target GPU to be used by the scheduler.
GPUTarget target() const
Get the target GPU.
void set_context(cl::Context context)
Accessor to set the CL context to be used by the scheduler.
void default_init_with_context(cl::Device &device, cl::Context &ctx, ICLTuner *cl_tuner=nullptr, CLGEMMHeuristicsHandle *gemm_h=nullptr)
Initialises the scheduler with context and device provided by the user.
CLScheduler & operator=(const CLScheduler &)=delete
Prevent instances of this class from being copied (As this class contains pointers) ...
~CLScheduler()=default
Default destructor.
bool is_initialised() const
Common interface for all the OpenCL kernels.
CLGEMMHeuristicsHandle * gemm_heuristics() const
Accessor for the associated CLGEMMHeuristicsHandle.
Copyright (c) 2017-2021 Arm Limited.
cl::Context & context()
Accessor for the associated CL context.
cl::Event enqueue_sync_event()
Enqueues a marker into the associated command queue and return the event.
Interface used to tune the local work-group size of OpenCL kernels.
void enqueue_op(ICLKernel &kernel, ITensorPack &tensors, bool flush=true)
Schedule the execution of the passed kernel if possible.
void init(cl::Context context, cl::CommandQueue queue, const cl::Device &device, ICLTuner *cl_tuner=nullptr, CLGEMMHeuristicsHandle *gemm_h=nullptr)
Initialises the context and command queue to be used by the scheduler.
void set_tuner(ICLTuner *tuner)
Accessor to set the CL tuner to be used by the scheduler.
cl::CommandQueue & queue()
Accessor for the associated CL command queue.
void enqueue(ICLKernel &kernel, bool flush=true)
Schedule the execution of the passed kernel if possible.
void set_queue(cl::CommandQueue queue)
Accessor to set the CL command queue to be used by the scheduler.
CLScheduler()
Constructor.
void sync()
Blocks until all commands in the associated command queue have finished.
Handle for loading and retrieving GEMM heuristics.
GPUTarget
Available GPU Targets.
Provides global access to a CL context and command queue.
Wrapper to configure the Khronos OpenCL C++ header.
Basic interface for tuning the OpenCL kernels.
void default_init(ICLTuner *cl_tuner=nullptr, CLGEMMHeuristicsHandle *gemm_h=nullptr)
Initialises the context and command queue used by the scheduler to default values and sets a default ...
void tune_kernel_static(ICLKernel &kernel)
Tunes OpenCL kernel.