Hello community, here is the log from the commit of package clinfo for openSUSE:Factory checked in at 2017-07-24 12:33:17 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/clinfo (Old) and /work/SRC/openSUSE:Factory/.clinfo.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "clinfo" Mon Jul 24 12:33:17 2017 rev:6 rq:512138 version:2.2.17.06.14 Changes: -------- --- /work/SRC/openSUSE:Factory/clinfo/clinfo.changes 2017-05-08 19:03:51.333011633 +0200 +++ /work/SRC/openSUSE:Factory/.clinfo.new/clinfo.changes 2017-07-24 12:33:18.342039013 +0200 @@ -1,0 +2,14 @@ +Sat Jul 22 13:36:37 UTC 2017 - [email protected] + +- Update to version 2.2.17.06.14 + * Version 2.2.17.06.14 + * OpenCL 2.2 support + * Add "size" to "cache line" info + * Add NMAKE makefile + * Update Windows support + * Avoid possible narrowing warnings + * Use PRIuS to print size_t + * Make UNUSED macro function-style + * Also check default devices in clCreateContextFromType + +------------------------------------------------------------------- Old: ---- clinfo-2.1.17.02.09.tar.gz New: ---- clinfo-2.2.17.06.14.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ clinfo.spec ++++++ --- /var/tmp/diff_new_pack.vIoAmx/_old 2017-07-24 12:33:19.493876418 +0200 +++ /var/tmp/diff_new_pack.vIoAmx/_new 2017-07-24 12:33:19.493876418 +0200 @@ -18,7 +18,7 @@ Name: clinfo -Version: 2.1.17.02.09 +Version: 2.2.17.06.14 Release: 0 Summary: Utility that reports status information for all installed OpenCL ICDs License: SUSE-Public-Domain ++++++ clinfo-2.1.17.02.09.tar.gz -> clinfo-2.2.17.06.14.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clinfo-2.1.17.02.09/Makefile.win new/clinfo-2.2.17.06.14/Makefile.win --- old/clinfo-2.1.17.02.09/Makefile.win 1970-01-01 01:00:00.000000000 +0100 +++ new/clinfo-2.2.17.06.14/Makefile.win 2017-06-14 00:44:50.000000000 +0200 @@ -0,0 +1,36 @@ +# TODO FIXME find a better way to detect the directory to use +# for OpenCL development files +!IF "$(OPENCLDIR)" == "" +OPENCLDIR = $(AMDAPPSDKROOT) +!ENDIF +!IF "$(OPENCLDIR)" == "" +OPENCLDIR = $(MAKEDIR) +!ENDIF +!IF "$(OPENCLDIR)" == "" +OPENCLDIR = . +!ENDIF +!MESSAGE OpenCL dir: $(OPENCLDIR) + + +HDR = src/error.h \ + src/ext.h \ + src/fmtmacros.h \ + src/memory.h \ + src/ms_support.h \ + src/strbuf.h + +CFLAGS = /GL /Ox /W4 /Zi /I"$(OPENCLDIR)\include" /nologo +LIBS = libOpenCL.a +LINKOPTS = /LTCG /LIBPATH:"$(OPENCLDIR)\lib" /LIBPATH:"$(OPENCLDIR)\lib\x86" /LIBPATH:"$(OPENCLDIR)\lib\x86_64" /LIBPATH:"$(OPENCLDIR)\lib\x86_amd64" /LIBPATH:"$(OPENCLDIR)\lib\amd64" /nologo + +clinfo.exe: clinfo.obj + link $(LINKOPTS) $(LIBS) clinfo.obj /out:clinfo.exe + +clinfo.obj: src/clinfo.c $(HDR) + $(CC) $(CFLAGS) /c src/clinfo.c /Foclinfo.obj + +clean: + del /F /Q clinfo.exe clinfo.obj + +.PHONY: clean + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clinfo-2.1.17.02.09/make.cmd new/clinfo-2.2.17.06.14/make.cmd --- old/clinfo-2.1.17.02.09/make.cmd 1970-01-01 01:00:00.000000000 +0100 +++ new/clinfo-2.2.17.06.14/make.cmd 2017-06-14 00:44:50.000000000 +0200 @@ -0,0 +1 @@ +nmake /F Makefile.win /nologo %* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clinfo-2.1.17.02.09/man/clinfo.1 new/clinfo-2.2.17.06.14/man/clinfo.1 --- old/clinfo-2.1.17.02.09/man/clinfo.1 2017-02-09 16:56:08.000000000 +0100 +++ new/clinfo-2.2.17.06.14/man/clinfo.1 2017-06-14 00:44:50.000000000 +0200 @@ -1,4 +1,4 @@ -.TH CLINFO 1 "2017-02-09" "clinfo 2.1.17.02.09" +.TH CLINFO 1 "2017-06-14" "clinfo 2.2.17.06.14" .SH NAME @@ -41,7 +41,7 @@ .SH CONFORMING TO -OpenCL 1.1, OpenCL 1.2, OpenCL 2.0, OpenCL 2.1. +OpenCL 1.1, OpenCL 1.2, OpenCL 2.0, OpenCL 2.1, OpenCL 2.2. .SH EXTENSIONS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clinfo-2.1.17.02.09/src/clinfo.c new/clinfo-2.2.17.06.14/src/clinfo.c --- old/clinfo-2.1.17.02.09/src/clinfo.c 2017-02-09 16:56:08.000000000 +0100 +++ new/clinfo-2.2.17.06.14/src/clinfo.c 2017-06-14 00:44:50.000000000 +0200 @@ -4,10 +4,18 @@ #include <time.h> #include <string.h> -#include <dlfcn.h> -#ifndef RTLD_DEFAULT -#define RTLD_DEFAULT ((void*)0) +/* We will want to check for symbols in the OpenCL library. + * On Windows, we must get the module handle for it, on Unix-like + * systems we can just use RTLD_DEFAULT + */ +#ifdef _MSC_VER +# include <windows.h> +# define dlsym GetProcAddress +# define DL_MODULE GetModuleHandle("OpenCL") +#else +# include <dlfcn.h> +# define DL_MODULE ((void*)0) /* This would be RTLD_DEFAULT */ #endif /* ISO C forbids assignments between function pointers and void pointers, @@ -22,7 +30,7 @@ */ #include "fmtmacros.h" -// Support for the horrible MS C compiler +// More support for the horrible MS C compiler #ifdef _MSC_VER #include "ms_support.h" #endif @@ -33,7 +41,10 @@ #include "strbuf.h" #define ARRAY_SIZE(ar) (sizeof(ar)/sizeof(*ar)) -#define UNUSED __attribute__((unused)) + +#ifndef UNUSED +#define UNUSED(x) x __attribute__((unused)) +#endif struct platform_data { char *pname; /* CL_PLATFORM_NAME */ @@ -317,7 +328,7 @@ } int -platform_info_str(cl_platform_id pid, cl_platform_info param, const char* pname, const struct platform_info_checks * chk UNUSED) +platform_info_str(cl_platform_id pid, cl_platform_info param, const char* pname, const struct platform_info_checks* UNUSED(chk)) { GET_STRING2(clGetPlatformInfo, pid, param); /* when only listing, do not print anything we're just gathering @@ -329,7 +340,7 @@ } int -platform_info_ulong(cl_platform_id pid, cl_platform_info param, const char* pname, const struct platform_info_checks * chk UNUSED) +platform_info_ulong(cl_platform_id pid, cl_platform_info param, const char* pname, const struct platform_info_checks* UNUSED(chk)) { cl_ulong val = 0; @@ -762,7 +773,7 @@ #define DEFINE_DEVINFO_SHOW(how, type, fmt) \ int device_info_##how(cl_device_id dev, cl_device_info param, const char *pname, \ - const struct device_info_checks *chk UNUSED) \ + const struct device_info_checks* UNUSED(chk)) \ { \ type val = 0; \ SHOW_VAL(fmt); \ @@ -771,7 +782,7 @@ /* Get string-type info without showing it */ int device_info_str_get(cl_device_id dev, cl_device_info param, const char *pname, - const struct device_info_checks *chk UNUSED) + const struct device_info_checks* UNUSED(chk)) { current_param = pname; GET_STRING2(clGetDeviceInfo, dev, param); @@ -792,7 +803,7 @@ DEFINE_DEVINFO_SHOW(sz, size_t, "%" PRIuS) int device_info_bool(cl_device_id dev, cl_device_info param, const char *pname, - const struct device_info_checks *chk UNUSED) + const struct device_info_checks* UNUSED(chk)) { cl_bool val = 0; const char * const * str = (output_mode == CLINFO_HUMAN ? @@ -811,7 +822,7 @@ } int device_info_bits(cl_device_id dev, cl_device_info param, const char *pname, - const struct device_info_checks *chk UNUSED) + const struct device_info_checks* UNUSED(chk)) { cl_uint val; GET_VAL; @@ -824,7 +835,7 @@ size_t strbuf_mem(cl_ulong val, size_t szval) { - double dbl = val; + double dbl = (double)val; size_t sfx = 0; while (dbl > 1024 && sfx < memsfx_end) { dbl /= 1024; @@ -835,7 +846,7 @@ } int device_info_mem(cl_device_id dev, cl_device_info param, const char *pname, - const struct device_info_checks *chk UNUSED) + const struct device_info_checks* UNUSED(chk)) { cl_ulong val = 0; size_t szval = 0; @@ -850,7 +861,7 @@ } int device_info_mem_int(cl_device_id dev, cl_device_info param, const char *pname, - const struct device_info_checks *chk UNUSED) + const struct device_info_checks* UNUSED(chk)) { cl_uint val = 0; size_t szval = 0; @@ -865,13 +876,13 @@ } int device_info_mem_sz(cl_device_id dev, cl_device_info param, const char *pname, - const struct device_info_checks *chk UNUSED) + const struct device_info_checks* UNUSED(chk)) { size_t val = 0; size_t szval = 0; GET_VAL; if (!had_error) { - szval += sprintf(strbuf, "%zu", val); + szval += sprintf(strbuf, "%" PRIuS, val); if (output_mode == CLINFO_HUMAN && val > 1024) strbuf_mem(val, szval); } @@ -880,7 +891,7 @@ } int device_info_free_mem_amd(cl_device_id dev, cl_device_info param, const char *pname, - const struct device_info_checks *chk UNUSED) + const struct device_info_checks* UNUSED(chk)) { size_t *val = NULL; size_t szval = 0, numval = 0; @@ -904,7 +915,7 @@ } int device_info_time_offset(cl_device_id dev, cl_device_info param, const char *pname, - const struct device_info_checks *chk UNUSED) + const struct device_info_checks* UNUSED(chk)) { cl_ulong val = 0; GET_VAL; @@ -922,7 +933,7 @@ } int device_info_szptr(cl_device_id dev, cl_device_info param, const char *pname, - const struct device_info_checks *chk UNUSED) + const struct device_info_checks* UNUSED(chk)) { size_t *val = NULL; size_t szval = 0, numval = 0; @@ -945,8 +956,8 @@ return had_error; } -int device_info_wg(cl_device_id dev, cl_device_info param UNUSED, const char *pname, - const struct device_info_checks *chk UNUSED) +int device_info_wg(cl_device_id dev, cl_device_info UNUSED(param), const char *pname, + const struct device_info_checks* UNUSED(chk)) { cl_platform_id val = NULL; { @@ -966,7 +977,7 @@ } int device_info_img_sz_2d(cl_device_id dev, cl_device_info param, const char *pname, - const struct device_info_checks *chk UNUSED) + const struct device_info_checks* UNUSED(chk)) { size_t width = 0, height = 0, val = 0; GET_VAL; /* HEIGHT */ @@ -985,7 +996,7 @@ } 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) + const struct device_info_checks* UNUSED(chk)) { size_t width = 0, height = 0, val = 0; GET_VAL; /* HEIGHT */ @@ -1005,7 +1016,7 @@ int device_info_img_sz_3d(cl_device_id dev, cl_device_info param, const char *pname, - const struct device_info_checks *chk UNUSED) + const struct device_info_checks* UNUSED(chk)) { size_t width = 0, height = 0, depth = 0, val = 0; GET_VAL; /* HEIGHT */ @@ -1032,7 +1043,7 @@ int device_info_devtype(cl_device_id dev, cl_device_info param, const char *pname, - const struct device_info_checks *chk UNUSED) + const struct device_info_checks* UNUSED(chk)) { cl_device_type val = 0; GET_VAL; @@ -1065,7 +1076,7 @@ } int device_info_cachetype(cl_device_id dev, cl_device_info param, const char *pname, - const struct device_info_checks *chk UNUSED) + const struct device_info_checks* UNUSED(chk)) { cl_device_mem_cache_type val = 0; GET_VAL; @@ -1082,7 +1093,7 @@ } int device_info_lmemtype(cl_device_id dev, cl_device_info param, const char *pname, - const struct device_info_checks *chk UNUSED) + const struct device_info_checks* UNUSED(chk)) { cl_device_local_mem_type val = 0; GET_VAL; @@ -1123,7 +1134,7 @@ } int device_info_devtopo_amd(cl_device_id dev, cl_device_info param, const char *pname, - const struct device_info_checks *chk UNUSED) + const struct device_info_checks* UNUSED(chk)) { cl_device_topology_amd val; GET_VAL; @@ -1137,7 +1148,7 @@ /* we assemble a cl_device_topology_amd struct from the NVIDIA info */ int device_info_devtopo_nv(cl_device_id dev, cl_device_info param, const char *pname, - const struct device_info_checks *chk UNUSED) + const struct device_info_checks* UNUSED(chk)) { cl_device_topology_amd devtopo; cl_uint val = 0; @@ -1155,7 +1166,7 @@ GET_VAL; if (!had_error) { - devtopo.pcie.device = val >> 3; + devtopo.pcie.device = (val >> 3) & 0xff; devtopo.pcie.function = val & 7; devtopo_str(&devtopo); } @@ -1167,7 +1178,7 @@ /* NVIDIA Compute Capability */ int device_info_cc_nv(cl_device_id dev, cl_device_info param, const char *pname, - const struct device_info_checks *chk UNUSED) + const struct device_info_checks* UNUSED(chk)) { cl_uint major = 0, val = 0; GET_VAL; /* MAJOR */ @@ -1186,7 +1197,7 @@ /* AMD GFXIP */ int device_info_gfxip_amd(cl_device_id dev, cl_device_info param, const char *pname, - const struct device_info_checks *chk UNUSED) + const struct device_info_checks* UNUSED(chk)) { cl_uint major = 0, val = 0; GET_VAL; /* MAJOR */ @@ -1205,7 +1216,7 @@ /* Device Partition, CLINFO_HUMAN header */ -int device_info_partition_header(cl_device_id dev UNUSED, cl_device_info param UNUSED, +int device_info_partition_header(cl_device_id UNUSED(dev), cl_device_info UNUSED(param), const char *pname, const struct device_info_checks *chk) { int is_12 = dev_is_12(chk); @@ -1224,7 +1235,7 @@ /* Device partition properties */ int device_info_partition_types(cl_device_id dev, cl_device_info param, const char *pname, - const struct device_info_checks *chk UNUSED) + const struct device_info_checks* UNUSED(chk)) { size_t numval = 0, szval = 0, cursor = 0, slen = 0; cl_device_partition_property *val = NULL; @@ -1278,7 +1289,7 @@ } int device_info_partition_types_ext(cl_device_id dev, cl_device_info param, const char *pname, - const struct device_info_checks *chk UNUSED) + const struct device_info_checks* UNUSED(chk)) { size_t numval = 0, szval = 0, cursor = 0, slen = 0; cl_device_partition_property_ext *val = NULL; @@ -1336,7 +1347,7 @@ /* Device partition affinity domains */ int device_info_partition_affinities(cl_device_id dev, cl_device_info param, const char *pname, - const struct device_info_checks *chk UNUSED) + const struct device_info_checks* UNUSED(chk)) { cl_device_affinity_domain val; GET_VAL; @@ -1367,7 +1378,7 @@ } int device_info_partition_affinities_ext(cl_device_id dev, cl_device_info param, const char *pname, - const struct device_info_checks *chk UNUSED) + const struct device_info_checks* UNUSED(chk)) { size_t numval = 0, szval = 0, cursor = 0, slen = 0; cl_device_partition_property_ext *val = NULL; @@ -1542,7 +1553,7 @@ /* Execution capbilities */ int device_info_execap(cl_device_id dev, cl_device_info param, const char *pname, - const struct device_info_checks *chk UNUSED) + const struct device_info_checks* UNUSED(chk)) { cl_device_exec_capabilities val = 0; GET_VAL; @@ -1569,7 +1580,7 @@ /* Arch bits and endianness (HUMAN) */ int device_info_arch(cl_device_id dev, cl_device_info param, const char *pname, - const struct device_info_checks *chk UNUSED) + const struct device_info_checks* UNUSED(chk)) { cl_uint bits = 0; { @@ -1776,7 +1787,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", mem), dev_has_cache }, - { CLINFO_BOTH, DINFO_SFX(CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE, "Global Memory cache line", " bytes", int), dev_has_cache }, + { CLINFO_BOTH, DINFO_SFX(CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE, "Global Memory cache line size", " bytes", int), dev_has_cache }, /* Image support */ { CLINFO_BOTH, DINFO(CL_DEVICE_IMAGE_SUPPORT, "Image support", bool), NULL }, @@ -2341,7 +2352,7 @@ ALLOC(devs, ndevs, "context devices"); current_function = __func__; - for (t = 2; t < devtype_count; ++t) { /* we skip 0 and _DEFAULT */ + for (t = 1; t < devtype_count; ++t) { /* we skip 0 */ current_param = device_type_raw_str[t]; sprintf(strbuf, "clCreateContextFromType(NULL, %s)", current_param); @@ -2525,6 +2536,7 @@ { 12, "clCreateImage" }, { 20, "clSVMAlloc" }, { 21, "clGetHostTimer" }, + { 22, "clSetProgramSpecializationConstant" }, { 0, NULL } }; @@ -2568,7 +2580,7 @@ struct icd_loader_test check = icd_loader_tests[i]; if (check.symbol == NULL) break; - if (dlsym(RTLD_DEFAULT, check.symbol) == NULL) + if (dlsym(DL_MODULE, check.symbol) == NULL) break; icdl_ocl_version_found = check.version; ++i; @@ -2586,8 +2598,7 @@ */ #ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4996) +#pragma warning(suppress : 4996) #elif defined __GNUC__ && ((__GNUC__*10 + __GNUC_MINOR__) >= 46) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" @@ -2595,9 +2606,7 @@ PTR_FUNC_PTR clGetICDLoaderInfoOCLICD = clGetExtensionFunctionAddress("clGetICDLoaderInfoOCLICD"); -#ifdef _MSC_VER -#pragma warning(pop) -#elif defined __GNUC__ && ((__GNUC__*10 + __GNUC_MINOR__) >= 46) +#if defined __GNUC__ && ((__GNUC__*10 + __GNUC_MINOR__) >= 46) #pragma GCC diagnostic pop #endif @@ -2656,7 +2665,7 @@ void version(void) { - puts("clinfo version 2.1.17.02.09"); + puts("clinfo version 2.2.17.06.14"); } void usage(void) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clinfo-2.1.17.02.09/src/fmtmacros.h new/clinfo-2.2.17.06.14/src/fmtmacros.h --- old/clinfo-2.1.17.02.09/src/fmtmacros.h 2017-02-09 16:56:08.000000000 +0100 +++ new/clinfo-2.2.17.06.14/src/fmtmacros.h 2017-06-14 00:44:50.000000000 +0200 @@ -9,12 +9,13 @@ #define _FMT_MACROS_H #ifdef _WIN32 -# include <stdint.h> -# include <stddef.h> // size_t -# define PRIu64 "I64u" -# define PRIX64 "I64x" -# define PRIXPTR "p" -# define PRIuS "Iu" +/* TODO FIXME WIN64 support */ +# include <stdint.h> +# include <stddef.h> // size_t +# define PRIu64 "I64u" +# define PRIX64 "I64x" +# define PRIXPTR "p" +# define PRIuS "Iu" #else # define __STDC_FORMAT_MACROS # include <inttypes.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clinfo-2.1.17.02.09/src/ms_support.h new/clinfo-2.2.17.06.14/src/ms_support.h --- old/clinfo-2.1.17.02.09/src/ms_support.h 2017-02-09 16:56:08.000000000 +0100 +++ new/clinfo-2.2.17.06.14/src/ms_support.h 2017-06-14 00:44:50.000000000 +0200 @@ -4,8 +4,18 @@ * TODO could be improved by version-checking for C99 support */ -// also disable strncpy vs strncpy_s warning +// disable warning about unsafe strncpy vs strncpy_s usage #pragma warning(disable : 4996) +// disable warning about constant conditional expressions +#pragma warning(disable : 4127) +// disable warning about non-constant aggregate initializer +#pragma warning(disable: 4204) + +// Suppress warning about unused parameters. The macro definition +// _should_ work, but it doesn't on VS2012 (cl 17), may be a version thing +#define UNUSED(x) x __pragma(warning(suppress: 4100)) +// TODO FIXME remove full-blown warning removal where not needed +#pragma warning(disable: 4100) // No inline in MS C #define inline __inline
