24 #ifndef ARM_COMPUTE_CLDEVICE_H 25 #define ARM_COMPUTE_CLDEVICE_H 47 : _device(
cl::Device()), _options()
56 : _device(), _options()
61 std::string device_name = _device.getInfo<CL_DEVICE_NAME>();
65 std::string extensions = _device.getInfo<CL_DEVICE_EXTENSIONS>();
67 std::istringstream iss(extensions);
68 for(std::string s; iss >> s;)
76 _options.
extensions.insert(
"cl_arm_integer_dot_product_int8");
83 _options.
compute_units = _device.getInfo<CL_DEVICE_MAX_COMPUTE_UNITS>();
140 bool supported(
const std::string &extension)
const override 142 return _options.
extensions.count(extension) != 0;
size_t compute_units
Number of compute units.
std::string device_version() const
Returns the device version as a string.
Interface for device object.
DeviceType type() const override
Device type accessor.
CLDevice(const cl::Device &cl_device)
Constructor.
CLVersion
Available OpenCL Version.
GPUTarget get_target_from_name(const std::string &device_name)
Helper function to get the GPU target from a device name.
GPUTarget gpu_target
GPU target architecture/instance.
Copyright (c) 2017-2021 Arm Limited.
std::set< std::string > extensions
List of supported extensions.
CLVersion version() const
Returns the device's CL version.
const GPUTarget & target() const
Returns the GPU target of the cl device.
OpenCL device type class.
bool supported(const std::string &extension) const override
Check if extensions on a device are supported.
CLDevice()
Default Constructor.
CLVersion get_cl_version(const cl::Device &device)
Helper function to get the highest OpenCL version supported.
size_t compute_units() const
Returns the number of compute units available.
std::string device_version
Device version string.
GPUTarget
Available GPU Targets.
const cl::Device & cl_device() const
Returns the underlying cl device object.
CLVersion version
Device OpenCL version.