Hello community, here is the log from the commit of package clinfo for openSUSE:Factory checked in at 2017-05-08 19:03:01 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/clinfo (Old) and /work/SRC/openSUSE:Factory/.clinfo.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "clinfo" Mon May 8 19:03:01 2017 rev:5 rq:492919 version:2.1.17.02.09 Changes: -------- --- /work/SRC/openSUSE:Factory/clinfo/clinfo.changes 2016-01-28 17:24:41.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.clinfo.new/clinfo.changes 2017-05-08 19:03:51.333011633 +0200 @@ -1,0 +2,6 @@ +Fri Feb 17 20:41:04 UTC 2017 - mplus...@suse.com + +- Update to version 2.1.17.02.09: + * no upstream changelog provided + +------------------------------------------------------------------- Old: ---- clinfo-2.1.16.01.12.tar.gz New: ---- clinfo-2.1.17.02.09.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ clinfo.spec ++++++ --- /var/tmp/diff_new_pack.Us4S5Z/_old 2017-05-08 19:03:52.104902591 +0200 +++ /var/tmp/diff_new_pack.Us4S5Z/_new 2017-05-08 19:03:52.108902026 +0200 @@ -1,7 +1,7 @@ # # spec file for package clinfo # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2015, Martin Hauke <mar...@gmx.de> # # All modifications and additions to the file contributed by third parties @@ -18,16 +18,15 @@ Name: clinfo -Version: 2.1.16.01.12 +Version: 2.1.17.02.09 Release: 0 -Summary: It reports status information for all installed OpenCL ICDs +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 BuildRequires: opencl-headers BuildRequires: pkgconfig(OpenCL) -BuildRoot: %{_tmppath}/%{name}-%{version}-build %description A simple OpenCL application that enumerates all possible platform and @@ -45,8 +44,10 @@ 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 +install -D -p -m 0755 clinfo \ + %{buildroot}%{_bindir}/clinfo +install -D -p -m 0644 man/clinfo.1 \ + %{buildroot}%{_mandir}/man1/clinfo.1 %files %defattr (-,root,root) ++++++ clinfo-2.1.16.01.12.tar.gz -> clinfo-2.1.17.02.09.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clinfo-2.1.16.01.12/.travis.yml new/clinfo-2.1.17.02.09/.travis.yml --- old/clinfo-2.1.16.01.12/.travis.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/clinfo-2.1.17.02.09/.travis.yml 2017-02-09 16:56:08.000000000 +0100 @@ -0,0 +1,18 @@ +os: + - linux + - osx + +dist: trusty +addons: + apt: + sources: + - sourceline: "deb http://archive.ubuntu.com/ubuntu trusty universe" + packages: + - ocl-icd-opencl-dev + +language: c +compiler: + - gcc + - clang + +script: make && ./clinfo diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clinfo-2.1.16.01.12/GNUmakefile new/clinfo-2.1.17.02.09/GNUmakefile --- old/clinfo-2.1.16.01.12/GNUmakefile 1970-01-01 01:00:00.000000000 +0100 +++ new/clinfo-2.1.17.02.09/GNUmakefile 2017-02-09 16:56:08.000000000 +0100 @@ -0,0 +1,7 @@ +# GNU Make specifics + +OS := $(shell uname -s) + +include Makefile + + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clinfo-2.1.16.01.12/LICENSE new/clinfo-2.1.17.02.09/LICENSE --- old/clinfo-2.1.16.01.12/LICENSE 2016-01-12 11:51:23.000000000 +0100 +++ new/clinfo-2.1.17.02.09/LICENSE 2017-02-09 16:56:08.000000000 +0100 @@ -1,3 +1,8 @@ -The code is released in the public domain, but you are encouraged to -share any changes you make. +clinfo by Giuseppe Bilotta +To the extent possible under law, the person who associated CC0 with +clinfo has waived all copyright and related or neighboring rights +to clinfo. + +You should have received a copy of the CC0 legalcode along with this +work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clinfo-2.1.16.01.12/Makefile new/clinfo-2.1.17.02.09/Makefile --- old/clinfo-2.1.16.01.12/Makefile 2016-01-12 11:51:23.000000000 +0100 +++ new/clinfo-2.1.17.02.09/Makefile 2017-02-09 16:56:08.000000000 +0100 @@ -1,27 +1,35 @@ -SRCDIR=src +# Headers -VPATH=$(SRCDIR) +HDR = src/error.h \ + src/ext.h \ + src/fmtmacros.h \ + src/memory.h \ + src/ms_support.h \ + src/strbuf.h -HDR=$(wildcard $(SRCDIR)/*.h) +VPATH = src -PLATFORM=$(shell uname -s) +CFLAGS += -std=c99 -g -Wall -Wextra -pedantic -ifeq ($(PLATFORM),Darwin) - LDLIBS=-framework OpenCL -else - LDLIBS=-lOpenCL -endif +SPARSE ?= sparse +SPARSEFLAGS=-Wsparse-all -Wno-decl -ifeq ($(PLATFORM),Linux) - LDLIBS += -ldl -endif +# BSD make does not define RM +RM ?= rm -f -CFLAGS+=-std=c99 -g -Wall -Wextra +# Common library includes +LDLIBS = -lOpenCL -ldl -SPARSE ?= sparse -SPARSEFLAGS=-Wsparse-all -Wno-decl +# OS-specific library includes +LDLIBS_Darwin = -framework OpenCL +LDLIBS_Darwin_exclude = -lOpenCL + +LDLIBS += $(LDLIBS_${OS}) + +# Remove -lOpenCL if OS is Darwin +LDLIBS := $(LDLIBS:$(LDLIBS_${OS}_exclude)=) -clinfo: +clinfo: clinfo.o clinfo.o: clinfo.c $(HDR) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clinfo-2.1.16.01.12/legalcode.txt new/clinfo-2.1.17.02.09/legalcode.txt --- old/clinfo-2.1.16.01.12/legalcode.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/clinfo-2.1.17.02.09/legalcode.txt 2017-02-09 16:56:08.000000000 +0100 @@ -0,0 +1,121 @@ +Creative Commons Legal Code + +CC0 1.0 Universal + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE + LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN + ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS + INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES + REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS + PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM + THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED + HEREUNDER. + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer +exclusive Copyright and Related Rights (defined below) upon the creator +and subsequent owner(s) (each and all, an "owner") of an original work of +authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for +the purpose of contributing to a commons of creative, cultural and +scientific works ("Commons") that the public can reliably and without fear +of later claims of infringement build upon, modify, incorporate in other +works, reuse and redistribute as freely as possible in any form whatsoever +and for any purposes, including without limitation commercial purposes. +These owners may contribute to the Commons to promote the ideal of a free +culture and the further production of creative, cultural and scientific +works, or to gain reputation or greater distribution for their Work in +part through the use and efforts of others. + +For these and/or other purposes and motivations, and without any +expectation of additional consideration or compensation, the person +associating CC0 with a Work (the "Affirmer"), to the extent that he or she +is an owner of Copyright and Related Rights in the Work, voluntarily +elects to apply CC0 to the Work and publicly distribute the Work under its +terms, with knowledge of his or her Copyright and Related Rights in the +Work and the meaning and intended legal effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be +protected by copyright and related or neighboring rights ("Copyright and +Related Rights"). Copyright and Related Rights include, but are not +limited to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, + communicate, and translate a Work; + ii. moral rights retained by the original author(s) and/or performer(s); +iii. publicity and privacy rights pertaining to a person's image or + likeness depicted in a Work; + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + v. rights protecting the extraction, dissemination, use and reuse of data + in a Work; + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation + thereof, including any amended or successor version of such + directive); and +vii. other similar, equivalent or corresponding rights throughout the + world based on applicable law or treaty, and any national + implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention +of, applicable law, Affirmer hereby overtly, fully, permanently, +irrevocably and unconditionally waives, abandons, and surrenders all of +Affirmer's Copyright and Related Rights and associated claims and causes +of action, whether now known or unknown (including existing as well as +future claims and causes of action), in the Work (i) in all territories +worldwide, (ii) for the maximum duration provided by applicable law or +treaty (including future time extensions), (iii) in any current or future +medium and for any number of copies, and (iv) for any purpose whatsoever, +including without limitation commercial, advertising or promotional +purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each +member of the public at large and to the detriment of Affirmer's heirs and +successors, fully intending that such Waiver shall not be subject to +revocation, rescission, cancellation, termination, or any other legal or +equitable action to disrupt the quiet enjoyment of the Work by the public +as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason +be judged legally invalid or ineffective under applicable law, then the +Waiver shall be preserved to the maximum extent permitted taking into +account Affirmer's express Statement of Purpose. In addition, to the +extent the Waiver is so judged Affirmer hereby grants to each affected +person a royalty-free, non transferable, non sublicensable, non exclusive, +irrevocable and unconditional license to exercise Affirmer's Copyright and +Related Rights in the Work (i) in all territories worldwide, (ii) for the +maximum duration provided by applicable law or treaty (including future +time extensions), (iii) in any current or future medium and for any number +of copies, and (iv) for any purpose whatsoever, including without +limitation commercial, advertising or promotional purposes (the +"License"). The License shall be deemed effective as of the date CC0 was +applied by Affirmer to the Work. Should any part of the License for any +reason be judged legally invalid or ineffective under applicable law, such +partial invalidity or ineffectiveness shall not invalidate the remainder +of the License, and in such case Affirmer hereby affirms that he or she +will not (i) exercise any of his or her remaining Copyright and Related +Rights in the Work or (ii) assert any associated claims and causes of +action with respect to the Work, in either case contrary to Affirmer's +express Statement of Purpose. + +4. Limitations and Disclaimers. + + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + b. Affirmer offers the Work as-is and makes no representations or + warranties of any kind concerning the Work, express, implied, + statutory or otherwise, including without limitation warranties of + title, merchantability, fitness for a particular purpose, non + infringement, or the absence of latent or other defects, accuracy, or + the present or absence of errors, whether or not discoverable, all to + the greatest extent permissible under applicable law. + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without + limitation any person's Copyright and Related Rights in the Work. + Further, Affirmer disclaims responsibility for obtaining any necessary + consents, permissions or other rights required for any use of the + Work. + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to + this CC0 or use of the Work. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clinfo-2.1.16.01.12/man/clinfo.1 new/clinfo-2.1.17.02.09/man/clinfo.1 --- old/clinfo-2.1.16.01.12/man/clinfo.1 2016-01-12 11:51:23.000000000 +0100 +++ new/clinfo-2.1.17.02.09/man/clinfo.1 2017-02-09 16:56:08.000000000 +0100 @@ -1,4 +1,4 @@ -.TH CLINFO 1 "2016-01-12" "clinfo 2.1.16.01.12" +.TH CLINFO 1 "2017-02-09" "clinfo 2.1.17.02.09" .SH NAME @@ -79,6 +79,8 @@ option); .TP .B cl_amd_svm +.TQ +.B cl_arm_shared_virtual_memory for Shared Virtual Memory (SVM) capabilities in OpenCL 1.2 devices; .TP .B cl_nv_device_attribute_query @@ -91,9 +93,18 @@ .B cl_intel_advanced_motion_estimation for the version of the Intel Motion Estimation accelerator version; .TP +.B cl_intel_device_side_avc_motion_estimation +for the version and supported features of Intel's device-side AVC Motion; +.TP +.B cl_intel_planar_yuv +for the maximum dimensions of planar YUV images; +.TP .B cl_intel_simultaneous_sharing for simultaneous CL/GL/DirectX context sharing (only partial support); .TP +.B cl_intel_required_subgroup_size +to enumerate allowed sub-group sizes; +.TP .B cl_altera_device_temperature for the Altera extension to query the core temperature of the device; .TP diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clinfo-2.1.16.01.12/src/clinfo.c new/clinfo-2.1.17.02.09/src/clinfo.c --- old/clinfo-2.1.16.01.12/src/clinfo.c 2016-01-12 11:51:23.000000000 +0100 +++ new/clinfo-2.1.17.02.09/src/clinfo.c 2017-02-09 16:56:08.000000000 +0100 @@ -10,6 +10,13 @@ #define RTLD_DEFAULT ((void*)0) #endif +/* ISO C forbids assignments between function pointers and void pointers, + * but POSIX allows it. To compile without warnings even in -pedantic mode, + * we use this horrible trick to get a function address from + * clGetExtensionFunctionAddress + */ +#define PTR_FUNC_PTR *(void**)& + /* Load STDC format macros (PRI*), or define them * for those crappy, non-standard compilers */ @@ -191,11 +198,15 @@ const size_t svm_cap_count = ARRAY_SIZE(svm_cap_str); +/* SI suffixes for memory sizes. Note that in OpenCL most of them are + * passed via a cl_ulong, which at most can mode 16 EiB, but hey, + * let's be forward-thinking ;-) + */ static const char* memsfx[] = { - "B", "KiB", "MiB", "GiB", "TiB" + "B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB" }; -const size_t memsfx_count = ARRAY_SIZE(memsfx); +const size_t memsfx_end = ARRAY_SIZE(memsfx) + 1; static const char* lmem_type_str[] = { none, "Local", "Global" }; static const char* lmem_type_raw_str[] = { none_raw, "CL_LOCAL", "CL_GLOBAL" }; @@ -308,16 +319,7 @@ int platform_info_str(cl_platform_id pid, cl_platform_info param, const char* pname, const struct platform_info_checks * chk UNUSED) { - error = clGetPlatformInfo(pid, param, 0, NULL, &nusz); - if (nusz > bufsz) { - REALLOC(strbuf, nusz, current_param); - bufsz = nusz; - } - had_error = REPORT_ERROR2("get %s size"); - if (!had_error) { - error = clGetPlatformInfo(pid, param, bufsz, strbuf, NULL); - had_error = REPORT_ERROR2("get %s"); - } + GET_STRING2(clGetPlatformInfo, pid, param); /* when only listing, do not print anything we're just gathering * information */ @@ -501,11 +503,18 @@ /* for a program build failure, dump the log to stderr before bailing */ if (error == CL_BUILD_PROGRAM_FAILURE) { + /* Do not clobber strbuf, shadow it */ + char *strbuf = NULL; + size_t bufsz = 0, nusz = 0; GET_STRING(clGetProgramBuildInfo, CL_PROGRAM_BUILD_LOG, "CL_PROGRAM_BUILD_LOG", prg, dev); if (error == CL_SUCCESS) { + fflush(stdout); + fflush(stderr); fputs("=== CL_PROGRAM_BUILD_LOG ===\n", stderr); fputs(strbuf, stderr); + fflush(stderr); } + free(strbuf); } if (had_error) goto out; @@ -542,16 +551,21 @@ cl_device_mem_cache_type cachetype; cl_device_local_mem_type lmemtype; cl_bool image_support; + cl_bool compiler_available; char has_half[12]; char has_double[24]; char has_nv[29]; char has_amd[30]; - char has_svm_ext[11]; + char has_amd_svm[11]; + char has_arm_svm[29]; char has_fission[22]; char has_atomic_counters[26]; char has_image2d_buffer[27]; char has_intel_local_thread[30]; char has_intel_AME[36]; + char has_intel_AVC_ME[43]; + char has_intel_planar_yuv[20]; + char has_intel_required_subgroup_size[32]; char has_altera_dev_temp[29]; char has_spir[12]; char has_qcom_ext_host_ptr[21]; @@ -568,12 +582,16 @@ DEFINE_EXT_CHECK(double) DEFINE_EXT_CHECK(nv) DEFINE_EXT_CHECK(amd) -DEFINE_EXT_CHECK(svm_ext) +DEFINE_EXT_CHECK(amd_svm) +DEFINE_EXT_CHECK(arm_svm) DEFINE_EXT_CHECK(fission) DEFINE_EXT_CHECK(atomic_counters) DEFINE_EXT_CHECK(image2d_buffer) DEFINE_EXT_CHECK(intel_local_thread) DEFINE_EXT_CHECK(intel_AME) +DEFINE_EXT_CHECK(intel_AVC_ME) +DEFINE_EXT_CHECK(intel_planar_yuv) +DEFINE_EXT_CHECK(intel_required_subgroup_size) DEFINE_EXT_CHECK(altera_dev_temp) DEFINE_EXT_CHECK(spir) DEFINE_EXT_CHECK(qcom_ext_host_ptr) @@ -620,7 +638,7 @@ int dev_has_svm(const struct device_info_checks *chk) { - return dev_is_20(chk) || dev_has_svm_ext(chk); + return dev_is_20(chk) || dev_has_amd_svm(chk); } int dev_has_partition(const struct device_info_checks *chk) @@ -653,6 +671,11 @@ return dev_has_images(chk) && dev_is_20(chk); } +int dev_has_compiler(const struct device_info_checks *chk) +{ + return chk->compiler_available; +} + void identify_device_extensions(const char *extensions, struct device_info_checks *chk) { @@ -677,7 +700,8 @@ CHECK_EXT(double, cl_APPLE_fp64_basic_ops); CHECK_EXT(nv, cl_nv_device_attribute_query); CHECK_EXT(amd, cl_amd_device_attribute_query); - CHECK_EXT(svm_ext, cl_amd_svm); + CHECK_EXT(amd_svm, cl_amd_svm); + CHECK_EXT(arm_svm, cl_arm_shared_virtual_memory); CHECK_EXT(fission, cl_ext_device_fission); CHECK_EXT(atomic_counters, cl_ext_atomic_counters_64); if (dev_has_atomic_counters(chk)) @@ -685,6 +709,9 @@ CHECK_EXT(image2d_buffer, cl_khr_image2d_from_buffer); CHECK_EXT(intel_local_thread, cl_intel_exec_by_local_thread); CHECK_EXT(intel_AME, cl_intel_advanced_motion_estimation); + CHECK_EXT(intel_AVC_ME, cl_intel_device_side_avc_motion_estimation); + CHECK_EXT(intel_planar_yuv, cl_intel_planar_yuv); + CHECK_EXT(intel_required_subgroup_size, cl_intel_required_subgroup_size); 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); @@ -747,16 +774,7 @@ const struct device_info_checks *chk UNUSED) { current_param = pname; - error = clGetDeviceInfo(dev, param, 0, NULL, &nusz); - if (nusz > bufsz) { - REALLOC(strbuf, nusz, current_param); - bufsz = nusz; - } - had_error = REPORT_ERROR2("get %s size"); - if (!had_error) { - error = clGetDeviceInfo(dev, param, bufsz, strbuf, NULL); - had_error = REPORT_ERROR2("get %s"); - } + GET_STRING2(clGetDeviceInfo, dev, param); return had_error; } @@ -808,7 +826,7 @@ { double dbl = val; size_t sfx = 0; - while (dbl > 1024 && sfx < memsfx_count) { + while (dbl > 1024 && sfx < memsfx_end) { dbl /= 1024; ++sfx; } @@ -846,6 +864,21 @@ return had_error; } +int device_info_mem_sz(cl_device_id dev, cl_device_info param, const char *pname, + const struct device_info_checks *chk UNUSED) +{ + size_t val = 0; + size_t szval = 0; + GET_VAL; + if (!had_error) { + szval += sprintf(strbuf, "%zu", val); + if (output_mode == CLINFO_HUMAN && val > 1024) + strbuf_mem(val, szval); + } + show_strbuf(pname, 0); + return had_error; +} + int device_info_free_mem_amd(cl_device_id dev, cl_device_info param, const char *pname, const struct device_info_checks *chk UNUSED) { @@ -951,6 +984,26 @@ return had_error; } +int device_info_img_sz_intel_planar_yuv(cl_device_id dev, cl_device_info param, const char *pname, + const struct device_info_checks *chk UNUSED) +{ + size_t width = 0, height = 0, val = 0; + GET_VAL; /* HEIGHT */ + if (!had_error) { + height = val; + param = CL_DEVICE_PLANAR_YUV_MAX_WIDTH_INTEL; + current_param = "CL_DEVICE_PLANAR_YUV_MAX_WIDTH_INTEL"; + GET_VAL; + if (!had_error) { + width = val; + sprintf(strbuf, "%" PRIuS "x%" PRIuS, width, height); + } + } + show_strbuf(pname, 0); + return had_error; +} + + int device_info_img_sz_3d(cl_device_id dev, cl_device_info param, const char *pname, const struct device_info_checks *chk UNUSED) { @@ -1542,8 +1595,8 @@ const struct device_info_checks *chk) { cl_device_svm_capabilities val = 0; - int is_20 = dev_is_20(chk); - int has_svm_ext = dev_has_svm_ext(chk); + const int is_20 = dev_is_20(chk); + const int has_amd_svm = (param == CL_DEVICE_SVM_CAPABILITIES && dev_has_amd_svm(chk)); GET_VAL; @@ -1553,12 +1606,12 @@ const char * const *scstr = (output_mode == CLINFO_HUMAN ? svm_cap_str : svm_cap_raw_str); set_separator(vbar_str); - if (output_mode == CLINFO_HUMAN) { + if (output_mode == CLINFO_HUMAN && param == CL_DEVICE_SVM_CAPABILITIES) { /* show 'why' it's being shown */ szval += sprintf(strbuf, "(%s%s%s)", (is_20 ? core : empty_str), - (is_20 && has_svm_ext ? comma_str : empty_str), - chk->has_svm_ext); + (is_20 && has_amd_svm ? comma_str : empty_str), + chk->has_amd_svm); } for (i = 0; i < svm_cap_count; ++i) { cl_device_svm_capabilities cur = (cl_device_svm_capabilities)(1) << i; @@ -1606,6 +1659,9 @@ { CLINFO_BOTH, DINFO(CL_DEVICE_OPENCL_C_VERSION, "Device OpenCL C Version", str), NULL }, { CLINFO_BOTH, DINFO(CL_DEVICE_EXTENSIONS, "Device Extensions", str_get), NULL }, { CLINFO_BOTH, DINFO(CL_DEVICE_TYPE, "Device Type", devtype), NULL }, + + { CLINFO_BOTH, DINFO(CL_DEVICE_AVAILABLE, "Device Available", bool), NULL }, + { CLINFO_BOTH, DINFO(CL_DEVICE_PROFILE, "Device Profile", str), NULL }, { CLINFO_BOTH, DINFO(CL_DEVICE_BOARD_NAME_AMD, "Device Board Name (AMD)", str), dev_has_amd }, { CLINFO_BOTH, DINFO(CL_DEVICE_TOPOLOGY_AMD, "Device Topology (AMD)", devtopo_amd), dev_has_amd }, @@ -1647,10 +1703,14 @@ { CLINFO_BOTH, DINFO(CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS, "Max work item dimensions", int), NULL }, { CLINFO_BOTH, DINFO(CL_DEVICE_MAX_WORK_ITEM_SIZES, "Max work item sizes", szptr), NULL }, { CLINFO_BOTH, DINFO(CL_DEVICE_MAX_WORK_GROUP_SIZE, "Max work group size", sz), NULL }, - { CLINFO_BOTH, DINFO(CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE, "Preferred work group size multiple", wg), NULL }, + + { CLINFO_BOTH, DINFO(CL_DEVICE_COMPILER_AVAILABLE, "Compiler Available", bool), NULL }, + { CLINFO_BOTH, DINFO(CL_DEVICE_LINKER_AVAILABLE, "Linker Available", bool), dev_is_12 }, + { CLINFO_BOTH, DINFO(CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE, "Preferred work group size multiple", wg), dev_has_compiler }, { 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_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 * PREFERRED and NATIVE in a single line */ @@ -1693,6 +1753,7 @@ { CLINFO_BOTH, DINFO(CL_DEVICE_INTEGRATED_MEMORY_NV, "Integrated memory (NV)", bool), dev_has_nv }, { CLINFO_BOTH, DINFO(CL_DEVICE_SVM_CAPABILITIES, "Shared Virtual Memory (SVM) capabilities", svm_cap), dev_has_svm }, + { CLINFO_BOTH, DINFO(CL_DEVICE_SVM_CAPABILITIES_ARM, "Shared Virtual Memory (SVM) capabilities (ARM)", svm_cap), dev_has_arm_svm }, /* Alignment */ { CLINFO_BOTH, DINFO_SFX(CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE, "Minimum alignment for any data type", bytes_str, int), NULL }, @@ -1714,7 +1775,7 @@ /* Global memory cache */ { CLINFO_BOTH, DINFO(CL_DEVICE_GLOBAL_MEM_CACHE_TYPE, "Global Memory cache type", cachetype), NULL }, - { CLINFO_BOTH, DINFO(CL_DEVICE_GLOBAL_MEM_CACHE_SIZE, "Global Memory cache size", sz), dev_has_cache }, + { CLINFO_BOTH, DINFO(CL_DEVICE_GLOBAL_MEM_CACHE_SIZE, "Global Memory cache size", mem), dev_has_cache }, { CLINFO_BOTH, DINFO_SFX(CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE, "Global Memory cache line", " bytes", int), dev_has_cache }, /* Image support */ @@ -1729,6 +1790,9 @@ { CLINFO_HUMAN, DINFO_SFX(CL_DEVICE_IMAGE2D_MAX_HEIGHT, INDENT "Max 2D image size", pixels_str, img_sz_2d), dev_has_images }, { CLINFO_RAW, DINFO(CL_DEVICE_IMAGE2D_MAX_HEIGHT, INDENT "Max 2D image height", sz), dev_has_images }, { CLINFO_RAW, DINFO(CL_DEVICE_IMAGE2D_MAX_WIDTH, INDENT "Max 2D image width", sz), dev_has_images }, + { CLINFO_HUMAN, DINFO_SFX(CL_DEVICE_PLANAR_YUV_MAX_HEIGHT_INTEL, INDENT "Max planar YUV image size", pixels_str, img_sz_2d), dev_has_intel_planar_yuv }, + { CLINFO_RAW, DINFO(CL_DEVICE_PLANAR_YUV_MAX_HEIGHT_INTEL, INDENT "Max planar YUV image height", sz), dev_has_intel_planar_yuv }, + { CLINFO_RAW, DINFO(CL_DEVICE_PLANAR_YUV_MAX_WIDTH_INTEL, INDENT "Max planar YUV image width", sz), dev_has_intel_planar_yuv }, { CLINFO_HUMAN, DINFO_SFX(CL_DEVICE_IMAGE3D_MAX_HEIGHT, INDENT "Max 3D image size", pixels_str, img_sz_3d), dev_has_images }, { CLINFO_RAW, DINFO(CL_DEVICE_IMAGE3D_MAX_HEIGHT, INDENT "Max 3D image height", sz), dev_has_images }, { CLINFO_RAW, DINFO(CL_DEVICE_IMAGE3D_MAX_WIDTH, INDENT "Max 3D image width", sz), dev_has_images }, @@ -1774,7 +1838,7 @@ */ /* Profiling resolution */ - { CLINFO_BOTH, DINFO_SFX(CL_DEVICE_PROFILING_TIMER_RESOLUTION, "Profiling timer resolution", "ns", long), NULL }, + { CLINFO_BOTH, DINFO_SFX(CL_DEVICE_PROFILING_TIMER_RESOLUTION, "Profiling timer resolution", "ns", sz), NULL }, { CLINFO_HUMAN, DINFO(CL_DEVICE_PROFILING_TIMER_OFFSET_AMD, "Profiling timer offset since Epoch (AMD)", time_offset), dev_has_amd }, { CLINFO_RAW, DINFO(CL_DEVICE_PROFILING_TIMER_OFFSET_AMD, "Profiling timer offset since Epoch (AMD)", long), dev_has_amd }, @@ -1791,13 +1855,12 @@ */ { CLINFO_BOTH, DINFO(CL_DEVICE_IL_VERSION, INDENT "IL version", str), dev_is_21, }, { CLINFO_BOTH, DINFO(CL_DEVICE_SPIR_VERSIONS, INDENT "SPIR versions", str), dev_has_spir }, - { CLINFO_BOTH, DINFO(CL_DEVICE_PRINTF_BUFFER_SIZE, "printf() buffer size", mem), dev_is_12 }, + { CLINFO_BOTH, DINFO(CL_DEVICE_PRINTF_BUFFER_SIZE, "printf() buffer size", mem_sz), dev_is_12 }, { CLINFO_BOTH, DINFO(CL_DEVICE_BUILT_IN_KERNELS, "Built-in kernels", str), dev_is_12 }, - { CLINFO_BOTH, DINFO(CL_DEVICE_ME_VERSION_INTEL, "Motion Estimation accelerator version (Intel)", int), dev_has_intel_AME }, - - { CLINFO_BOTH, DINFO(CL_DEVICE_AVAILABLE, "Device Available", bool), NULL }, - { CLINFO_BOTH, DINFO(CL_DEVICE_COMPILER_AVAILABLE, "Compiler Available", bool), NULL }, - { CLINFO_BOTH, DINFO(CL_DEVICE_LINKER_AVAILABLE, "Linker Available", bool), dev_is_12 }, + { CLINFO_BOTH, DINFO(CL_DEVICE_ME_VERSION_INTEL, "Motion Estimation accelerator version (Intel)", int), dev_has_intel_AME }, + { CLINFO_BOTH, DINFO(CL_DEVICE_AVC_ME_VERSION_INTEL, INDENT "Device-side AVC Motion Estimation version", int), dev_has_intel_AVC_ME }, + { CLINFO_BOTH, DINFO(CL_DEVICE_AVC_ME_SUPPORTS_TEXTURE_SAMPLER_USE_INTEL, INDENT INDENT "Supports texture sampler use", bool), dev_has_intel_AVC_ME }, + { CLINFO_BOTH, DINFO(CL_DEVICE_AVC_ME_SUPPORTS_PREEMPTION_INTEL, INDENT INDENT "Supports preemption", bool), dev_has_intel_AVC_ME }, }; /* Process all the device info in the traits, except if param_whitelist is not NULL, @@ -1899,6 +1962,10 @@ /* strbuf was abused to give us boolean value */ memcpy(&(chk.image_support), strbuf, sizeof(chk.image_support)); break; + case CL_DEVICE_COMPILER_AVAILABLE: + /* strbuf was abused to give us boolean value */ + memcpy(&(chk.compiler_available), strbuf, sizeof(chk.compiler_available)); + break; default: /* do nothing */ break; @@ -2222,7 +2289,7 @@ } } if (i == num_platforms) { - sprintf(strbuf, "<error: platform 0x%p not found>", plat); + sprintf(strbuf, "<error: platform 0x%p not found>", (void*)plat); } } printf(I1_STR "%s\n", @@ -2333,7 +2400,7 @@ break; } if (i == num_platforms) { - sprintf(strbuf, "<error: platform 0x%p not found>", plat); + sprintf(strbuf, "<error: platform 0x%p not found>", (void*)plat); break; } else { szval += sprintf(strbuf, "%s (%" PRIuS ")", @@ -2464,16 +2531,7 @@ int icdl_info_str(cl_icdl_info param, const char* pname) { - error = clGetICDLoaderInfoOCLICD(param, 0, NULL, &nusz); - if (nusz > bufsz) { - REALLOC(strbuf, nusz, current_param); - bufsz = nusz; - } - had_error = REPORT_ERROR2("get %s size"); - if (!had_error) { - error = clGetICDLoaderInfoOCLICD(param, bufsz, strbuf, NULL); - had_error = REPORT_ERROR2("get %s"); - } + GET_STRING2(clGetICDLoaderInfoOCLICD, param); show_strbuf(pname, 1); return had_error; } @@ -2535,7 +2593,7 @@ #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif - clGetICDLoaderInfoOCLICD = clGetExtensionFunctionAddress("clGetICDLoaderInfoOCLICD"); + PTR_FUNC_PTR clGetICDLoaderInfoOCLICD = clGetExtensionFunctionAddress("clGetICDLoaderInfoOCLICD"); #ifdef _MSC_VER #pragma warning(pop) @@ -2598,7 +2656,7 @@ void version(void) { - puts("clinfo version 2.1.16.01.12"); + puts("clinfo version 2.1.17.02.09"); } void usage(void) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clinfo-2.1.16.01.12/src/ext.h new/clinfo-2.1.17.02.09/src/ext.h --- old/clinfo-2.1.16.01.12/src/ext.h 2016-01-12 11:51:23.000000000 +0100 +++ new/clinfo-2.1.17.02.09/src/ext.h 2017-02-09 16:56:08.000000000 +0100 @@ -148,10 +148,22 @@ /* cl_intel_advanced_motion_estimation */ #define CL_DEVICE_ME_VERSION_INTEL 0x407E +/* cl_intel_device_side_avc_motion_estimation */ +#define CL_DEVICE_AVC_ME_VERSION_INTEL 0x410B +#define CL_DEVICE_AVC_ME_SUPPORTS_TEXTURE_SAMPLER_USE_INTEL 0x410C +#define CL_DEVICE_AVC_ME_SUPPORTS_PREEMPTION_INTEL 0x410D + +/* cl_intel_planar_yuv */ +#define CL_DEVICE_PLANAR_YUV_MAX_WIDTH_INTEL 0x417E +#define CL_DEVICE_PLANAR_YUV_MAX_HEIGHT_INTEL 0x417F + /* cl_qcom_ext_host_ptr */ #define CL_DEVICE_EXT_MEM_PADDING_IN_BYTES_QCOM 0x40A0 #define CL_DEVICE_PAGE_SIZE_QCOM 0x40A1 +/* cl_arm_shared_virtual_memory */ +#define CL_DEVICE_SVM_CAPABILITIES_ARM 0x40B6 + /* cl_khr_spir */ #define CL_DEVICE_SPIR_VERSIONS 0x40E0 @@ -162,4 +174,7 @@ #define CL_DEVICE_SIMULTANEOUS_INTEROPS_INTEL 0x4104 #define CL_DEVICE_NUM_SIMULTANEOUS_INTEROPS_INTEL 0x4105 +/* cl_intel_required_subgroup_size */ +#define CL_DEVICE_SUB_GROUP_SIZES_INTEL 0x4108 + #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clinfo-2.1.16.01.12/src/strbuf.h new/clinfo-2.1.17.02.09/src/strbuf.h --- old/clinfo-2.1.16.01.12/src/strbuf.h 2016-01-12 11:51:23.000000000 +0100 +++ new/clinfo-2.1.17.02.09/src/strbuf.h 2017-02-09 16:56:08.000000000 +0100 @@ -12,15 +12,28 @@ #define GET_STRING(cmd, param, param_str, ...) do { \ error = cmd(__VA_ARGS__, param, 0, NULL, &nusz); \ + if (REPORT_ERROR("get " param_str " size")) break; \ if (nusz > bufsz) { \ REALLOC(strbuf, nusz, #param); \ bufsz = nusz; \ } \ - if (REPORT_ERROR("get " param_str " size")) break; \ error = cmd(__VA_ARGS__, param, bufsz, strbuf, NULL); \ REPORT_ERROR("get " param_str); \ } while (0) +#define GET_STRING2(cmd, ...) do { \ + error = cmd(__VA_ARGS__, 0, NULL, &nusz); \ + had_error = REPORT_ERROR2("get %s size"); \ + if (!had_error) { \ + if (nusz > bufsz) { \ + REALLOC(strbuf, nusz, current_param); \ + bufsz = nusz; \ + } \ + error = cmd(__VA_ARGS__, bufsz, strbuf, NULL); \ + had_error = REPORT_ERROR2("get %s"); \ + } \ +} while (0) + /* Skip leading whitespace in a string */ static inline const char* skip_leading_ws(const char *str) {