Hello community, here is the log from the commit of package clinfo for openSUSE:Factory checked in at 2017-10-10 11:42:42 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/clinfo (Old) and /work/SRC/openSUSE:Factory/.clinfo.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "clinfo" Tue Oct 10 11:42:42 2017 rev:7 rq:532810 version:2.2.17.08.25 Changes: -------- --- /work/SRC/openSUSE:Factory/clinfo/clinfo.changes 2017-07-24 12:33:18.342039013 +0200 +++ /work/SRC/openSUSE:Factory/.clinfo.new/clinfo.changes 2017-10-10 11:42:44.404121405 +0200 @@ -0,0 +1,17 @@ + +------------------------------------------------------------------- +Sun Oct 1 14:45:03 UTC 2017 - mar...@gmx.de + +- Update to version 2.2.17.08.25 + * Version 2.2.17.08.25 + * Switch to annotated tags + * Provide a `make install` target + * Check for extra bits in some bitfields + * Preliminary support for cl_khr_terminate_context + * Declare support for OpenCL 2.x experimental + * Actually add support for cl_khr_subgroup_named_barrier property + * Add tentative missing defines for cl_khr_terminate_context + * Defines for cl_khr_subgroup_named_barrier +- Add patch: + * 0001-fix-manpage-target.patch + Old: ---- clinfo-2.2.17.06.14.tar.gz New: ---- 0001-fix-manpage-target.patch clinfo-2.2.17.08.25.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ clinfo.spec ++++++ --- /var/tmp/diff_new_pack.rzWqCQ/_old 2017-10-10 11:42:45.028094018 +0200 +++ /var/tmp/diff_new_pack.rzWqCQ/_new 2017-10-10 11:42:45.032093843 +0200 @@ -18,13 +18,14 @@ Name: clinfo -Version: 2.2.17.06.14 +Version: 2.2.17.08.25 Release: 0 Summary: Utility that reports status information for all installed OpenCL ICDs License: SUSE-Public-Domain Group: Productivity/Other Url: https://github.com/Oblomov/clinfo/ Source: https://github.com/Oblomov/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz +Patch0: 0001-fix-manpage-target.patch BuildRequires: opencl-headers BuildRequires: pkgconfig(OpenCL) @@ -38,16 +39,15 @@ %prep %setup -q +%patch0 -p1 %build export CFLAGS="%{optflags}" make %{?_smp_mflags} %install -install -D -p -m 0755 clinfo \ - %{buildroot}%{_bindir}/clinfo -install -D -p -m 0644 man/clinfo.1 \ - %{buildroot}%{_mandir}/man1/clinfo.1 +export PREFIX="%{buildroot}/%{_prefix}" MANDIR="%{buildroot}/%{_mandir}" +%makeinstall %files %defattr (-,root,root) ++++++ 0001-fix-manpage-target.patch ++++++ >From f98c9ede8e06ca52b7c86c4c9a320e00c66d22ab Mon Sep 17 00:00:00 2001 From: Martin Kelly <mke...@xevo.com> Date: Fri, 22 Sep 2017 17:24:03 -0700 Subject: [PATCH] fix manpage target Currently, make install fails with this message: make: *** No rule to make target 'man1/clinfo.1', needed by '/usr/local/man/man1/clinfo.1'. Stop. Fix this by renaming the man directory to be the man1 directory. --- {man => man1}/clinfo.1 | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {man => man1}/clinfo.1 (100%) diff --git a/man/clinfo.1 b/man1/clinfo.1 similarity index 100% rename from man/clinfo.1 rename to man1/clinfo.1 -- 2.13.5 ++++++ clinfo-2.2.17.06.14.tar.gz -> clinfo-2.2.17.08.25.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clinfo-2.2.17.06.14/Makefile new/clinfo-2.2.17.08.25/Makefile --- old/clinfo-2.2.17.06.14/Makefile 2017-06-14 00:44:50.000000000 +0200 +++ new/clinfo-2.2.17.08.25/Makefile 2017-08-25 12:50:00.000000000 +0200 @@ -1,5 +1,8 @@ # Headers +PROG = clinfo +MAN = man1/$(PROG).1 + HDR = src/error.h \ src/ext.h \ src/fmtmacros.h \ @@ -17,6 +20,13 @@ # BSD make does not define RM RM ?= rm -f +# Installation paths and modes +PREFIX ?= /usr/local +BINDIR ?= $(PREFIX)/bin +BINMODE ?= 555 +MANDIR ?= $(PREFIX)/man +MANMODE ?= 444 + # Common library includes LDLIBS = -lOpenCL -ldl @@ -29,14 +39,35 @@ # Remove -lOpenCL if OS is Darwin LDLIBS := $(LDLIBS:$(LDLIBS_${OS}_exclude)=) -clinfo: clinfo.o -clinfo.o: clinfo.c $(HDR) +# +# Standard targets +# + +$(PROG): $(PROG).o + +$(PROG).o: $(PROG).c $(HDR) clean: - $(RM) clinfo.o clinfo + $(RM) $(PROG).o $(PROG) + +$(BINDIR): + install -d $@ + +$(MANDIR)/man1: + install -d $@ -sparse: clinfo.c +$(BINDIR)/$(PROG): $(PROG) $(BINDIR) + install -p -m $(BINMODE) $(PROG) $@ + +$(MANDIR)/$(MAN): $(MAN) $(MANDIR)/man1 + install -p -m $(MANMODE) $(MAN) $@ + +install: $(BINDIR)/$(PROG) $(MANDIR)/$(MAN) + + +sparse: $(PROG).c $(SPARSE) $(CPPFLAGS) $(CFLAGS) $(SPARSEFLAGS) $^ -.PHONY: clean sparse + +.PHONY: clean sparse install diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clinfo-2.2.17.06.14/man/clinfo.1 new/clinfo-2.2.17.08.25/man/clinfo.1 --- old/clinfo-2.2.17.06.14/man/clinfo.1 2017-06-14 00:44:50.000000000 +0200 +++ new/clinfo-2.2.17.08.25/man/clinfo.1 2017-08-25 12:50:00.000000000 +0200 @@ -1,4 +1,4 @@ -.TH CLINFO 1 "2017-06-14" "clinfo 2.2.17.06.14" +.TH CLINFO 1 "2017-08-25" "clinfo 2.2.17.08.25" .SH NAME @@ -62,6 +62,12 @@ .B cl_khr_icd for the suffix of vendor extensions functions; .TP +.B cl_khr_subgroup_named_barrier +for the maximum number of named sub-group barriers; +.TP +.B cl_khr_terminate_context +for the terminate capabilities for the device; +.TP .B cl_ext_device_fission for device fission support in OpenCL 1.1 devices; .TP @@ -150,7 +156,12 @@ .SH EXPERIMENTAL FEATURES .P -Support for OpenCL 2.0 and OpenCL 2.1 properties is not fully tested. +Support for OpenCL 2.x properties is not fully tested. + +.P +Support for +.B cl_khr_subgroup_named_barrier +is experimental due to missing definitions in the official OpenCL headers. .P Raw (machine-parsable) output is considered experimental, the output format diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clinfo-2.2.17.06.14/new-version.sh new/clinfo-2.2.17.08.25/new-version.sh --- old/clinfo-2.2.17.06.14/new-version.sh 2017-06-14 00:44:50.000000000 +0200 +++ new/clinfo-2.2.17.08.25/new-version.sh 2017-08-25 12:50:00.000000000 +0200 @@ -20,5 +20,5 @@ sed -i -e "/clinfo version/ s/version \S\+\"/version $VERSION\"/" src/clinfo.c sed -i -e "1 s/\".\+$/\"$DATE\" \"clinfo $VERSION\"/" man/clinfo.1 -git commit -m "Version $VERSION" -e -a && git tag $VERSION +git commit -m "Version $VERSION" -e -a && git tag -m "Version $VERSION" $VERSION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clinfo-2.2.17.06.14/src/clinfo.c new/clinfo-2.2.17.08.25/src/clinfo.c --- old/clinfo-2.2.17.06.14/src/clinfo.c 2017-06-14 00:44:50.000000000 +0200 +++ new/clinfo-2.2.17.08.25/src/clinfo.c 2017-08-25 12:50:00.000000000 +0200 @@ -120,6 +120,8 @@ CL_DEVICE_TYPE_ACCELERATOR, CL_DEVICE_TYPE_CUSTOM, CL_DEVICE_TYPE_ALL }; const size_t devtype_count = ARRAY_SIZE(devtype); +/* number of actual device types, without ALL */ +const size_t actual_devtype_count = ARRAY_SIZE(devtype) - 1; static const char* device_type_str[] = { unk, "Default", "CPU", "GPU", "Accelerator", "Custom", "All" }; static const char* device_type_raw_str[] = { unk, @@ -173,6 +175,16 @@ const size_t affinity_domain_count = ARRAY_SIZE(affinity_domain_str); +static const char *terminate_capability_str[] = { + "Context" +}; + +static const char *terminate_capability_raw_str[] = { + "CL_DEVICE_TERMINATE_CAPABILITY_CONTEXT_KHR" +}; + +const size_t terminate_capability_count = ARRAY_SIZE(terminate_capability_str); + static const char* fp_conf_str[] = { "Denormals", "Infinity and NANs", "Round to nearest", "Round to zero", "Round to infinity", "IEEE754-2008 fused multiply-add", @@ -581,6 +593,8 @@ char has_spir[12]; char has_qcom_ext_host_ptr[21]; char has_simultaneous_sharing[30]; + char has_subgroup_named_barrier[30]; + char has_terminate_context[25]; cl_uint dev_version; }; @@ -607,6 +621,8 @@ DEFINE_EXT_CHECK(spir) DEFINE_EXT_CHECK(qcom_ext_host_ptr) DEFINE_EXT_CHECK(simultaneous_sharing) +DEFINE_EXT_CHECK(subgroup_named_barrier) +DEFINE_EXT_CHECK(terminate_context) /* In the version checks we negate the opposite conditions * instead of double-negating the actual condition @@ -726,10 +742,11 @@ CHECK_EXT(altera_dev_temp, cl_altera_device_temperature); CHECK_EXT(qcom_ext_host_ptr, cl_qcom_ext_host_ptr); CHECK_EXT(simultaneous_sharing, cl_intel_simultaneous_sharing); + CHECK_EXT(subgroup_named_barrier, cl_khr_subgroup_named_barrier); + CHECK_EXT(terminate_context, cl_khr_terminate_context); } - /* * Device info print functions */ @@ -1049,10 +1066,8 @@ GET_VAL; if (!had_error) { /* iterate over device type strings, appending their textual form - * to strbuf. - * TODO: check for extra bits/no bits - */ - cl_uint i = devtype_count - 1; /* skip CL_DEVICE_TYPE_ALL */ + * to strbuf */ + cl_uint i = actual_devtype_count; const char * const *devstr = (output_mode == CLINFO_HUMAN ? device_type_str : device_type_raw_str); size_t szval = 0; @@ -1067,6 +1082,15 @@ szval += bufcpy(szval, devstr[i]); } } + /* check for extra bits */ + if (szval < bufsz) { + cl_device_type known_mask = ((cl_device_type)(1) << actual_devtype_count) - 1; + cl_device_type extra = val & ~known_mask; + if (extra) { + add_separator(&szval); + szval += snprintf(strbuf + szval, bufsz - szval - 1, "0x%" PRIX64, extra); + } + } } show_strbuf(pname, 0); /* we abuse global strbuf to pass the device type over to the caller */ @@ -1353,9 +1377,7 @@ GET_VAL; if (!had_error && val) { /* iterate over affinity domain strings appending their textual form - * to strbuf - * TODO: check for extra bits/no bits - */ + * to strbuf */ size_t szval = 0; cl_uint i = 0; const char * const *affstr = (output_mode == CLINFO_HUMAN ? @@ -1371,6 +1393,15 @@ if (szval >= bufsz) break; } + /* check for extra bits */ + if (szval < bufsz) { + cl_device_affinity_domain known_mask = ((cl_device_affinity_domain)(1) << affinity_domain_count) - 1; + cl_device_affinity_domain extra = val & ~known_mask; + if (extra) { + add_separator(&szval); + szval += snprintf(strbuf + szval, bufsz - szval - 1, "0x%" PRIX64, extra); + } + } } if (val || had_error) show_strbuf(pname, 0); @@ -1640,6 +1671,46 @@ return had_error; } +/* Device terminate capability */ +int device_info_terminate_capability(cl_device_id dev, cl_device_info param, const char *pname, + const struct device_info_checks* UNUSED(chk)) +{ + cl_device_terminate_capability_khr val; + GET_VAL; + if (!had_error && val) { + /* iterate over terminate capability strings appending their textual form + * to strbuf */ + size_t szval = 0; + cl_uint i = 0; + const char * const *capstr = (output_mode == CLINFO_HUMAN ? + terminate_capability_str : terminate_capability_raw_str); + set_separator(output_mode == CLINFO_HUMAN ? comma_str : vbar_str); + for (i = 0; i < terminate_capability_count; ++i) { + cl_device_terminate_capability_khr cur = (cl_device_terminate_capability_khr)(1) << i; + if (val & cur) { + /* match: add separator if not first match */ + add_separator(&szval); + szval += bufcpy(szval, capstr[i]); + } + if (szval >= bufsz) + break; + } + /* check for extra bits */ + if (szval < bufsz) { + cl_device_terminate_capability_khr known_mask = ((cl_device_terminate_capability_khr)(1) << terminate_capability_count) - 1; + cl_device_terminate_capability_khr extra = val & ~known_mask; + if (extra) { + add_separator(&szval); + szval += snprintf(strbuf + szval, bufsz - szval - 1, "0x%" PRIX64, extra); + } + } + } + if (val || had_error) + show_strbuf(pname, 0); + return had_error; +} + + /* * Device info traits */ @@ -1721,6 +1792,7 @@ { CLINFO_BOTH, DINFO(CL_DEVICE_WARP_SIZE_NV, "Warp size (NV)", int), dev_has_nv }, { CLINFO_BOTH, DINFO(CL_DEVICE_WAVEFRONT_WIDTH_AMD, "Wavefront width (AMD)", int), dev_is_gpu_amd }, { CLINFO_BOTH, DINFO(CL_DEVICE_MAX_NUM_SUB_GROUPS, "Max sub-groups per work group", int), dev_is_21 }, + { CLINFO_BOTH, DINFO(CL_DEVICE_MAX_NAMED_BARRIER_COUNT_KHR, "Max named sub-group barriers", int), dev_has_subgroup_named_barrier }, { CLINFO_BOTH, DINFO(CL_DEVICE_SUB_GROUP_SIZES_INTEL, "Sub-group sizes (Intel)", szptr), dev_has_intel_required_subgroup_size }, /* Preferred/native vector widths: header is only presented in HUMAN case, that also pairs @@ -1841,6 +1913,9 @@ { CLINFO_BOTH, DINFO(CL_DEVICE_MAX_ON_DEVICE_QUEUES, "Max queues on device", int), dev_is_20 }, { CLINFO_BOTH, DINFO(CL_DEVICE_MAX_ON_DEVICE_EVENTS, "Max events on device", int), dev_is_20 }, + /* Terminate context */ + { CLINFO_BOTH, DINFO(CL_DEVICE_TERMINATE_CAPABILITY_KHR, "Terminate capability", terminate_capability), dev_has_terminate_context }, + /* Interop */ { CLINFO_BOTH, DINFO(CL_DEVICE_PREFERRED_INTEROP_USER_SYNC, "Prefer user sync for interop", bool), dev_is_12 }, { CLINFO_BOTH, DINFO(CL_DEVICE_NUM_SIMULTANEOUS_INTEROPS_INTEL, "Number of simulataneous interops (Intel)", int), dev_has_simultaneous_sharing }, @@ -2665,7 +2740,7 @@ void version(void) { - puts("clinfo version 2.2.17.06.14"); + puts("clinfo version 2.2.17.08.25"); } void usage(void) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clinfo-2.2.17.06.14/src/ext.h new/clinfo-2.2.17.08.25/src/ext.h --- old/clinfo-2.2.17.06.14/src/ext.h 2017-06-14 00:44:50.000000000 +0200 +++ new/clinfo-2.2.17.08.25/src/ext.h 2017-08-25 12:50:00.000000000 +0200 @@ -74,6 +74,15 @@ /* cl_khr_terminate_context */ #define CL_DEVICE_TERMINATE_CAPABILITY_KHR 0x200F +/* TODO: I cannot find official definitions for these, + * so I'm currently extrapolating them from the specification + */ +typedef cl_bitfield cl_device_terminate_capability_khr; +#define CL_DEVICE_TERMINATE_CAPABILITY_CONTEXT_KHR (1<<0) + +/* cl_khr_subgroup_named_barrier */ +#define CL_DEVICE_MAX_NAMED_BARRIER_COUNT_KHR 0x2035 + /* cl_nv_device_attribute_query */ #define CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV 0x4000 #define CL_DEVICE_COMPUTE_CAPABILITY_MINOR_NV 0x4001