1CLINFO(1)                   General Commands Manual                  CLINFO(1)
2
3
4

NAME

6       clinfo - show OpenCL platforms and devices
7
8

SYNOPSIS

10       clinfo [options ...]
11
12

DESCRIPTION

14       clinfo  prints  all  available  information  about all OpenCL platforms
15       available on the system and the devices they expose.
16
17

OPTIONS

19       clinfo accepts the following options:
20
21       -a, --all-props
22         try to retrieve all properties, even those not  officially  supported
23         (e.g.  because  they require specific extensions), but only show them
24         if the property could be retrieved successfully; see also the LIMITA‐
25         TIONS  section  below;  note  that even though this may reveal hidden
26         properties, there is no guarantee that the returned values are  mean‐
27         ingful,  nor  that the corresponding feature is actually available at
28         all;
29
30       -A, --always-all-props
31         like -a, but also show errors;
32
33       --human
34         produce human-friendly output; this is the default (except  as  noted
35         below);
36
37       --raw
38         produce machine-friendly output; this is the default if clinfo is in‐
39         voked with a name that contains the string “raw”;
40
41       --json
42         outputs the raw data (cf. the --raw option) in JSON  format;  support
43         for this option is experimental, as the representation of some of the
44         values is not finalized;
45
46       --offline
47         shows also offline devices for platforms that expose this feature;
48
49       --null-platform
50         tries to handle the NULL platform as a  normal  platform,  retrieving
51         and  showing  its  properties and devices; this is in addition to the
52         NULL platform behavior tests done at the end, and can  be  useful  on
53         systems  where  there  are  no ICD platforms, but there is a platform
54         hard-coded in the OpenCL library itself;
55
56       -l, --list
57         list platforms and devices by name, with no (other) properties;
58
59       -dplatform_index:device_index
60       --device platform_index:device_index
61         only show properties for the specified device in the specified  plat‐
62         form;
63
64       --prop property-name
65         only  show properties whose symbolic name matches (contains as a sub‐
66         string) the given property-name; the name is normalized as upper-case
67         and  with  minus sign (-) replaced by underscore signs (_); when this
68         flag is specified, raw mode is forced;
69
70       -h, -?
71         show usage;
72
73       --version, -v
74         show program version.
75
76

CONFORMING TO

78       OpenCL 1.1, OpenCL 1.2, OpenCL 2.0, OpenCL 2.1, OpenCL 2.2, OpenCL 3.0.
79
80

EXTENSIONS

82       Supported OpenCL extensions:
83
84       cl_khr_device_uuid
85         for the UUID, LUID and node mask of the device;
86
87       cl_khr_extended_versioning
88         for the extended platform, device, extension and IL versioned proper‐
89         ties backported from OpenCL 3.0 to previous OpenCL versions;
90
91       cl_khr_fp16, cl_khr_fp64, cl_amd_fp64, cl_APPLE_fp64_basic_ops
92         for information about support for half-precision and double-precision
93         floating-point data types;
94
95       cl_khr_image2d_from_buffer
96         for information about the base address and pitch  alignment  require‐
97         ments of buffers to be used as base for 2D images;
98
99       cl_khr_il_program
100         for information about the supported IL (Intermediate Language) repre‐
101         sentations;
102
103       cl_khr_spir
104         for information about the supported SPIR (Standard Portable  Interme‐
105         diate Representation) versions;
106
107       cl_khr_icd
108         for the suffix of vendor extensions functions;
109
110       cl_khr_subgroup_named_barrier
111         for the maximum number of named sub-group barriers;
112
113       cl_khr_terminate_context, cl_arm_controlled_kernel_termination
114         for the terminate capabilities for the device;
115
116       cl_ext_device_fission
117         for device fission support in OpenCL 1.1 devices;
118
119       cl_khr_pci_bus_info
120         for  the  PCI  bus information (see also cl_nv_device_attribute_query
121         and cl_amd_device_attribute_query)
122
123       cl_ext_atomic_counters_32
124       cl_ext_atomic_counters_64
125         for the atomic counter extension;
126
127       cl_ext_cxx_for_opencl
128         for the version of the C++ for OpenCL language supported by  the  de‐
129         vice compiler;
130
131       cl_amd_device_attribute_query
132         for AMD-specific device attributes;
133
134       cl_amd_object_metadata
135         to show the maximum number of keys supported by the platform;
136
137       cl_amd_offline_devices
138         to  show  offline  devices exposed by the platform, if requested (see
139         --offline option);
140
141       cl_amd_copy_buffer_p2p
142         to show the number and IDs of available P2P devices;
143
144       cl_amd_svm
145       cl_arm_shared_virtual_memory
146         for Shared Virtual Memory (SVM) capabilities in OpenCL 1.2 devices;
147
148       cl_arm_core_id
149         to show the (potentially sparse) list of the core IDs that the device
150         may return;
151
152       cl_arm_job_slot_selection
153         to show the (potentially sparse) list of available job slots for com‐
154         mand submission;
155
156       cl_arm_scheduling_controls
157         to show the supported work scheduling controls and the available sets
158         of register allocations;
159
160       cl_nv_device_attribute_query
161         for NVIDIA-specific device attributes;
162
163       cl_intel_device_attribute_query
164         for Intel-specific device attributes;
165
166       cl_intel_exec_by_local_thread
167         for  the  Intel extension allowing CPU devices to run kernels as part
168         of the current host thread;
169
170       cl_intel_advanced_motion_estimation
171         for the version of the Intel Motion Estimation accelerator version;
172
173       cl_intel_device_side_avc_motion_estimation
174         for the version and supported features of Intel's device-side AVC Mo‐
175         tion;
176
177       cl_intel_planar_yuv
178         for the maximum dimensions of planar YUV images;
179
180       cl_intel_simultaneous_sharing
181         for  simultaneous  CL/GL/DirectX  context  sharing (only partial sup‐
182         port);
183
184       cl_intel_required_subgroup_size
185         to enumerate allowed sub-group sizes;
186
187       cl_intel_command_queue_families
188         to enumerate the available command queues and  their  properties  and
189         capabilities;
190
191       cl_altera_device_temperature
192         for the Altera extension to query the core temperature of the device;
193
194       cl_qcom_ext_host_ptr
195         for the QUALCOMM extension to query page size and required padding in
196         external memory allocation.
197
198

NOTES

200       Some information is duplicated when available  from  multiple  sources.
201       Examples:
202
203       • supported  device  partition  types and domains as obtained using the
204         cl_ext_device_fission extension typically match the ones obtained us‐
205         ing the core OpenCL 1.2 device partition feature;
206
207       • the  preferred  work-group size multiple matches the NVIDIA warp size
208         (on NVIDIA devices) or the AMD wavefront width (on AMD devices).
209
210
211       Some floating-point configuration flags may only be meaningful for spe‐
212       cific   precisions   and/or  specific  OpenCL  versions.  For  example,
213       CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT is only relevant for single  preci‐
214       sion in OpenCL 1.2 devices.
215
216
217       The  implementation-defined behavior for NULL platform or context prop‐
218       erties is tested for the following API calls:
219
220       clGetPlatformInfo()
221         by trying to show the platform name;
222
223       clGetDeviceIDs()
224         by trying to enumerate devices; the corresponding platform  (if  any)
225         is then detected by querying the device platform of the first device;
226
227       clCreateteContext()
228         by  trying  to  create a context from a device from the previous list
229         (if any), and a context from a device from a different platform;
230
231       clCreateteContextFromType()
232         by trying to create contexts for each device type (except DEFAULT).
233
234

EXPERIMENTAL FEATURES

236       Support for OpenCL 2.x properties is not fully tested.
237
238
239       Support for cl_khr_subgroup_named_barrier is experimental due to  miss‐
240       ing definitions in the official OpenCL headers.
241
242
243       Raw  (machine-parsable)  output  is considered experimental, the output
244       format might still undergo changes.
245
246
247       The properties of the ICD loader will also be queried if the  clGetICD‐
248       LoaderInfoOCLICD extension function is found.
249
250
251       Support for the properties exposed by cl_amd_copy_buffer_p2p is experi‐
252       mental.
253
254
255       Support for some (documented and undocumented)  properties  exposed  by
256       cl_amd_device_attribute_query is experimental (see also LIMITATIONS).
257
258
259       Support  for the interop lists exposed by cl_intel_simultaneous_sharing
260       is experimental.
261
262
263       The highest OpenCL version supported by the ICD loader is detected with
264       some  trivial heuristics (symbols found); a notice is output if this is
265       lower than the highest platform OpenCL version, or if the detected ver‐
266       sion doesn't match the one declared by the ICD loader itself.
267
268

LIMITATIONS

270       OpenCL provides no explicit mean to detect the supported version of any
271       extension exposed by a device, which makes it impossible to determine a
272       priori  if  it  will be possible to successfully query a device about a
273       specific property.  Additionally, the actual size and meaning  of  some
274       properties are not officially declared anywhere.
275
276
277       Most  notably,  this  affects  extensions  such as cl_amd_device_attri‐
278       bute_query, cl_nv_device_attribute_query and  cl_arm_core_id.   Heuris‐
279       tics  based  on standard version support are partially used in the code
280       to determine which version may be supported.
281
282
283       Properties which are known to be affected by these limitations include:
284
285
286       CL_DEVICE_GLOBAL_FREE_MEMORY_AMD
287         documented in v3 of the cl_amd_device_attribute_query extension spec‐
288         ification  as being the global free memory in KBytes, without any ex‐
289         planation given on why there are two values, although in  the  source
290         code  of  the  ROCm stack the second value is documented as being the
291         largest free block;
292
293       CL_DEVICE_AVAILABLE_ASYNC_QUEUES_AMD
294         documented in v3 of the cl_amd_device_attribute_query extension spec‐
295         ification,  but  not  reported by drivers supporting other v3 proper‐
296         ties. This has now been enabled for drivers assumed to support v4  of
297         the same extension;
298
299       CL_DEVICE_TERMINATE_CAPABILITY_KHR
300         exposed  by  the  cl_khr_terminate_context  has changed value between
301         OpenCL 1.x and 2.x, and it's allegedly a bitfield, whose  values  are
302         however not defined anywhere.
303
304

BUGS

306   General
307       Please   report   any   issues   on   the  project  tracker  on  GitHub
308http://github.com/Oblomov/clinfo⟩.
309
310
311   LLVM CommandLine errors
312       If multiple OpenCL platforms using shared LLVM libraries are present in
313       the system, clinfo (and other OpenCL application) may crash with errors
314       to the tune of
315
316              : CommandLine Error: Option '(some option name)' registered more than once!
317              LLVM ERROR: inconsistency in registered CommandLine options
318
319       or similar. This is not an issue in clinfo, or in any  OpenCL  platform
320       or  application, but it is due to the way LLVM handles its own command-
321       line options parsing.  The issue has been reported  upstream  as  issue
322       #30587  ⟨https://bugs.llvm.org/show_bug.cgi?id=30587⟩.   See  the  next
323       point for possible workarounds and assistance in identifying  the  con‐
324       flicting platforms.
325
326
327   Segmentation faults
328       Faulty  OpenCL platforms may cause segmentation faults in clinfo during
329       the information gathering phase, sometimes even before  any  output  is
330       shown.  There  is  very  little clinfo can do to avoid this. If you see
331       this happening, try disabling all platforms and then  re-enabling  them
332       one  by one until you experience the crash again.  Chances are the last
333       platform you enabled is defective in some way (either by  being  incom‐
334       patible with other platforms or by missing necessary components and not
335       handling their absence gracefully).
336
337
338       To selectively enable/disable platforms, one way is to move  or  rename
339       the *.icd files present in /etc/OpenCL/vendors/ and then restoring them
340       one by one. When using the free-software ocl-icd OpenCL library, a sim‐
341       ilar  effect  can  be  achieved  by  setting  the OPENCL_VENDOR_PATH or
342       OCL_ICD_VENDORS environment variables, as documented  in  libOpenCL(7).
343       Other  implementations  of  libOpenCL  are known to support OPENCL_VEN‐
344       DOR_PATH too.
345
346
347       Example
348         find /etc/OpenCL/vendors/ -name  '*.icd'  |  while  read  OPENCL_VEN‐
349         DOR_PATH ; do clinfo -l > /dev/null ; echo "$? ${OPENCL_VENDOR_PATH}"
350         ; done
351
352
353       This one liner will run clinfo -l for each platform individually  (hid‐
354       ing the normal output), and report the .icd path prefixed by 0 for suc‐
355       cessful runs, and a non-zero value for faulty platforms.
356
357
358
359clinfo 3.0.23.01.25               2023-01-25                         CLINFO(1)
Impressum