summaryrefslogtreecommitdiff
path: root/parallel
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2021-11-20 20:05:36 +0000
committerwiz <wiz@pkgsrc.org>2021-11-20 20:05:36 +0000
commit567c05deaacd6e0617d6becebb6aa45e4b6dbf85 (patch)
tree6438ccab550e284ca770ff9c2a060840310c67c0 /parallel
parent97ea1d88163b8decf1e7382d0cb34efb39b31a22 (diff)
downloadpkgsrc-567c05deaacd6e0617d6becebb6aa45e4b6dbf85.tar.gz
pocl: update to 1.8.
Notable User Facing Changes --------------------------- - support for LLVM 13 - CMake: Inter-Procedural Optimization is enabled on code of runtime library (libpocl.so is compiled with -flto on systems that support it). - LTTng tracing improved - more command types are traced, and also some synchronous API calls (like clCreateBuffer) are traced. - poclcc, tests and examples can be disabled with CMake options - Valgrind support improved by making Valgrind aware of pocl's reference counting of cl_* objects - kernels which are called by kernels are now force-inlined - Support for NetBSD. - Support for Unix systems without libdl. - PoCL can now (optionally) respond to SIGUSR2 by printing some live debug information. - improved SPIR support for CUDA devices Notable Bug Fixes ----------------- - Fixed a potential crash on Unix systems without sysfs mounted. - Fixed compilation errors when building on macOS. - Fixed POCL_FAST_INIT macro; POCL_INIT_LOCK must be invoked with only one argument. - Fix bin/poclcc to not depend on OpenCL 2.0 symbols - Fixed miscompilation in kernel loops with multiple conditionals with barriers in them. Other ----- - Add cmake options PARALLEL_COMPILE_JOBS, PARALLEL_LINK_JOBS to use ninja's seperate compile and link job pools. - Improve memory architecture, buffer migration and allocation. Buffers are now allocated on a device when first used (previously each buffer was allocated on every device in context). - the single global LLVMContext was replaced with multiple LLVMContexts, one per OpenCL cl_context. OpenCL code can now be compiled in parallel when using separate cl_contexts. This feature is disabled by default since it significantly slowed down PyOpenCL. This should be resolved by separating LLVM compilation in their own threads in the future. - a new OpenCL extension was added to PoCL: cl_pocl_content_size. The extension allows the user to give optimization hint to PoCL, which will be used internally by PoCL to optimize buffer transfers between multiple devices.
Diffstat (limited to 'parallel')
-rw-r--r--parallel/pocl/Makefile5
-rw-r--r--parallel/pocl/distinfo18
-rw-r--r--parallel/pocl/patches/patch-CMakeLists.txt33
-rw-r--r--parallel/pocl/patches/patch-config.h.in.cmake25
-rw-r--r--parallel/pocl/patches/patch-lib_CL_devices_basic_basic.c18
-rw-r--r--parallel/pocl/patches/patch-lib_CL_devices_common.c16
-rw-r--r--parallel/pocl/patches/patch-lib_CL_devices_cpuinfo.c24
-rw-r--r--parallel/pocl/patches/patch-lib_CL_devices_devices.c48
-rw-r--r--parallel/pocl/patches/patch-lib_CL_devices_hsa_pocl-hsa.c18
-rw-r--r--parallel/pocl/patches/patch-lib_CL_devices_pthread_pthread.c18
-rw-r--r--parallel/pocl/patches/patch-lib_CL_pocl__timing.c16
11 files changed, 10 insertions, 229 deletions
diff --git a/parallel/pocl/Makefile b/parallel/pocl/Makefile
index 9285e49fd7f..7d6267f9a31 100644
--- a/parallel/pocl/Makefile
+++ b/parallel/pocl/Makefile
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.5 2021/09/20 09:05:30 nia Exp $
+# $NetBSD: Makefile,v 1.6 2021/11/20 20:05:36 wiz Exp $
-DISTNAME= pocl-1.7
-PKGREVISION= 2
+DISTNAME= pocl-1.8
CATEGORIES= parallel
MASTER_SITES= http://portablecl.org/downloads/
diff --git a/parallel/pocl/distinfo b/parallel/pocl/distinfo
index b8e036dd16e..54d0eb96609 100644
--- a/parallel/pocl/distinfo
+++ b/parallel/pocl/distinfo
@@ -1,14 +1,6 @@
-$NetBSD: distinfo,v 1.5 2021/10/26 11:10:37 nia Exp $
+$NetBSD: distinfo,v 1.6 2021/11/20 20:05:36 wiz Exp $
-BLAKE2s (pocl-1.7.tar.gz) = b111e491fb84465f30bf56bb78c0bc05f1be26d7954c0891fda2e6990669e7cd
-SHA512 (pocl-1.7.tar.gz) = 23bb82b25a222186c001b2ed413f26253e1e0e16518e98c95173f51491e15d107e6ab1b334ffd490b41199743267d9ad64882a22fea327e17ec9604f9847fc38
-Size (pocl-1.7.tar.gz) = 1577676 bytes
-SHA1 (patch-CMakeLists.txt) = d722efb971d9ce35fd7dfe2e238cbce3660e1eb8
-SHA1 (patch-config.h.in.cmake) = 8f15bf68b3a2c2af00bc8b72f52b383182db6168
-SHA1 (patch-lib_CL_devices_basic_basic.c) = 0220af7515718d44eea38d3a14844c68f75acab4
-SHA1 (patch-lib_CL_devices_common.c) = 44717bf410b948f9b6cd72cbea83dd9214faaa5c
-SHA1 (patch-lib_CL_devices_cpuinfo.c) = 30d8a1103d9eef6fb5b89c1b604dd953828b605b
-SHA1 (patch-lib_CL_devices_devices.c) = 17a5bb001086befdf88452b7e1126d2f5f4b1fc1
-SHA1 (patch-lib_CL_devices_hsa_pocl-hsa.c) = 27acb108cb1e12e4ac0c82e497916f841edc8cb1
-SHA1 (patch-lib_CL_devices_pthread_pthread.c) = 9f169b9a0a1d70ef3efc52dcd7b47a70c364d5d2
-SHA1 (patch-lib_CL_pocl__timing.c) = 6f82ad0eaf22d511745b47bf26f3024f1a25cf6f
+BLAKE2s (pocl-1.8.tar.gz) = 98983933cf43c9010352ecc48a539bc068bc5d1fd6a2a0f37b2973d384a1e3e0
+SHA512 (pocl-1.8.tar.gz) = bcbb3fa3d2234d4c5b0c17863eba0bc4c8f13f863cc58cfd1de49e21fa7bf0aec82b81aec143c81885e3a39274c8ae783b2f03b9a12846e024204d6ed0e59a9d
+Size (pocl-1.8.tar.gz) = 1614545 bytes
+SHA1 (patch-lib_CL_devices_devices.c) = 59824f5f30083651cff47340be0895148836aee3
diff --git a/parallel/pocl/patches/patch-CMakeLists.txt b/parallel/pocl/patches/patch-CMakeLists.txt
deleted file mode 100644
index 7c217fdbc73..00000000000
--- a/parallel/pocl/patches/patch-CMakeLists.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-$NetBSD: patch-CMakeLists.txt,v 1.2 2021/06/10 12:26:26 nia Exp $
-
-Fix detection of dlopen
-https://github.com/pocl/pocl/pull/950
-
---- CMakeLists.txt.orig 2021-05-19 08:12:19.000000000 +0000
-+++ CMakeLists.txt
-@@ -787,9 +787,7 @@ elseif(UNIX)
-
- find_library(DL_LIB "dl")
- find_file(DL_H "dlfcn.h")
-- if(DL_LIB AND DL_H)
-- message(STATUS "libdl found")
--
-+ if(DL_H)
- get_filename_component(DL_H_INCLUDE_DIR "${DL_H}" DIRECTORY)
- string(FIND "${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES}" "${DL_H_INCLUDE_DIR}" LTPOSITION)
- # include the directory of dlfcn.h, if its not in the default system include dirs
-@@ -797,9 +795,11 @@ elseif(UNIX)
- if((LTPOSITION LESS "0") AND (NOT CMAKE_CROSSCOMPILING))
- include_directories("${DL_H_INCLUDE_DIR}")
- endif()
-- set(HAVE_LIBDL ON CACHE BOOL "dlopen" FORCE)
-- else()
-- message(FATAL_ERROR "Could not find DL library!")
-+ set(HAVE_DLFCN_H ON)
-+ endif()
-+
-+ if(NOT DL_LIB)
-+ set(DL_LIB "")
- endif()
-
- else()
diff --git a/parallel/pocl/patches/patch-config.h.in.cmake b/parallel/pocl/patches/patch-config.h.in.cmake
deleted file mode 100644
index 7611e097fb2..00000000000
--- a/parallel/pocl/patches/patch-config.h.in.cmake
+++ /dev/null
@@ -1,25 +0,0 @@
-$NetBSD: patch-config.h.in.cmake,v 1.2 2021/06/10 12:26:26 nia Exp $
-
-Fix detection of dlopen
-https://github.com/pocl/pocl/pull/950
-
---- config.h.in.cmake.orig 2021-05-19 08:12:19.000000000 +0000
-+++ config.h.in.cmake
-@@ -35,6 +35,8 @@
-
- #cmakedefine ENABLE_SPIRV
-
-+#cmakedefine HAVE_DLFCN_H
-+
- #cmakedefine HAVE_FORK
-
- #cmakedefine HAVE_VFORK
-@@ -57,8 +59,6 @@
-
- #cmakedefine HAVE_LTTNG_UST
-
--#cmakedefine HAVE_LIBDL
--
- #cmakedefine HAVE_OCL_ICD
-
- #cmakedefine HAVE_POSIX_MEMALIGN
diff --git a/parallel/pocl/patches/patch-lib_CL_devices_basic_basic.c b/parallel/pocl/patches/patch-lib_CL_devices_basic_basic.c
deleted file mode 100644
index 413450090e0..00000000000
--- a/parallel/pocl/patches/patch-lib_CL_devices_basic_basic.c
+++ /dev/null
@@ -1,18 +0,0 @@
-$NetBSD: patch-lib_CL_devices_basic_basic.c,v 1.2 2021/06/10 12:26:26 nia Exp $
-
-Fix detection of dlopen
-https://github.com/pocl/pocl/pull/950
-
---- lib/CL/devices/basic/basic.c.orig 2021-05-19 08:12:19.000000000 +0000
-+++ lib/CL/devices/basic/basic.c
-@@ -50,8 +50,8 @@
- #include "pocl_llvm.h"
- #endif
-
--#ifndef HAVE_LIBDL
--#error Basic driver requires DL library
-+#ifndef HAVE_DLFCN_H
-+#error Basic driver requires dlopen
- #endif
-
- struct data {
diff --git a/parallel/pocl/patches/patch-lib_CL_devices_common.c b/parallel/pocl/patches/patch-lib_CL_devices_common.c
deleted file mode 100644
index 002fb0f9831..00000000000
--- a/parallel/pocl/patches/patch-lib_CL_devices_common.c
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-lib_CL_devices_common.c,v 1.2 2021/06/10 12:26:26 nia Exp $
-
-Fix detection of dlopen
-https://github.com/pocl/pocl/pull/950
-
---- lib/CL/devices/common.c.orig 2021-05-19 08:12:19.000000000 +0000
-+++ lib/CL/devices/common.c
-@@ -61,7 +61,7 @@
- #include <unistd.h>
- #endif
-
--#ifdef HAVE_LIBDL
-+#ifdef HAVE_DLFCN_H
- #if defined(__APPLE__)
- #define _DARWIN_C_SOURCE
- #endif
diff --git a/parallel/pocl/patches/patch-lib_CL_devices_cpuinfo.c b/parallel/pocl/patches/patch-lib_CL_devices_cpuinfo.c
deleted file mode 100644
index aafd9c76126..00000000000
--- a/parallel/pocl/patches/patch-lib_CL_devices_cpuinfo.c
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD: patch-lib_CL_devices_cpuinfo.c,v 1.2 2021/06/10 12:26:26 nia Exp $
-
-Do not segfault if /sys/bus/pci/devices/0000:00:00.0/vendor does not exist.
-
-https://github.com/pocl/pocl/pull/948
-
---- lib/CL/devices/cpuinfo.c.orig 2021-05-19 08:12:19.000000000 +0000
-+++ lib/CL/devices/cpuinfo.c
-@@ -416,9 +416,12 @@ pocl_cpuinfo_get_cpu_name_and_vendor(cl_
- if (!device->vendor_id)
- {
- f = fopen (pci_bus_root_vendor_file, "r");
-- num_read = fscanf (f, "%x", &device->vendor_id);
-- fclose (f);
-- /* no error checking, if it failed we just won't have the info */
-+ if (f)
-+ {
-+ /* no error checking, if it failed we just won't have the info */
-+ num_read = fscanf (f, "%x", &device->vendor_id);
-+ fclose (f);
-+ }
- }
- }
-
diff --git a/parallel/pocl/patches/patch-lib_CL_devices_devices.c b/parallel/pocl/patches/patch-lib_CL_devices_devices.c
index 15159773762..94422d2d84b 100644
--- a/parallel/pocl/patches/patch-lib_CL_devices_devices.c
+++ b/parallel/pocl/patches/patch-lib_CL_devices_devices.c
@@ -1,8 +1,8 @@
-$NetBSD: patch-lib_CL_devices_devices.c,v 1.1 2021/06/10 09:57:40 nia Exp $
+$NetBSD: patch-lib_CL_devices_devices.c,v 1.2 2021/11/20 20:05:37 wiz Exp $
Add support for non-Linux unixes.
---- lib/CL/devices/devices.c.orig 2021-05-19 08:12:19.000000000 +0000
+--- lib/CL/devices/devices.c.orig 2021-10-12 14:33:15.000000000 +0000
+++ lib/CL/devices/devices.c
@@ -27,7 +27,7 @@
#include <string.h>
@@ -13,54 +13,12 @@ Add support for non-Linux unixes.
#include <limits.h>
#include <signal.h>
#include <stdio.h>
-@@ -70,7 +70,7 @@
- #define PATH_MAX 4096
+@@ -469,7 +469,7 @@ pocl_init_devices ()
#endif
--#ifdef HAVE_LIBDL
-+#ifdef HAVE_DLFCN_H
- #if defined(__APPLE__)
- #define _DARWIN_C_SOURCE
- #endif
-@@ -303,7 +303,7 @@ str_toupper(char *out, const char *in)
- */
- #ifdef ENABLE_HOST_CPU_DEVICES
-#ifdef __linux__
+#if !defined(_WIN32) && !defined(__APPLE__)
- #ifdef __x86_64__
-
- #define DIV_OPCODE_SIZE 1
-@@ -335,7 +335,11 @@ sigfpe_signal_handler (int signo, siginf
- {
- ucontext_t *uc;
- uc = (ucontext_t *)data;
-+#ifdef __NetBSD__
-+ unsigned char *eip = (unsigned char *)(uc->uc_mcontext.__gregs[_REG_RIP]);
-+#else
- unsigned char *eip = (unsigned char *)(uc->uc_mcontext.gregs[REG_RIP]);
-+#endif
-
- if ((signo == SIGFPE)
- && ((si->si_code == FPE_INTDIV) || (si->si_code == FPE_INTOVF)))
-@@ -384,7 +388,11 @@ sigfpe_signal_handler (int signo, siginf
- n += IP_RELATIVE_INDEXING;
- }
-
-+#ifdef __NetBSD__
-+ uc->uc_mcontext.__gregs[_REG_RIP] += n;
-+#else
- uc->uc_mcontext.gregs[REG_RIP] += n;
-+#endif
- return;
- }
- else
-@@ -546,7 +554,7 @@ pocl_init_devices ()
-
#ifdef ENABLE_HOST_CPU_DEVICES
--#ifdef __linux__
-+#if !defined(_WIN32) && !defined(__APPLE__)
- #ifdef __x86_64__
-
if (pocl_get_bool_option ("POCL_SIGFPE_HANDLER", 1))
diff --git a/parallel/pocl/patches/patch-lib_CL_devices_hsa_pocl-hsa.c b/parallel/pocl/patches/patch-lib_CL_devices_hsa_pocl-hsa.c
deleted file mode 100644
index 6fb8116f9ea..00000000000
--- a/parallel/pocl/patches/patch-lib_CL_devices_hsa_pocl-hsa.c
+++ /dev/null
@@ -1,18 +0,0 @@
-$NetBSD: patch-lib_CL_devices_hsa_pocl-hsa.c,v 1.2 2021/06/10 12:26:26 nia Exp $
-
-Fix detection of dlopen
-https://github.com/pocl/pocl/pull/950
-
---- lib/CL/devices/hsa/pocl-hsa.c.orig 2021-05-19 08:12:19.000000000 +0000
-+++ lib/CL/devices/hsa/pocl-hsa.c
-@@ -73,8 +73,8 @@
-
- #endif
-
--#ifndef HAVE_LIBDL
--#error HSA driver requires DL library
-+#ifndef HAVE_DLFCN_H
-+#error HSA driver requires dlopen
- #endif
-
- #include "pocl-hsa.h"
diff --git a/parallel/pocl/patches/patch-lib_CL_devices_pthread_pthread.c b/parallel/pocl/patches/patch-lib_CL_devices_pthread_pthread.c
deleted file mode 100644
index 5054dc05bbb..00000000000
--- a/parallel/pocl/patches/patch-lib_CL_devices_pthread_pthread.c
+++ /dev/null
@@ -1,18 +0,0 @@
-$NetBSD: patch-lib_CL_devices_pthread_pthread.c,v 1.2 2021/06/10 12:26:26 nia Exp $
-
-Fix detection of dlopen
-https://github.com/pocl/pocl/pull/950
-
---- lib/CL/devices/pthread/pthread.c.orig 2021-05-19 08:12:19.000000000 +0000
-+++ lib/CL/devices/pthread/pthread.c
-@@ -51,8 +51,8 @@
- #include "pocl_util.h"
- #include "pocl_mem_management.h"
-
--#ifndef HAVE_LIBDL
--#error Pthread driver requires DL library
-+#ifndef HAVE_DLFCN_H
-+#error Pthread driver requires dlopen
- #endif
-
- #ifdef OCS_AVAILABLE
diff --git a/parallel/pocl/patches/patch-lib_CL_pocl__timing.c b/parallel/pocl/patches/patch-lib_CL_pocl__timing.c
deleted file mode 100644
index e3af1eb65b1..00000000000
--- a/parallel/pocl/patches/patch-lib_CL_pocl__timing.c
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-lib_CL_pocl__timing.c,v 1.2 2021/06/10 12:26:26 nia Exp $
-
-NetBSD does not have CLOCK_UPTIME_FAST.
-https://github.com/pocl/pocl/pull/949
-
---- lib/CL/pocl_timing.c.orig 2021-05-19 08:12:19.000000000 +0000
-+++ lib/CL/pocl_timing.c
-@@ -74,7 +74,7 @@ uint64_t pocl_gettimemono_ns() {
- # warning Using clock_gettime with CLOCK_MONOTONIC for monotonic clocks
- clock_gettime(CLOCK_MONOTONIC, &timespec);
- # endif
--# elif defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD_kernel__)
-+# elif defined(__DragonFly__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
- clock_gettime(CLOCK_UPTIME_FAST, &timespec);
- # else
- # warning Using clock_gettime with CLOCK_REALTIME for monotonic clocks