24.02.1
|
Go to the documentation of this file.
24 #ifndef ARM_COMPUTE_CLKERNELLIBRARY_H
25 #define ARM_COMPUTE_CLKERNELLIBRARY_H
60 void init(std::string kernel_path, cl::Context
context, cl::Device device);
75 std::pair<std::string, bool>
get_program(
const std::string &program_name)
const;
131 void add_built_program(
const std::string &built_program_name,
const cl::Program &program);
cl::Context & context()
Accessor for the associated CL context.
void init(std::string kernel_path, cl::Context context, cl::Device device)
Initialises the kernel library.
bool int64_base_atomics_supported() const
Returns true if int64_base_atomics extension is supported by the CL device.
Kernel create_kernel(const std::string &kernel_name, const std::set< std::string > &build_options_set={}) const
Creates a kernel from the kernel library.
static CLKernelLibrary & get()
Access the KernelLibrary singleton.
void add_built_program(const std::string &built_program_name, const cl::Program &program)
Add a new built program to the cache.
bool fp16_supported() const
Returns true if FP16 is supported by the CL device.
std::string get_program_name(const std::string &kernel_name) const
Returns the program name given a kernel name.
CLCompileContext & get_compile_context()
Gets the compile context used.
void clear_programs_cache()
Clear the library's cache of binary programs.
Wrapper to configure the Khronos OpenCL C++ header.
void set_context(cl::Context context)
Sets the CL context used to create programs.
std::pair< std::string, bool > get_program(const std::string &program_name) const
Gets the source of the selected program.
Copyright (c) 2017-2024 Arm Limited.
void set_kernel_path(const std::string &kernel_path)
Sets the path that the kernels reside in.
cl::NDRange default_ndrange() const
Return the default NDRange for the device.
size_t max_local_workgroup_size(const cl::Kernel &kernel) const
Find the maximum number of local work items in a workgroup can be supported for the kernel.
std::string get_kernel_path()
Gets the path that the kernels reside in.
std::string get_device_version()
Return the device version.
cl_uint get_num_compute_units()
Return the maximum number of compute units in the device.
void set_device(cl::Device device)
Sets the CL device for which the programs are created.
const std::map< std::string, cl::Program > & get_built_programs() const
Access the cache of built OpenCL programs.
const cl::Device & get_device()
Gets the CL device for which the programs are created.