From: olafmersmann <olafmersmann@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] python3-numpy: Use OpenBLAS when available.
Date: Sun, 10 Jan 2021 16:38:23 +0100 [thread overview]
Message-ID: <20210110153823.v7seUGBfIG8V3tgU2XtzbtF9zI9XzMgwLliCrgpvtow@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-27797@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 466 bytes --]
There is an updated pull request by olafmersmann against master on the void-packages repository
https://github.com/olafmersmann/void-packages python3-numpy
https://github.com/void-linux/void-packages/pull/27797
python3-numpy: Use OpenBLAS when available.
Just like `python3-scipy`, `python3-numpy` should use OpenBLAS when available and fall back to BLAS/LAPACK otherwise.
A patch file from https://github.com/void-linux/void-packages/pull/27797.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-python3-numpy-27797.patch --]
[-- Type: text/x-diff, Size: 2250 bytes --]
From cc6142b175c2e64ac72a5e72c52340e2e178b33b Mon Sep 17 00:00:00 2001
From: Olaf Mersmann <olafm@p-value.net>
Date: Sat, 9 Jan 2021 23:11:42 +0100
Subject: [PATCH] python3-numpy: Use OpenBLAS on platforms that support it.
---
srcpkgs/python3-numpy/files/site.cfg.openblas | 4 ++++
srcpkgs/python3-numpy/template | 20 +++++++++++++++++--
2 files changed, 22 insertions(+), 2 deletions(-)
create mode 100644 srcpkgs/python3-numpy/files/site.cfg.openblas
diff --git a/srcpkgs/python3-numpy/files/site.cfg.openblas b/srcpkgs/python3-numpy/files/site.cfg.openblas
new file mode 100644
index 00000000000..a83f9155faf
--- /dev/null
+++ b/srcpkgs/python3-numpy/files/site.cfg.openblas
@@ -0,0 +1,4 @@
+[openblas]
+libraries = openblas
+library_dirs = /usr/lib
+include_dirs = /usr/include
diff --git a/srcpkgs/python3-numpy/template b/srcpkgs/python3-numpy/template
index 619040f2892..a3e33570d9b 100644
--- a/srcpkgs/python3-numpy/template
+++ b/srcpkgs/python3-numpy/template
@@ -1,11 +1,12 @@
# Template file for 'python3-numpy'
pkgname=python3-numpy
version=1.19.5
-revision=1
+revision=2
wrksrc="numpy-${version}"
build_style=python3-module
hostmakedepends="python3-setuptools python3-Cython gcc-fortran"
-makedepends="python3-devel lapack-devel cblas-devel"
+makedepends="python3-devel
+ $(vopt_if openblas 'openblas-devel' 'lapack-devel cblas-devel')"
depends="python3-setuptools"
short_desc="Fast and sophisticated array facility to Python3"
maintainer="bra1nwave <bra1nwave@protonmail.com>"
@@ -15,7 +16,22 @@ distfiles="https://github.com/numpy/numpy/archive/v${version}.tar.gz"
checksum=43fe3bcdf27a2eb27196a1d140385aeece71c8b1a6eda18d2c6365239e50c60f
alternatives="numpy:f2py:/usr/bin/f2py3"
+build_options="openblas"
+desc_option_openblas="Enable support for openblas accelerated linear algebra"
+
+case "$XBPS_TARGET_MACHINE" in
+ x86_64*|i686*|aarch64*|armv[67]*|ppc64*)
+ # Prefer accelerated routines where available
+ build_options_default="openblas"
+ ;;
+ *) ;;
+esac
+
post_patch() {
+ if [ -n "$build_option_openblas" ] ; then
+ cp "${FILESDIR}/site.cfg.openblas" site.cfg
+ fi
+
case "${XBPS_TARGET_MACHINE}" in
armv5tel-musl)
cp "${FILESDIR}/fenv-constants.h" numpy/core/src/npymath/
next prev parent reply other threads:[~2021-01-10 15:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-09 22:16 [PR PATCH] " olafmersmann
2021-01-09 22:20 ` [PR PATCH] [Updated] " olafmersmann
2021-01-10 15:38 ` olafmersmann [this message]
2021-01-10 19:12 ` [PR REVIEW] " ahesford
2021-01-10 20:59 ` [PR PATCH] [Updated] " olafmersmann
2021-01-10 21:02 ` [PR REVIEW] " olafmersmann
2021-01-12 23:53 ` [PR PATCH] [Updated] " olafmersmann
2021-01-17 18:12 ` [PR PATCH] [Closed]: " ahesford
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210110153823.v7seUGBfIG8V3tgU2XtzbtF9zI9XzMgwLliCrgpvtow@z \
--to=olafmersmann@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).