1 .TH CLINFO 1 "2023-01-25" "clinfo 3.0.23.01.25"
5 clinfo \- show OpenCL platforms and devices
13 prints all available information about all OpenCL platforms
14 available on the system and the devices they expose.
18 accepts the following options:
20 .BR -a ", " --all-props
21 try to retrieve all properties, even those not officially supported
22 (e.g. because they require specific extensions), but only show them
23 if the property could be retrieved successfully; see also the
25 section below; note that even though this may reveal hidden properties,
26 there is no guarantee that the returned values are meaningful, nor that
27 the corresponding feature is actually available at all;
29 .BR -A ", " --always-all-props
35 produce human-friendly output; this is the default (except
39 produce machine-friendly output; this is the default if
41 is invoked with a name that contains the string
45 outputs the raw data (cf. the
47 option) in JSON format; support for this option is experimental,
48 as the representation of some of the values is not finalized;
51 shows also offline devices for platforms that expose this feature;
54 tries to handle the NULL platform as a normal platform,
55 retrieving and showing its properties and devices;
56 this is in addition to the NULL platform behavior tests done at the end,
57 and can be useful on systems where there are no ICD platforms,
58 but there is a platform hard-coded in the OpenCL library itself;
61 list platforms and devices by name, with no (other) properties;
63 .BI -d platform_index : device_index
65 .BI --device " platform_index" : device_index
66 only show properties for the specified device in the specified platform;
68 .BI --prop " property-name"
69 only show properties whose symbolic name matches
70 (contains as a substring) the given
72 the name is normalized as upper-case and with minus sign (-)
73 replaced by underscore signs (_); when this flag is specified,
84 OpenCL 1.1, OpenCL 1.2, OpenCL 2.0, OpenCL 2.1, OpenCL 2.2, OpenCL 3.0.
88 Supported OpenCL extensions:
91 for the UUID, LUID and node mask of the device;
93 .B cl_khr_extended_versioning
94 for the extended platform, device, extension and IL versioned properties
95 backported from OpenCL 3.0 to previous OpenCL versions;
97 .BR cl_khr_fp16 ", " cl_khr_fp64 ", " cl_amd_fp64 ", " cl_APPLE_fp64_basic_ops
98 for information about support for half-precision and double-precision
99 floating-point data types;
101 .B cl_khr_image2d_from_buffer
102 for information about the base address and pitch alignment requirements
103 of buffers to be used as base for 2D images;
106 for information about the supported IL (Intermediate Language) representations;
109 for information about the supported SPIR (Standard Portable Intermediate
110 Representation) versions;
113 for the suffix of vendor extensions functions;
115 .B cl_khr_subgroup_named_barrier
116 for the maximum number of named sub-group barriers;
118 .BI cl_khr_terminate_context ", " cl_arm_controlled_kernel_termination
119 for the terminate capabilities for the device;
121 .B cl_ext_device_fission
122 for device fission support in OpenCL 1.1 devices;
124 .B cl_khr_pci_bus_info
125 for the PCI bus information (see also
126 .BR cl_nv_device_attribute_query " and"
127 .BR cl_amd_device_attribute_query )
129 .B cl_ext_atomic_counters_32
131 .B cl_ext_atomic_counters_64
132 for the atomic counter extension;
134 .B cl_ext_cxx_for_opencl
135 for the version of the C++ for OpenCL language supported by the device compiler;
137 .B cl_amd_device_attribute_query
138 for AMD-specific device attributes;
140 .B cl_amd_object_metadata
141 to show the maximum number of keys supported by the platform;
143 .B cl_amd_offline_devices
144 to show offline devices exposed by the platform, if requested (see
148 .B cl_amd_copy_buffer_p2p
149 to show the number and IDs of available P2P devices;
153 .B cl_arm_shared_virtual_memory
154 for Shared Virtual Memory (SVM) capabilities in OpenCL 1.2 devices;
157 to show the (potentially sparse) list of the core IDs that the device may
160 .B cl_arm_job_slot_selection
161 to show the (potentially sparse) list of available job slots for command
164 .B cl_arm_scheduling_controls
165 to show the supported work scheduling controls and the available sets of register allocations;
167 .B cl_nv_device_attribute_query
168 for NVIDIA-specific device attributes;
170 .B cl_intel_device_attribute_query
171 for Intel-specific device attributes;
173 .B cl_intel_exec_by_local_thread
174 for the Intel extension allowing CPU devices to run kernels as part of
175 the current host thread;
177 .B cl_intel_advanced_motion_estimation
178 for the version of the Intel Motion Estimation accelerator version;
180 .B cl_intel_device_side_avc_motion_estimation
181 for the version and supported features of Intel's device-side AVC Motion;
183 .B cl_intel_planar_yuv
184 for the maximum dimensions of planar YUV images;
186 .B cl_intel_simultaneous_sharing
187 for simultaneous CL/GL/DirectX context sharing (only partial support);
189 .B cl_intel_required_subgroup_size
190 to enumerate allowed sub-group sizes;
192 .B cl_intel_command_queue_families
193 to enumerate the available command queues and their properties and capabilities;
195 .B cl_altera_device_temperature
196 for the Altera extension to query the core temperature of the device;
198 .B cl_qcom_ext_host_ptr
199 for the QUALCOMM extension to query page size and required padding in external
203 Some information is duplicated when available from multiple sources.
206 supported device partition types and domains as obtained using the
207 .B cl_ext_device_fission
208 extension typically match the ones obtained using
209 the core OpenCL 1.2 device partition feature;
211 the preferred work-group size multiple matches the NVIDIA warp size (on
212 NVIDIA devices) or the AMD wavefront width (on AMD devices).
215 Some floating-point configuration flags may only be meaningful for
216 specific precisions and/or specific OpenCL versions. For example,
217 .B CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT
218 is only relevant for single precision in OpenCL 1.2 devices.
221 The implementation-defined behavior for NULL platform or context
222 properties is tested for the following API calls:
224 .B clGetPlatformInfo()
225 by trying to show the platform name;
228 by trying to enumerate devices; the corresponding platform (if any)
229 is then detected by querying the device platform of the first device;
231 .B clCreateteContext()
232 by trying to create a context from a device from the previous
233 list (if any), and a context from a device from a different platform;
235 .B clCreateteContextFromType()
236 by trying to create contexts for each device type (except DEFAULT).
238 .SH EXPERIMENTAL FEATURES
240 Support for OpenCL 2.x properties is not fully tested.
244 .B cl_khr_subgroup_named_barrier
245 is experimental due to missing definitions in the official OpenCL headers.
248 Raw (machine-parsable) output is considered experimental, the output format
249 might still undergo changes.
252 The properties of the ICD loader will also be queried if the
253 .B clGetICDLoaderInfoOCLICD
254 extension function is found.
257 Support for the properties exposed by
258 .B cl_amd_copy_buffer_p2p
262 Support for some (documented and undocumented) properties exposed by
263 .B cl_amd_device_attribute_query
264 is experimental (see also
268 Support for the interop lists exposed by
269 .B cl_intel_simultaneous_sharing
273 The highest OpenCL version supported by the ICD loader is detected
274 with some trivial heuristics (symbols found); a notice is output
275 if this is lower than the highest platform OpenCL version, or
276 if the detected version doesn't match the one declared by the ICD
282 OpenCL provides no explicit mean to detect the supported version
283 of any extension exposed by a device, which makes it impossible to
284 determine a priori if it will be possible to successfully query
285 a device about a specific property.
286 Additionally, the actual size and meaning of some properties are not
287 officially declared anywhere.
290 Most notably, this affects extensions such as
291 .BR cl_amd_device_attribute_query ,
292 .B cl_nv_device_attribute_query
295 Heuristics based on standard version support are partially used in the code to
296 determine which version may be supported.
299 Properties which are known to be affected by these limitations include:
302 .B CL_DEVICE_GLOBAL_FREE_MEMORY_AMD
303 documented in v3 of the
304 .B cl_amd_device_attribute_query
305 extension specification as being the global free memory in KBytes, without
306 any explanation given on why there are two values, although in the source code
309 stack the second value is documented as being the largest free block;
311 .B CL_DEVICE_AVAILABLE_ASYNC_QUEUES_AMD
312 documented in v3 of the
313 .B cl_amd_device_attribute_query
314 extension specification, but not reported by drivers supporting other v3
315 properties. This has now been enabled for drivers
317 to support v4 of the same extension;
319 .B CL_DEVICE_TERMINATE_CAPABILITY_KHR
321 .B cl_khr_terminate_context
322 has changed value between OpenCL 1.x and 2.x, and it's
324 a bitfield, whose values are however not defined anywhere.
331 Please report any issues on
332 .UR http://github.com/Oblomov/clinfo
333 the project tracker on GitHub
336 .SS LLVM CommandLine errors
339 If multiple OpenCL platforms using shared
341 libraries are present in the system,
343 (and other OpenCL application) may crash with errors
348 .B : CommandLine Error: Option '(some option name)' registered more than once!
349 .B LLVM ERROR: inconsistency in registered CommandLine options
353 or similar. This is not an issue in
355 or in any OpenCL platform or application, but it is due to the way
357 handles its own command-line options parsing.
358 The issue has been reported upstream
359 .UR https://bugs.llvm.org/show_bug.cgi?id=30587
362 See the next point for possible workarounds and assistance in identifying the
363 conflicting platforms.
365 .SS Segmentation faults
368 Faulty OpenCL platforms may cause segmentation faults in
370 during the information gathering phase, sometimes even
371 before any output is shown. There is very little
373 can do to avoid this. If you see this happening,
374 try disabling all platforms and then re-enabling
375 them one by one until you experience the crash again.
376 Chances are the last platform you enabled is defective
377 in some way (either by being incompatible with other
378 platforms or by missing necessary components and
379 not handling their absence gracefully).
382 To selectively enable/disable platforms, one
383 way is to move or rename the
386 .I /etc/OpenCL/vendors/
387 and then restoring them one by one. When using
390 OpenCL library, a similar effect can be achieved
392 .B OPENCL_VENDOR_PATH
395 environment variables, as documented in
397 Other implementations of
400 .B OPENCL_VENDOR_PATH
405 find /etc/OpenCL/vendors/ -name '*.icd' | while read OPENCL_VENDOR_PATH ; do clinfo -l > /dev/null ; echo "$? ${OPENCL_VENDOR_PATH}" ; done
408 This one liner will run
410 for each platform individually (hiding the normal output),
415 for successful runs, and a non-zero value for faulty