From nobody Wed May 3 08:06:32 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QB8fc6WMbz494TZ; Wed, 3 May 2023 08:06:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QB8fc63RPz4bbV; Wed, 3 May 2023 08:06:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683101192; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CxMqUSM46QFtvFzhI31u1XUhZtjMmKrN0YPGSvso3XI=; b=Kj6QH/cxGwSQgH1pm6m7kSSJMvV36xP2djrBjrY8pNyy52QNrxb26nfnlAONI/Ev9w4Awk sOfOamCml2deJaAlh5BwSMpuObw+QRP30Nuz8KwuVK3rHjYt4EXUyM9dRwoaCr7nDRy1o1 Dkcw/FOEkJcErpKEtcNwioOjPvjh02G8oBp1NwPj08VJao6qqdkZ8fk1VWZgJUdvGpdAU4 Xwmekehn4NuW+RW61XcmRjvll3fqyK7gDAG1GBbx3BCMSrOusH4cqXQiNuCWTHTRYcwuoQ 4jt0K90s0ijmyEVKfdTPNmuigHrsbHLYV+hVn3mWGyyl7LO/J4CZyZkLd3FteQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683101192; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CxMqUSM46QFtvFzhI31u1XUhZtjMmKrN0YPGSvso3XI=; b=owyq/AjNqd7ukVmTRFaAaFNgGE9QkmGaWFaU+BM4XlyLSU2Jr10l+T8J/diEuKBA5WGwer 89qMe+nk6oXa1AXNOqnNcyPrP0b2T6q7djx/fN/JD3dKpZb6sF4PzxyDfTBCf+emgbbR6+ PD0x/g/vQvu8Uifm14bgJzTOwafaUOroInz7ojzqKUzGzkk7+hB7tZlehXLXadrVxm7gk1 kEGKuJNrtL4SM578iSX0bhL1LGLxhFBCTKKJU5PFD3avC9Xvu7I/ld7on4EwuS/KQbgD6u otd+Bqc/XdeLDwLp12dnZOt6hUWuahGP3DVUgFdv4JAwrujxPYvgo4LIq42yEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683101192; a=rsa-sha256; cv=none; b=F1kWsiBjbwKyXBEB9e5RcDTIKUl4vzkWSh4AWTS+QrKz6LffaO+f7lmxtnUkT5XK2sfuB+ pSFGEVlO3QRMu5V3v9ypQpwj7/3Kp16y2cMkGIwaxahG0qBwhI3s0NuPkRn0y1RtLnVKM1 4z0MsSEm7gyM+jvJPiUgFIZKT1X40J0fgqhA6KwpZmvK5HuSL/LcmnvrayCSVCbys9Nc16 za//qEIKEYFyTht9a3vAHltIYfEbEqXpoU+7fedCpWR8N4g4Uvek/iPYQZA9+qRriGxaLE VjY1kKzF2ElOuedczjKE/ddDJzFSqztmFQHAOKmakZSfDXctWTctwZdq08DZfA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QB8fc58LdzN85; Wed, 3 May 2023 08:06:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 34386WvN033029; Wed, 3 May 2023 08:06:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 34386WkC033028; Wed, 3 May 2023 08:06:32 GMT (envelope-from git) Date: Wed, 3 May 2023 08:06:32 GMT Message-Id: <202305030806.34386WkC033028@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: =?utf-8?Q?Fernando=20Apestegu=C3=ADa?= Subject: git: be729ef9da64 - main - lang/pocl: Update to POCL 3.1 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fernape X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: be729ef9da645eb8edea50e3239ef8538306a757 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by fernape: URL: https://cgit.FreeBSD.org/ports/commit/?id=be729ef9da645eb8edea50e3239ef8538306a757 commit be729ef9da645eb8edea50e3239ef8538306a757 Author: O. Hartmann AuthorDate: 2023-05-02 10:37:07 +0000 Commit: Fernando ApesteguĂ­a CommitDate: 2023-05-03 08:01:44 +0000 lang/pocl: Update to POCL 3.1 PR: 271159 Reported by: ohartmann@walstatt.org (maintainer) --- lang/pocl/Makefile | 26 ++++++++++++-------------- lang/pocl/distinfo | 6 +++--- lang/pocl/files/patch-CMakeLists.txt | 10 +++++----- lang/pocl/files/patch-config.h.in.cmake | 4 ++-- lang/pocl/files/patch-lib_CL_devices_cpuinfo.c | 16 ++++++++-------- lang/pocl/files/patch-lib_CL_pocl__timing.c | 13 +++++++++++++ lang/pocl/pkg-descr | 21 ++++++++++++++++----- lang/pocl/pkg-message | 18 ++++++++++++++++++ lang/pocl/pkg-plist | 3 +-- 9 files changed, 78 insertions(+), 39 deletions(-) diff --git a/lang/pocl/Makefile b/lang/pocl/Makefile index 4b7f2dc2a34f..682871ce64be 100644 --- a/lang/pocl/Makefile +++ b/lang/pocl/Makefile @@ -1,11 +1,11 @@ PORTNAME= pocl -PORTVERSION= 1.8 -DISTVERSIONPREFIX=v +DISTVERSIONPREFIX= v +DISTVERSION= 3.1 CATEGORIES= lang -MAINTAINER= ohartmann@freebsd-de.org +MAINTAINER= ohartmann@walstatt.org COMMENT= POrtable Computing Language (POCL) -WWW= http://portablecl.org/ +WWW= http://portablecl.org/ LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE @@ -14,16 +14,15 @@ ONLY_FOR_ARCHS= aarch64 amd64 i386 powerpc64 powerpc64le ONLY_FOR_ARCHS_REASON= only tested on ${ONLY_FOR_ARCHS:tW:S/ /, /g} BROKEN_i386= Unable to access file /wrkdirs/usr/ports/lang/pocl/work/stage/usr/local/share/pocl/kernel-i386-portbld-freebsd13.0-avx.bc:No such file or directory -BUILD_DEPENDS= llvm${LLVM_VERSION}>=10:devel/llvm${LLVM_VERSION} \ - opencl>=2.2:devel/opencl +BUILD_DEPENDS= llvm${LLVM_VERSION}>=14:devel/llvm${LLVM_VERSION} \ + opencl>=3:devel/opencl LIB_DEPENDS= libhwloc.so:devel/hwloc2 libOpenCL.so:devel/ocl-icd -RUN_DEPENDS= ${BUILD_DEPENDS} USES= cmake localbase:ldflags ncurses pkgconfig USE_GITHUB= yes USE_LDCONFIG= yes -LLVM_VERSION= ${MESA_LLVM_VER:U13} +LLVM_VERSION= ${MESA_LLVM_VER:U15} CMAKE_ARGS= -DWITH_LLVM_CONFIG="${LOCALBASE}/llvm${LLVM_VERSION}/bin/llvm-config" \ -DPOCL_INSTALL_PKGCONFIG_DIR="${PREFIX}/libdata/pkgconfig" \ -DSINGLE_LLVM_LIB=ON \ @@ -38,21 +37,21 @@ PLIST_SUB= CONFIGURE_TARGET=${CONFIGURE_TARGET:S/amd64/x86_64/} OPTIONS_DEFINE= DOCS -DOCS_DESC= Build documentation (needs sphinx) -DOCS_CMAKE_OFF= -DENABLE_DOCS=OFF +DOCS_DESC= Build documentation (needs textproc/py-sphinx) DOCS_CMAKE_ON= -DENABLE_DOCS=ON +DOCS_CMAKE_OFF= -DENABLE_DOCS=OFF DOCS_USES= python:3.6+ -DOCS_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sphinx>=0,1:textproc/py-sphinx@${PY_FLAVOR} +DOCS_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sphinx>=0:textproc/py-sphinx@${PY_FLAVOR} .include .if ${ARCH} == aarch64 -PLIST_SUB+= AARCH64="" +PLIST_SUB+= AARCH64="" PLIST_SUB+= PPC64="@comment " PLIST_SUB+= PPC64LE="@comment " PLIST_SUB+= X86="@comment " .elif ${ARCH} == amd64 || ${ARCH} == i386 -PLIST_SUB+= AARCH64="@comment " +PLIST_SUB+= AARCH64="@comment " PLIST_SUB+= PPC64="@comment " PLIST_SUB+= PPC64LE="@comment " PLIST_SUB+= X86="" @@ -67,6 +66,5 @@ PLIST_SUB+= PPC64="@comment " PLIST_SUB+= PPC64LE="" PLIST_SUB+= X86="@comment " .endif -PLIST_SUB+= CONFIGURE_TARGET=${CONFIGURE_TARGET:S/amd64/x86_64/} .include diff --git a/lang/pocl/distinfo b/lang/pocl/distinfo index 5b95d2ff1d4f..a60086168896 100644 --- a/lang/pocl/distinfo +++ b/lang/pocl/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1634367852 -SHA256 (pocl-pocl-v1.8_GH0.tar.gz) = 0f63377ae1826e16e90038fc8e7f65029be4ff6f9b059f6907174b5c0d1f8ab2 -SIZE (pocl-pocl-v1.8_GH0.tar.gz) = 1614545 +TIMESTAMP = 1670346593 +SHA256 (pocl-pocl-v3.1_GH0.tar.gz) = 82314362552e050aff417318dd623b18cf0f1d0f84f92d10a7e3750dd12d3a9a +SIZE (pocl-pocl-v3.1_GH0.tar.gz) = 1928607 diff --git a/lang/pocl/files/patch-CMakeLists.txt b/lang/pocl/files/patch-CMakeLists.txt index f5e41ee6b99e..ac4253d87ac6 100644 --- a/lang/pocl/files/patch-CMakeLists.txt +++ b/lang/pocl/files/patch-CMakeLists.txt @@ -1,12 +1,12 @@ ---- CMakeLists.txt.orig 2020-12-16 13:02:13 UTC +--- CMakeLists.txt.orig 2022-06-10 10:09:05 UTC +++ CMakeLists.txt -@@ -398,6 +398,9 @@ endif() - - +@@ -394,6 +394,9 @@ find_package(Hwloc) + set(ENABLE_HWLOC ON CACHE BOOL "Hwloc" FORCE) + endif() +include(CheckIncludeFiles) +check_include_files("sys/types.h;sys/sysctl.h" HAVE_SYSCTL_H) + - ###################################################################################### + include(sanitizers) diff --git a/lang/pocl/files/patch-config.h.in.cmake b/lang/pocl/files/patch-config.h.in.cmake index d252edbc8c5f..6f507f989de8 100644 --- a/lang/pocl/files/patch-config.h.in.cmake +++ b/lang/pocl/files/patch-config.h.in.cmake @@ -1,6 +1,6 @@ ---- config.h.in.cmake.orig 2020-12-16 13:02:13 UTC +--- config.h.in.cmake.orig 2022-06-10 10:09:05 UTC +++ config.h.in.cmake -@@ -39,6 +39,8 @@ +@@ -57,6 +57,8 @@ #cmakedefine HAVE_VFORK diff --git a/lang/pocl/files/patch-lib_CL_devices_cpuinfo.c b/lang/pocl/files/patch-lib_CL_devices_cpuinfo.c index ddc39b56f3a0..ce0187187300 100644 --- a/lang/pocl/files/patch-lib_CL_devices_cpuinfo.c +++ b/lang/pocl/files/patch-lib_CL_devices_cpuinfo.c @@ -1,5 +1,5 @@ ---- lib/CL/devices/cpuinfo.c.orig 2021-10-12 16:33:15.000000000 +0200 -+++ lib/CL/devices/cpuinfo.c 2021-10-16 09:29:13.414668000 +0200 +--- lib/CL/devices/cpuinfo.c.orig 2022-06-10 10:09:05 UTC ++++ lib/CL/devices/cpuinfo.c @@ -34,6 +34,12 @@ #include "config.h" #include "cpuinfo.h" @@ -13,7 +13,7 @@ static const char* cpuinfo = "/proc/cpuinfo"; #define MAX_CPUINFO_SIZE 64*1024 //#define DEBUG_POCL_CPUINFO -@@ -41,9 +47,6 @@ +@@ -41,9 +47,6 @@ static const char* cpufreq_file="/sys/devices/system/c //Linux' cpufrec interface static const char* cpufreq_file="/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq"; @@ -23,7 +23,7 @@ /* Strings to parse in /proc/cpuinfo. Else branch is for x86, x86_64 */ #if defined __powerpc__ #define FREQSTRING "clock" -@@ -156,8 +159,51 @@ +@@ -156,8 +159,51 @@ pocl_cpuinfo_detect_max_clock_frequency() } return -1; } @@ -75,7 +75,7 @@ /** * Detects the number of parallel hardware threads supported by * the CPU by parsing the cpuinfo. -@@ -235,6 +281,19 @@ +@@ -235,6 +281,19 @@ pocl_cpuinfo_detect_compute_unit_count() } return -1; } @@ -95,7 +95,7 @@ #if __arm__ || __aarch64__ enum -@@ -302,6 +361,7 @@ +@@ -302,6 +361,7 @@ pocl_cpuinfo_get_cpu_name_and_vendor(cl_device_id devi * short_name is in the .data anyways.*/ device->long_name = device->short_name; @@ -103,7 +103,7 @@ /* default vendor and vendor_id, in case it cannot be found by other means */ device->vendor = cpuvendor_default; if (device->vendor_id == 0) -@@ -404,7 +464,26 @@ +@@ -404,7 +464,26 @@ pocl_cpuinfo_get_cpu_name_and_vendor(cl_device_id devi char *new_name = (char*)malloc (len); snprintf (new_name, len, "%s-%s", device->short_name, start); device->long_name = new_name; @@ -130,7 +130,7 @@ /* If the vendor_id field is still empty, we should get the PCI ID associated * with the CPU vendor (if there is one), to be ready for the (currently * provisional) OpenCL 3.0 specification that has finally clarified the -@@ -415,13 +494,23 @@ +@@ -415,13 +494,23 @@ pocl_cpuinfo_get_cpu_name_and_vendor(cl_device_id devi */ if (!device->vendor_id) { diff --git a/lang/pocl/files/patch-lib_CL_pocl__timing.c b/lang/pocl/files/patch-lib_CL_pocl__timing.c new file mode 100644 index 000000000000..5450f1b75652 --- /dev/null +++ b/lang/pocl/files/patch-lib_CL_pocl__timing.c @@ -0,0 +1,13 @@ +--- lib/CL/pocl_timing.c.orig 2022-06-10 10:09:05 UTC ++++ lib/CL/pocl_timing.c +@@ -69,8 +69,8 @@ uint64_t pocl_gettimemono_ns() { + struct timespec timespec; + # ifdef CLOCK_MONOTONIC_RAW /* Linux */ + clock_gettime(CLOCK_MONOTONIC_RAW, ×pec); +-# elif defined(CLOCK_UPTIME_FAST) /* FreeBSD, DragonFlyBSD, etc */ +- clock_gettime(CLOCK_UPTIME_FAST, ×pec); ++# elif defined(CLOCK_MONOTONIC_FAST) /* FreeBSD, DragonFlyBSD, etc */ ++ clock_gettime(CLOCK_MONOTONIC_FAST, ×pec); + # elif defined(CLOCK_MONOTONIC) /* POSIX 2008, NetBSD, etc */ + clock_gettime(CLOCK_MONOTONIC, ×pec); + # else /* older POSIX didn't define CLOCK_MONOTONIC */ diff --git a/lang/pocl/pkg-descr b/lang/pocl/pkg-descr index df8597fc68dc..8c09ff01267d 100644 --- a/lang/pocl/pkg-descr +++ b/lang/pocl/pkg-descr @@ -1,17 +1,28 @@ -Portable OpenCL aims to be an efficient open source (MIT-licensed) -implementation of the OpenCL 1.2 standard. +[ +{ type: install + message: <= 3.0) aims to be an efficient open source +(MIT-licensed) implementation of the OpenCL 2.X standard with +adaptions of OpenCL 3.0. In addition to producing an easily portable open source OpenCL implementation, another major goal of the project is improving performance portability of OpenCL programs with compiler optimizations, reducing the need for target-dependent manual -optimizations. At the core of POCL is a set of LLVM passes used -to statically parallelize multiple work-items with the kernel +optimizations. At the core of pocl is a set of LLVM passes +used to statically parallelize multiple work-items with the kernel compiler, even in the presence of work-group barriers. This enables parallelization of the fine-grained static concurrency in the work -groups in multiple ways (SIMD, VLIW, superscalar, ...). +groups in multiple ways (SIMD, VLIW, superscalar,...). The code base is modularized to allow easy adding of new "device drivers" in the host-device layer. A generic multithreaded "target driver" is included. It allows running OpenCL applications on a host that supports the pthread library with multithreading at the work group granularity. + +EOM +} +] diff --git a/lang/pocl/pkg-message b/lang/pocl/pkg-message new file mode 100644 index 000000000000..802c2dee25b1 --- /dev/null +++ b/lang/pocl/pkg-message @@ -0,0 +1,18 @@ +[ +{ type: install + message: <