From cb98fe7909a0fe6a251e56e856090f1c16d63634fff21ee309231385e895840c Mon Sep 17 00:00:00 2001 From: Martin Hauke Date: Fri, 5 Apr 2019 14:51:19 +0000 Subject: [PATCH 1/3] Accepting request 691606 from home:mnhauke:branches:science - Update to version 1.3 * Support for Clang/LLVM 8.0. Bug Fixes: * Fixed kernel debug symbol generation. * HSA: fix kernel caching. * Fix clCreateImage doesn't fail with unsupported image type. * Fix handle non-kernel functions with barriers properly. * Fix Unable to build pocl with CUDA support with LLVM 7 and host GCC 8.2. * Fix image format/size handling with multiple devices in context. * Fix padding issue with context arrays that manifested as unaligned access errors after autovectorization. Notable Internal Changes * Add group ids as hidden kernel arguments instead of digging them up from the context struct. * Ability to generate the final binary via separate assembly text + assembler call. Useful for supporting LLVM targets without direct binary emission support. * Use Clang's Driver API for launching the final linkage step. This way we utilize the toolchain registry with correct linkage steps required for the target at hand. * Add 'device_aux_functions' to the driver layer attributes. This can be used to retain device-specific functions required by the target across the pruning of unused globals. * The "default kernels" hack which was used to store kernel metadata, has been removed. Kernel metadata are now stored only once, in cl_program struct; every new cl_kernel structs holds only a pointer. * Major 'pthread' CPU driver cleanup. * Major Workgroup.cc cleanup. - Remove reproducible.patch (fixed upstream) OBS-URL: https://build.opensuse.org/request/show/691606 OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=45 --- pocl-1.2.tar.gz | 3 -- pocl-1.3.tar.gz | 3 ++ pocl.changes | 34 ++++++++++++++++++++ pocl.spec | 8 ++--- reproducible.patch | 80 ---------------------------------------------- 5 files changed, 40 insertions(+), 88 deletions(-) delete mode 100644 pocl-1.2.tar.gz create mode 100644 pocl-1.3.tar.gz delete mode 100644 reproducible.patch diff --git a/pocl-1.2.tar.gz b/pocl-1.2.tar.gz deleted file mode 100644 index a4dd875..0000000 --- a/pocl-1.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0c43e68f336892f3a64cba19beb99d9212f529bedb77f7879c0331450b982d46 -size 1603374 diff --git a/pocl-1.3.tar.gz b/pocl-1.3.tar.gz new file mode 100644 index 0000000..5a59aa6 --- /dev/null +++ b/pocl-1.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6527e3f47fab7c21e96bc757c4ae3303901f35e23f64642d6da5cc4c4fcc915a +size 1414807 diff --git a/pocl.changes b/pocl.changes index 9438576..bc22af7 100644 --- a/pocl.changes +++ b/pocl.changes @@ -1,3 +1,37 @@ +------------------------------------------------------------------- +Thu Apr 4 19:21:26 UTC 2019 - Martin Hauke + +- Update to version 1.3 + * Support for Clang/LLVM 8.0. + Bug Fixes: + * Fixed kernel debug symbol generation. + * HSA: fix kernel caching. + * Fix clCreateImage doesn't fail with unsupported image type. + * Fix handle non-kernel functions with barriers properly. + * Fix Unable to build pocl with CUDA support with LLVM 7 and host + GCC 8.2. + * Fix image format/size handling with multiple devices in context. + * Fix padding issue with context arrays that manifested as unaligned + access errors after autovectorization. + Notable Internal Changes + * Add group ids as hidden kernel arguments instead of digging + them up from the context struct. + * Ability to generate the final binary via separate assembly text + + assembler call. Useful for supporting LLVM targets without direct + binary emission support. + * Use Clang's Driver API for launching the final linkage step. This + way we utilize the toolchain registry with correct linkage steps + required for the target at hand. + * Add 'device_aux_functions' to the driver layer attributes. This + can be used to retain device-specific functions required by the + target across the pruning of unused globals. + * The "default kernels" hack which was used to store kernel metadata, + has been removed. Kernel metadata are now stored only once, in + cl_program struct; every new cl_kernel structs holds only a pointer. + * Major 'pthread' CPU driver cleanup. + * Major Workgroup.cc cleanup. +- Remove reproducible.patch (fixed upstream) + ------------------------------------------------------------------- Wed Oct 31 12:13:35 UTC 2018 - Bernhard Wiedemann diff --git a/pocl.spec b/pocl.spec index 5d6e138..438a9dc 100644 --- a/pocl.spec +++ b/pocl.spec @@ -1,7 +1,7 @@ # # spec file for package pocl # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2014 Guillaume GARDET # # All modifications and additions to the file contributed by third parties @@ -17,9 +17,9 @@ # -%define sover 2.2.0 +%define sover 2.3.0 Name: pocl -Version: 1.2 +Version: 1.3 Release: 0 Summary: Portable Computing Language - an OpenCL implementation # The whole code is under MIT @@ -30,7 +30,6 @@ Group: Development/Tools/Other URL: http://portablecl.org/ Source0: https://github.com/pocl/pocl/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Source99: pocl-rpmlintrc -Patch0: reproducible.patch BuildRequires: clang < 8 BuildRequires: clang-devel < 8 BuildRequires: cmake @@ -95,7 +94,6 @@ This subpackage provides the development files needed for pocl. %prep %setup -q -%patch0 -p1 %build %define __builder ninja diff --git a/reproducible.patch b/reproducible.patch deleted file mode 100644 index c1b81d5..0000000 --- a/reproducible.patch +++ /dev/null @@ -1,80 +0,0 @@ -https://bugzilla.opensuse.org/show_bug.cgi?id=1110722 -commit e99f4ca98bee7c59d8869a1b1d0aa764ffd5ec28 -Author: Michal Babej -Date: Thu Oct 11 13:16:43 2018 +0300 - - Fix PR #667 - -diff --git a/lib/CL/devices/basic/basic.c b/lib/CL/devices/basic/basic.c -index a64680f0..048f0008 100644 ---- a/lib/CL/devices/basic/basic.c -+++ b/lib/CL/devices/basic/basic.c -@@ -354,9 +354,6 @@ pocl_init_cpu_device_infos (cl_device_id dev) - dev->llvm_cpu = get_llvm_cpu_name (); - #endif - -- if(dev->llvm_cpu && (!strcmp(dev->llvm_cpu, "(unknown)"))) -- dev->llvm_cpu = OCL_KERNEL_TARGET_CPU; -- - #else /* No compiler, no CPU info */ - dev->llvm_cpu = NULL; - dev->llvm_target_triplet = ""; -diff --git a/lib/CL/pocl_llvm_build.cc b/lib/CL/pocl_llvm_build.cc -index fda6e3a2..7b7001f8 100644 ---- a/lib/CL/pocl_llvm_build.cc -+++ b/lib/CL/pocl_llvm_build.cc -@@ -839,16 +839,14 @@ static llvm::Module* getKernelLibrary(cl_device_id device) - kernellib += device->llvm_target_triplet; - if (is_host) { - kernellib += '-'; -+#ifdef KERNELLIB_HOST_DISTRO_VARIANTS -+ kernellib += getX86KernelLibName(); -+#else - kernellib_fallback = kernellib; - kernellib_fallback += OCL_KERNEL_TARGET_CPU; - kernellib_fallback += ".bc"; --#ifdef KERNELLIB_HOST_DISTRO_VARIANTS -- if (triple.getArch() == Triple::x86_64 || -- triple.getArch() == Triple::x86) -- kernellib += getX86KernelLibName(); -- else -+ kernellib += device->llvm_cpu; - #endif -- kernellib += device->llvm_cpu; - } - kernellib += ".bc"; - -@@ -861,6 +859,7 @@ static llvm::Module* getKernelLibrary(cl_device_id device) - } - else - { -+#ifndef KERNELLIB_HOST_DISTRO_VARIANTS - if (is_host && pocl_exists(kernellib_fallback.c_str())) - { - POCL_MSG_WARN("Using fallback %s as the built-in lib.\n", -@@ -868,6 +867,7 @@ static llvm::Module* getKernelLibrary(cl_device_id device) - lib = parseModuleIR(kernellib_fallback.c_str()); - } - else -+#endif - POCL_ABORT("Kernel library file %s doesn't exist.\n", kernellib.c_str()); - } - assert (lib != NULL); -diff --git a/lib/CL/pocl_llvm_utils.cc b/lib/CL/pocl_llvm_utils.cc -index feb88424..163304fe 100644 ---- a/lib/CL/pocl_llvm_utils.cc -+++ b/lib/CL/pocl_llvm_utils.cc -@@ -134,11 +134,13 @@ get_llvm_cpu_name () - } - #endif - -+#ifndef KERNELLIB_HOST_DISTRO_VARIANTS - if (r.str() == "generic") { - POCL_MSG_WARN("LLVM does not recognize your cpu, trying to use " - OCL_KERNEL_TARGET_CPU " for -target-cpu\n"); - r = llvm::StringRef(OCL_KERNEL_TARGET_CPU); - } -+#endif - - assert(r.size() > 0); - char *cpu_name = (char *)malloc(r.size() + 1); From 23e7816eddbf2022941590a409f6fbc94b67fd93c51227b3c91e160fb8846fe8 Mon Sep 17 00:00:00 2001 From: Martin Hauke Date: Fri, 5 Apr 2019 19:58:02 +0000 Subject: [PATCH 2/3] Accepting request 691904 from home:mnhauke:branches:science - Adjust required clang version (clang < 9) since clang 8 is now supported by upstream. OBS-URL: https://build.opensuse.org/request/show/691904 OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=46 --- pocl.changes | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pocl.changes b/pocl.changes index bc22af7..ba8d182 100644 --- a/pocl.changes +++ b/pocl.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Apr 5 19:56:21 UTC 2019 - Martin Hauke + +- Adjust required clang version (clang < 9) since clang 8 is now + supported by upstream. + ------------------------------------------------------------------- Thu Apr 4 19:21:26 UTC 2019 - Martin Hauke From e75b135db6ced2b1e2d5d98a3b430ff0b8202aab21c16ea95974599b7211641d Mon Sep 17 00:00:00 2001 From: Martin Hauke Date: Fri, 5 Apr 2019 19:59:46 +0000 Subject: [PATCH 3/3] Accepting request 691906 from home:mnhauke:branches:science OBS-URL: https://build.opensuse.org/request/show/691906 OBS-URL: https://build.opensuse.org/package/show/science/pocl?expand=0&rev=47 --- pocl.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pocl.spec b/pocl.spec index 438a9dc..913e58d 100644 --- a/pocl.spec +++ b/pocl.spec @@ -30,8 +30,8 @@ Group: Development/Tools/Other URL: http://portablecl.org/ Source0: https://github.com/pocl/pocl/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Source99: pocl-rpmlintrc -BuildRequires: clang < 8 -BuildRequires: clang-devel < 8 +BuildRequires: clang < 9 +BuildRequires: clang-devel < 9 BuildRequires: cmake BuildRequires: libboost_headers-devel BuildRequires: libtool @@ -44,7 +44,7 @@ BuildRequires: uthash-devel BuildRequires: pkgconfig(OpenCL) BuildRequires: pkgconfig(glew) BuildRequires: pkgconfig(hwloc) -Requires: clang < 8 +Requires: clang < 9 Requires: gcc Requires: libstdc++-devel Requires: libut2