clinfo
3 years agoVersion 3.0.21.02.21 3.0.21.02.21
Giuseppe Bilotta [Sun, 21 Feb 2021 10:03:06 +0000 (11:03 +0100)] 
Version 3.0.21.02.21

3 years agoNV also provides the PCI domain
Giuseppe Bilotta [Mon, 1 Feb 2021 19:46:42 +0000 (20:46 +0100)] 
NV also provides the PCI domain

Supporting this in human form requires the definition of a new structure
that supersets both the AMD and the NV data.

3 years agoCL_DEVICE_PCIE_ID_AMD only works for GPUs
Giuseppe Bilotta [Mon, 1 Feb 2021 15:46:27 +0000 (16:46 +0100)] 
CL_DEVICE_PCIE_ID_AMD only works for GPUs

3 years agoImprove README
Giuseppe Bilotta [Sun, 13 Dec 2020 11:22:13 +0000 (12:22 +0100)] 
Improve README

3 years agoCL_DEVICE_OPENCL_C_ALL_VERSIONS requires 3.0
Giuseppe Bilotta [Thu, 10 Dec 2020 13:22:48 +0000 (14:22 +0100)] 
CL_DEVICE_OPENCL_C_ALL_VERSIONS requires 3.0

3 years agoBugfix: char-subscripts are treated as an error.
kou1okada [Thu, 10 Dec 2020 03:08:29 +0000 (12:08 +0900)] 
Bugfix: char-subscripts are treated as an error.

At least in Cygwin, isspace () will fail to compile as below if it takes char as an argument.

```
$ make
cc -g -pedantic -Werror -std=c99 -Wall -Wextra -I../OpenCL-Headers  -c -o clinfo.o src/clinfo.c
In file included from src/error.h:11,
                 from src/clinfo.c:35:
src/strbuf.h: In function ‘skip_leading_ws’:
src/strbuf.h:128:8: error: array subscript has type ‘char’ [-Werror=char-subscripts]
  128 |  while (isspace(*ret)) ++ret;
      |        ^~~~
cc1: all warnings being treated as errors
make: *** [<builtin>: clinfo.o] Error 1
```

For more details and recommendations for this error, see following:

* stackoverflow / 2012-04-02: [Warning: array subscript has type char](https://stackoverflow.com/a/60696378)

3 years agoFix extra handling of CL_DEVICE_EXTENSIONS_WITH_VERSION
Giuseppe Bilotta [Wed, 2 Dec 2020 16:10:02 +0000 (17:10 +0100)] 
Fix extra handling of CL_DEVICE_EXTENSIONS_WITH_VERSION

When running with -a, and the property is not supported, it should just
be skipped instead of printing the error.

3 years agoImprove single-property output management
Giuseppe Bilotta [Sat, 28 Nov 2020 21:26:29 +0000 (22:26 +0100)] 
Improve single-property output management

Warn that we only support one --prop specification, refactor cleanup and
use it wherever necessary.

3 years agoTry RTLD_DEFAULT macro before hardcoded value
Jan Beich [Thu, 26 Nov 2020 17:54:40 +0000 (17:54 +0000)] 
Try RTLD_DEFAULT macro before hardcoded value

On BSD-like and Solaris-like systems RTLD_DEFAULT is ((void *) -2)

3 years agoMore device_info_bitfield refactoring
Giuseppe Bilotta [Thu, 26 Nov 2020 20:05:47 +0000 (21:05 +0100)] 
More device_info_bitfield refactoring

This series involves the entries whose human version presents nested
Yes/No entries instead of a list of values.

The name for the “cooked” presentation of the SVM capabilities in the
JSON file is changed from "type" to "capabilities", which is the correct
one.

3 years agoRefactor bitfield handling
Giuseppe Bilotta [Thu, 26 Nov 2020 19:26:59 +0000 (20:26 +0100)] 
Refactor bitfield handling

They all use the same mechanism, so no reason not to share code.

3 years agoSuppress sparse warnings
Giuseppe Bilotta [Thu, 26 Nov 2020 17:32:48 +0000 (18:32 +0100)] 
Suppress sparse warnings

Most are about mixing initialization and code, but a suspicious NULL
usage warning was actually quite relevant.

3 years agoDocument the Android wrapper script generation
Giuseppe Bilotta [Thu, 26 Nov 2020 08:03:29 +0000 (09:03 +0100)] 
Document the Android wrapper script generation

3 years agoMore Android support improvements
Giuseppe Bilotta [Wed, 25 Nov 2020 13:27:07 +0000 (14:27 +0100)] 
More Android support improvements

The vendor path can now be overridden, and `clinfo` is now a wrapper
for the actual executable (`clinfo.real`) that sets the LD_LIBRARY_PATH
appropriately.

3 years agoJSON: add ICDL detected version as custom property
Giuseppe Bilotta [Tue, 24 Nov 2020 22:45:00 +0000 (23:45 +0100)] 
JSON: add ICDL detected version as custom property

3 years agoReorder some platform info
Giuseppe Bilotta [Tue, 24 Nov 2020 22:24:56 +0000 (23:24 +0100)] 
Reorder some platform info

Particularly important is the retrieval of the extension information
before anything that may depend on it.

3 years agoAutodetect Android
Giuseppe Bilotta [Mon, 23 Nov 2020 17:15:48 +0000 (18:15 +0100)] 
Autodetect Android

3 years agoDocument --json command-line option
Giuseppe Bilotta [Mon, 23 Nov 2020 07:31:30 +0000 (08:31 +0100)] 
Document --json command-line option

3 years agoJSON: convert most properties
Giuseppe Bilotta [Sun, 22 Nov 2020 22:15:43 +0000 (23:15 +0100)] 
JSON: convert most properties

3 years agoJSON: some handling of non-string values
Giuseppe Bilotta [Sat, 21 Nov 2020 17:56:46 +0000 (18:56 +0100)] 
JSON: some handling of non-string values

3 years agoIntroduce JSON output format
Giuseppe Bilotta [Sun, 22 Nov 2020 19:50:02 +0000 (20:50 +0100)] 
Introduce JSON output format

Currently every value is just the JSON string version of what would be
printed. Specialized versions are going to be introduced in the next
commits.

3 years agoGet rid of bufcpy and add_separator
Giuseppe Bilotta [Sun, 22 Nov 2020 14:43:18 +0000 (15:43 +0100)] 
Get rid of bufcpy and add_separator

3 years agoGet rid of strbuf_printf
Giuseppe Bilotta [Sun, 22 Nov 2020 14:40:34 +0000 (15:40 +0100)] 
Get rid of strbuf_printf

3 years agoNull context strbuf usage
Giuseppe Bilotta [Sun, 22 Nov 2020 14:38:30 +0000 (15:38 +0100)] 
Null context strbuf usage

3 years agoMore strbuf_append work
Giuseppe Bilotta [Sun, 22 Nov 2020 14:09:26 +0000 (15:09 +0100)] 
More strbuf_append work

3 years agoFinish strbuf_append pass for device info
Giuseppe Bilotta [Sun, 22 Nov 2020 14:02:08 +0000 (15:02 +0100)] 
Finish strbuf_append pass for device info

3 years agoMore modernization (GET_VAL + strbuf_append)
Giuseppe Bilotta [Sun, 22 Nov 2020 13:29:50 +0000 (14:29 +0100)] 
More modernization (GET_VAL + strbuf_append)

3 years agoFurther str_append progress and bug fixes
Giuseppe Bilotta [Sun, 22 Nov 2020 12:51:07 +0000 (13:51 +0100)] 
Further str_append progress and bug fixes

3 years agoFurther modernization (GET_VAL + strbuf_append)
Giuseppe Bilotta [Sun, 22 Nov 2020 12:33:40 +0000 (13:33 +0100)] 
Further modernization (GET_VAL + strbuf_append)

3 years agoMore strbuf_append transition
Giuseppe Bilotta [Sun, 22 Nov 2020 11:58:12 +0000 (12:58 +0100)] 
More strbuf_append transition

3 years agoMore strbuf_append and other modernization
Giuseppe Bilotta [Sun, 22 Nov 2020 11:45:20 +0000 (12:45 +0100)] 
More strbuf_append and other modernization

3 years agoIntroduce (and start using) functions to autoexpand a strbuf
Giuseppe Bilotta [Sun, 22 Nov 2020 11:17:41 +0000 (12:17 +0100)] 
Introduce (and start using) functions to autoexpand a strbuf

3 years agoKeep strbuf end up to date on string fetch
Giuseppe Bilotta [Sun, 22 Nov 2020 11:05:21 +0000 (12:05 +0100)] 
Keep strbuf end up to date on string fetch

3 years agoPrime all strbufs to 1024 characters
Giuseppe Bilotta [Sun, 22 Nov 2020 11:02:37 +0000 (12:02 +0100)] 
Prime all strbufs to 1024 characters

3 years agoIntroduce function to reset a strbuf
Giuseppe Bilotta [Sun, 22 Nov 2020 10:54:22 +0000 (11:54 +0100)] 
Introduce function to reset a strbuf

3 years agoUpdate time_offset to use GET_VAL
Giuseppe Bilotta [Sun, 22 Nov 2020 09:26:42 +0000 (10:26 +0100)] 
Update time_offset to use GET_VAL

3 years agoDocument -d and --prop in manpage
Giuseppe Bilotta [Sat, 21 Nov 2020 10:01:00 +0000 (11:01 +0100)] 
Document -d and --prop in manpage

3 years agoAllow filtering by property name
Giuseppe Bilotta [Sat, 21 Nov 2020 09:22:04 +0000 (10:22 +0100)] 
Allow filtering by property name

3 years agoMissing frees
Giuseppe Bilotta [Fri, 20 Nov 2020 23:10:45 +0000 (00:10 +0100)] 
Missing frees

3 years agoFix missing initand wrong sizing
Giuseppe Bilotta [Fri, 20 Nov 2020 22:59:19 +0000 (23:59 +0100)] 
Fix missing initand wrong sizing

3 years agoSupport -d without space
Giuseppe Bilotta [Fri, 20 Nov 2020 22:49:49 +0000 (23:49 +0100)] 
Support -d without space

So user can do ./clinfo -d 0:0 as well as ./clinfo -d0:0

3 years agoComment typo
Giuseppe Bilotta [Fri, 20 Nov 2020 22:46:51 +0000 (23:46 +0100)] 
Comment typo

3 years agoMan page typo
Giuseppe Bilotta [Fri, 20 Nov 2020 22:23:22 +0000 (23:23 +0100)] 
Man page typo

3 years agoVersion 3.0.20.11.20 3.0.20.11.20
Giuseppe Bilotta [Fri, 20 Nov 2020 13:04:01 +0000 (14:04 +0100)] 
Version 3.0.20.11.20

3 years agocl_khr_device_uuid support github/provisional-30
Giuseppe Bilotta [Fri, 20 Nov 2020 11:22:42 +0000 (12:22 +0100)] 
cl_khr_device_uuid support

3 years agoSupport for cl_ext_cxx_for_opencl
Giuseppe Bilotta [Fri, 20 Nov 2020 10:35:12 +0000 (11:35 +0100)] 
Support for cl_ext_cxx_for_opencl

3 years agoRearrange some queries based on dependencies
Giuseppe Bilotta [Fri, 20 Nov 2020 10:27:11 +0000 (11:27 +0100)] 
Rearrange some queries based on dependencies

3 years agoUpdate man page
Giuseppe Bilotta [Fri, 20 Nov 2020 10:20:31 +0000 (11:20 +0100)] 
Update man page

3 years agoSupport cl_khr_extended_versioning as platform extension
Giuseppe Bilotta [Fri, 20 Nov 2020 10:12:52 +0000 (11:12 +0100)] 
Support cl_khr_extended_versioning as platform extension

3 years agoSupport cl_khr_extended_versioning as device extension
Giuseppe Bilotta [Fri, 20 Nov 2020 10:08:44 +0000 (11:08 +0100)] 
Support cl_khr_extended_versioning as device extension

3 years agoTypos in comments
Giuseppe Bilotta [Fri, 20 Nov 2020 10:09:56 +0000 (11:09 +0100)] 
Typos in comments

3 years agoCL_DEVICE_LATEST_CONFORMANCE_VERSION_PASSED
Giuseppe Bilotta [Fri, 20 Nov 2020 06:41:24 +0000 (07:41 +0100)] 
CL_DEVICE_LATEST_CONFORMANCE_VERSION_PASSED

3 years agoDevice enqueue support is a bitfield, not a bool
Giuseppe Bilotta [Fri, 20 Nov 2020 06:30:01 +0000 (07:30 +0100)] 
Device enqueue support is a bitfield, not a bool

It has also been renamed from CL_DEVICE_DEVICE_ENQUEUE_SUPPORT to
CL_DEVICE_DEVICE_ENQUEUE_CAPABILITIES.

3 years agoAdd a couple of TODOs
Giuseppe Bilotta [Fri, 20 Nov 2020 00:32:43 +0000 (01:32 +0100)] 
Add a couple of TODOs

3 years ago3.0 OpenCL versions and features
Giuseppe Bilotta [Fri, 20 Nov 2020 00:30:53 +0000 (01:30 +0100)] 
3.0 OpenCL versions and features

3 years agoPreferred work-group size multiple device prop
Giuseppe Bilotta [Fri, 20 Nov 2020 00:27:43 +0000 (01:27 +0100)] 
Preferred work-group size multiple device prop

3 years agoBunch of boolean props
Giuseppe Bilotta [Fri, 20 Nov 2020 00:24:38 +0000 (01:24 +0100)] 
Bunch of boolean props

3 years agoAtomic memory/fences support
Giuseppe Bilotta [Fri, 20 Nov 2020 00:11:57 +0000 (01:11 +0100)] 
Atomic memory/fences support

3 years agoMore «stuff with versions» properties
Giuseppe Bilotta [Thu, 19 Nov 2020 23:47:33 +0000 (00:47 +0100)] 
More «stuff with versions» properties

3 years agoSupport CL_DEVICE_EXTENSIONS_WITH_VERSION and make homogeneous
Giuseppe Bilotta [Thu, 19 Nov 2020 23:43:45 +0000 (00:43 +0100)] 
Support CL_DEVICE_EXTENSIONS_WITH_VERSION and make homogeneous

3 years agoAdd support for CL_PLATFORM_EXTENSIONS_WITH_VERSION
Giuseppe Bilotta [Thu, 19 Nov 2020 23:23:03 +0000 (00:23 +0100)] 
Add support for CL_PLATFORM_EXTENSIONS_WITH_VERSION

3 years agoIntroduce support for CL_{PLATFORM,DEVICE}_NUMERIC_VERSION
Giuseppe Bilotta [Thu, 19 Nov 2020 22:33:37 +0000 (23:33 +0100)] 
Introduce support for CL_{PLATFORM,DEVICE}_NUMERIC_VERSION

3 years agoFuture-proof loader version check
Giuseppe Bilotta [Thu, 19 Nov 2020 21:14:49 +0000 (22:14 +0100)] 
Future-proof loader version check

If the loader claims a version higher than the highest version clinfo
knows about, we should not warn about version mismatches, because we
cannot actually check if what the loader claims is correct or not.

SImilarly, we comparing loader and maximum platform version, we trust
what the loader claims if it's higher than what we know about, but use
our detected version otherwise.

3 years agoAllow specification of single device to show info about
Giuseppe Bilotta [Tue, 17 Nov 2020 20:41:00 +0000 (21:41 +0100)] 
Allow specification of single device to show info about

3 years agoUpdated loader version detection to OpenCL 3.0.
Brice Videau [Thu, 22 Oct 2020 22:15:05 +0000 (22:15 +0000)] 
Updated loader version detection to OpenCL 3.0.

3 years agoFix a typo
bdenhollander [Sat, 10 Oct 2020 18:51:51 +0000 (14:51 -0400)] 
Fix a typo

3 years agoAvoid false positives in extensions detection
Giuseppe Bilotta [Mon, 5 Oct 2020 16:38:31 +0000 (18:38 +0200)] 
Avoid false positives in extensions detection

Pad the extension string with spaces and check for the extension string
surrounded by spaces.

3 years agoAdd architecture ppc64le to travis build
ddeka2910 [Sun, 4 Oct 2020 08:34:43 +0000 (14:04 +0530)] 
Add architecture ppc64le to travis build

3 years agoFix no device handling for checkNullGetDevices
Giuseppe Bilotta [Sun, 5 Jul 2020 19:23:49 +0000 (21:23 +0200)] 
Fix no device handling for checkNullGetDevices

The main issue was that we were updating the non-error buffer, even
though an error condition was present in this case, so error buffer
should have been updated instead.

While we're at it, cleanup the output for this case, pointing out that
no device was found and that we're only tentatively guessing what the
associated platform might be.

4 years agoFix CL_DEVICE_COMPUTE_UNITS_BITFIELD define name
Giuseppe Bilotta [Sun, 3 May 2020 15:33:43 +0000 (17:33 +0200)] 
Fix CL_DEVICE_COMPUTE_UNITS_BITFIELD define name

This is for an Arm extension, but was missing the _ARM suffix. When the
define was added to the official headers, it was done with the correct
name, but I forgot to update it too.

4 years agoImprove Android support
Giuseppe Bilotta [Fri, 10 Apr 2020 11:55:51 +0000 (13:55 +0200)] 
Improve Android support

Extend the default library path to add the vendor libraries
(which is where `libOpenCL.so` is typically found),
and include some documentation on how to build clinfo on Android in a
Termux session.

Running still requires a library search path override due to the
way the Bionic runtime linker works (no DT_RPATH or DT_RUNPATH support).

Android is not autodetected (`uname -s` returns `Linux`) so it has to be
manually specified by the user. (A possible idea would be to look at the
output of `uname -o` in Linux, since this does mention Android.)

4 years agoTypo in Makefile
Giuseppe Bilotta [Fri, 10 Apr 2020 08:34:03 +0000 (10:34 +0200)] 
Typo in Makefile

4 years agoDocument LLVM CommandLine issue
Giuseppe Bilotta [Sun, 29 Mar 2020 14:04:54 +0000 (16:04 +0200)] 
Document LLVM CommandLine issue

4 years agoUpdate documentation about CL_DEVICE_GLOBAL_FREE_MEMORY_AMD
Giuseppe Bilotta [Sun, 29 Mar 2020 13:48:32 +0000 (15:48 +0200)] 
Update documentation about CL_DEVICE_GLOBAL_FREE_MEMORY_AMD

4 years agoPreliminary support for cl_arm_job_slot_selection
Giuseppe Bilotta [Sun, 29 Mar 2020 13:46:30 +0000 (15:46 +0200)] 
Preliminary support for cl_arm_job_slot_selection

4 years agoBetter handling of CL_DEVICE_GLOBAL_FREE_MEMORY_AMD
Giuseppe Bilotta [Sun, 29 Mar 2020 12:54:26 +0000 (14:54 +0200)] 
Better handling of CL_DEVICE_GLOBAL_FREE_MEMORY_AMD

ROCm chooses how many values to return depending on the requested size.
Since we know it returns two at most, let's ask for all of them.

4 years agoImprove support for CL_DEVICE_P2P_DEVICES_AMD
Giuseppe Bilotta [Sun, 29 Mar 2020 12:39:09 +0000 (14:39 +0200)] 
Improve support for CL_DEVICE_P2P_DEVICES_AMD

This property cannot be queried using the standard array query approach
due to the way it's implemented in ROCm (at least the version I have
tried). Work around this by directly querying the array values,
and only doing so when the CL_DEVICE_NUM_P2P_DEVICES_AMD query
returned a positive value.

4 years agoMissing attribute from cl_amd_device_attribute_query
Giuseppe Bilotta [Fri, 27 Dec 2019 18:50:09 +0000 (19:50 +0100)] 
Missing attribute from cl_amd_device_attribute_query

4 years agoHow to report missing information
Giuseppe Bilotta [Thu, 12 Dec 2019 22:11:29 +0000 (23:11 +0100)] 
How to report missing information

4 years agoAdd a TODO
Giuseppe Bilotta [Thu, 11 Jul 2019 14:51:04 +0000 (16:51 +0200)] 
Add a TODO

5 years agoIt should be kernel void, not void kernel
Giuseppe Bilotta [Sun, 17 Mar 2019 21:24:24 +0000 (22:24 +0100)] 
It should be kernel void, not void kernel

Most platforms don't care, but apparently Vivante does.

Closes GitHub issue #41.

5 years agoFixes for cl_arm_core_id
Giuseppe Bilotta [Wed, 12 Dec 2018 13:50:48 +0000 (14:50 +0100)] 
Fixes for cl_arm_core_id

5 years agocl_intel_dx9_media_sharing values are not consecutive
Giuseppe Bilotta [Thu, 11 Oct 2018 12:48:26 +0000 (14:48 +0200)] 
cl_intel_dx9_media_sharing values are not consecutive

Split their enumeration so we can keep the ranged search during
printout.

5 years agoTentative support for cl_arm_core_id v2
Giuseppe Bilotta [Tue, 14 Aug 2018 07:03:55 +0000 (09:03 +0200)] 
Tentative support for cl_arm_core_id v2

5 years agoUpdate fetch script for Windows CI
Giuseppe Bilotta [Thu, 7 Jun 2018 18:49:05 +0000 (20:49 +0200)] 
Update fetch script for Windows CI

5 years agoPrepare for new unified headers from Khronos
Giuseppe Bilotta [Thu, 7 Jun 2018 18:30:38 +0000 (20:30 +0200)] 
Prepare for new unified headers from Khronos

5 years agoBetter support for OpenCL 1.0 platforms and devices
Giuseppe Bilotta [Thu, 7 Jun 2018 17:59:55 +0000 (19:59 +0200)] 
Better support for OpenCL 1.0 platforms and devices

6 years agoOne-liner to find faulty platforms
Giuseppe Bilotta [Wed, 25 Apr 2018 15:24:43 +0000 (17:24 +0200)] 
One-liner to find faulty platforms

6 years agoAdd a note about platforms causing a segmentation fault
Giuseppe Bilotta [Wed, 25 Apr 2018 15:11:22 +0000 (17:11 +0200)] 
Add a note about platforms causing a segmentation fault

6 years agoVersion 2.2.18.04.06 2.2.18.04.06
Giuseppe Bilotta [Fri, 6 Apr 2018 05:50:01 +0000 (07:50 +0200)] 
Version 2.2.18.04.06

6 years agoFix a typo github/diri origin/diri
Kristofer Rye [Thu, 5 Apr 2018 22:09:09 +0000 (17:09 -0500)] 
Fix a typo

6 years agoTune hex format specifier
Giuseppe Bilotta [Tue, 3 Apr 2018 20:42:23 +0000 (22:42 +0200)] 
Tune hex format specifier

Use "%#" instead of "0x%", and use lowercase hex everywhere.

6 years agoFixup floating-point support output/fetch
Giuseppe Bilotta [Tue, 3 Apr 2018 20:33:44 +0000 (22:33 +0200)] 
Fixup floating-point support output/fetch

In the reorganization, it was being printed unconditionally even in raw
mode, where we only want to output it only when it's expected. Split
the DINFO in HUMAN vs RAW to achieve this now.

6 years agoUn-globalize platform_sname_maxlen
Giuseppe Bilotta [Tue, 3 Apr 2018 19:12:38 +0000 (21:12 +0200)] 
Un-globalize platform_sname_maxlen

6 years agoUn-globalize maxdevs
Giuseppe Bilotta [Tue, 3 Apr 2018 19:06:46 +0000 (21:06 +0200)] 
Un-globalize maxdevs

6 years agoUn-globalize icdl properties
Giuseppe Bilotta [Tue, 3 Apr 2018 19:04:33 +0000 (21:04 +0200)] 
Un-globalize icdl properties

6 years agoUn-globalize max_plat_version
Giuseppe Bilotta [Tue, 3 Apr 2018 18:55:56 +0000 (20:55 +0200)] 
Un-globalize max_plat_version

6 years agomacOS and its stupid different include paths
Giuseppe Bilotta [Mon, 2 Apr 2018 15:27:50 +0000 (17:27 +0200)] 
macOS and its stupid different include paths

6 years agocond_prop_mode should be ignored in brief mode
Giuseppe Bilotta [Mon, 2 Apr 2018 14:08:58 +0000 (16:08 +0200)] 
cond_prop_mode should be ignored in brief mode

6 years agoUse printPlatformDevices for offline devices too
Giuseppe Bilotta [Mon, 2 Apr 2018 14:06:30 +0000 (16:06 +0200)] 
Use printPlatformDevices for offline devices too