23.08
|
Go to the documentation of this file.
24 #ifndef ARM_COMPUTE_CLHELPERS_H
25 #define ARM_COMPUTE_CLHELPERS_H
36 class CLCompileContext;
42 static constexpr
unsigned int max_cl_vector_width = 16;
45 static constexpr
int max_manual_loop_unrolling = 128;
218 cl::Kernel
create_kernel(
const CLCompileContext &ctx,
const std::string &
kernel_name,
const std::set<std::string> &build_opts = std::set<std::string>());
243 void set_wbsm(cl::Kernel &kernel, cl_int wbsm_hint);
bool dot8_supported(const cl::Device &device)
Helper function to check whether the cl_arm_integer_dot_product_int8 extension is supported.
size_t preferred_vector_width(const cl::Device &device, DataType dt)
Helper function to get the preferred native vector width size for built-in scalar types that can be p...
bool export_to_cl_image(const ITensorInfo *tensor)
bool fp16_supported(const cl::Device &device)
Helper function to check whether the cl_khr_fp16 extension is supported.
DataLayout
[DataLayout enum definition]
bool preferred_dummy_work_items_support(const cl::Device &device)
Helper function to check if "dummy work-items" are preferred to have a power of two NDRange In case d...
std::string get_cl_dot8_acc_type_from_data_type(const DataType &dt)
Translates a tensor data type to the appropriate OpenCL dot8 accumulator type.
std::string get_cl_signed_type_from_element_size(size_t element_size)
Translates the element size to an signed integer data type.
bool arm_matrix_multiply_supported(const cl::Device &device)
Helper function to check whether the cl_arm_matrix_multiply extension is supported.
void set_wbsm(cl::Kernel &kernel, cl_int wbsm_hint)
bool image2d_from_buffer_supported(const cl::Device &device)
Helper function to check whether the cl_khr_image2d_from_buffer extension is supported.
std::string get_cl_select_type_from_data_type(const DataType &dt)
Translates a tensor data type to the appropriate OpenCL select type.
bool get_wbsm_support_info(const cl::Device &device)
CLVersion
Available OpenCL Version.
std::string get_data_size_from_data_type(const DataType &dt)
Get the size of a data type in number of bits.
cl::Kernel create_kernel(const CLCompileContext &ctx, const std::string &kernel_name, const std::set< std::string > &build_opts=std::set< std::string >())
Creates an opencl kernel using a compile context.
std::string get_cl_promoted_type_from_data_type(const DataType &dt)
Translates a tensor data type to the appropriate OpenCL promoted type.
bool get_cl_non_uniform_work_group_supported(const cl::Device &device)
Helper function to check whether non-uniform work group is supported.
Wrapper to configure the Khronos OpenCL C++ header.
GPUTarget get_target_from_device(const cl::Device &device)
Helper function to get the GPU target from CL device.
CLTensor * tensor
Pointer to the auxiliary tensor.
cl::NDRange create_lws_hint_parallel_implementations(unsigned int input_dimension, unsigned int vector_size)
Creates a suitable LWS hint object for parallel implementations.
std::string get_cl_type_from_data_type(const DataType &dt)
Translates a tensor data type to the appropriate OpenCL type.
GPUTarget
Available GPU Targets.
std::string get_cl_unsigned_type_from_element_size(size_t element_size)
Translates the element size to an unsigned integer data type.
CLVersion get_cl_version(const cl::Device &device)
Helper function to get the highest OpenCL version supported.
bool device_supports_extension(const cl::Device &device, const char *extension_name)
Helper function to check whether a given extension is supported.
Copyright (c) 2017-2023 Arm Limited.
bool arm_non_uniform_workgroup_supported(const cl::Device &device)
Helper function to check whether the arm_non_uniform_work_group_size extension is supported.
size_t get_cl_image_pitch_alignment(const cl::Device &device)
Helper function to get the cl_image pitch alignment in pixels.
bool cl_winograd_convolution_layer_supported(const Size2D &output_tile, const Size2D &kernel_size, DataLayout data_layout)
This function checks if the Winograd configuration (defined through the output tile,...
DataType
Available data types.
void set_unroll_with_pragma(CLBuildOptions &built_opts, std::initializer_list< int > values)
bool dot8_acc_supported(const cl::Device &device)
Helper function to check whether the cl_arm_integer_dot_product_accumulate_int8 extension is supporte...