24.02.1
|
Go to the documentation of this file.
24 #ifndef ARM_COMPUTE_CLDEVICE_H
25 #define ARM_COMPUTE_CLDEVICE_H
60 std::string device_name = _device.getInfo<CL_DEVICE_NAME>();
64 std::string
extensions = _device.getInfo<CL_DEVICE_EXTENSIONS>();
67 for (std::string s; iss >> s;)
75 _options.
extensions.insert(
"cl_arm_integer_dot_product_int8");
82 _options.
compute_units = _device.getInfo<CL_DEVICE_MAX_COMPUTE_UNITS>();
139 bool supported(
const std::string &extension)
const override
141 return _options.
extensions.count(extension) != 0;
156 return {
true,
" -cl-std=CL3.0 "};
160 return {
true,
" -cl-std=CL2.0 "};
162 else if (
supported(
"cl_arm_non_uniform_work_group_size"))
164 return {
true,
" -cl-arm-non-uniform-work-group-size "};
GPUTarget gpu_target
GPU target architecture/instance.
size_t compute_units() const
Returns the number of compute units available.
CLDevice()
Default Constructor.
bool supported(const std::string &extension) const override
Check if extensions on a device are supported.
const cl::Device & cl_device() const
Returns the underlying cl device object.
CLVersion
Available OpenCL Version.
std::tuple< bool, std::string > is_non_uniform_workgroup_supported() const
Returns whether non-uniform workgroup is supported and the build options.
std::set< std::string > extensions
List of supported extensions.
GPUTarget get_target_from_name(const std::string &device_name)
Helper function to get the GPU target from a device name.
CLDevice(const cl::Device &cl_device)
Constructor.
bool get_cl_non_uniform_work_group_supported(const cl::Device &device)
Helper function to check whether non-uniform work group is supported.
CLVersion version
Device OpenCL version.
DeviceType type() const override
Device type accessor.
std::string device_version() const
Returns the device version as a string.
GPUTarget
Available GPU Targets.
OpenCL device type class.
size_t compute_units
Number of compute units.
CLVersion get_cl_version(const cl::Device &device)
Helper function to get the highest OpenCL version supported.
CLVersion version() const
Returns the device's CL version.
Copyright (c) 2017-2024 Arm Limited.
Interface for device object.
std::string device_version
Device version string.
const GPUTarget & target() const
Returns the GPU target of the cl device.