From 9796138577d2da78827582957fd7441afc678d448242410ff2a1791308ca28a2 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Sun, 5 Dec 2021 07:19:11 +0000 Subject: [PATCH 1/4] Accepting request 935455 from home:Guillaume_G:branches:devel:languages:python:numeric - Add patch to fix aarch64 support: * numpy-fix-cpu_asimdfhm.patch OBS-URL: https://build.opensuse.org/request/show/935455 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numpy?expand=0&rev=100 --- numpy-1.21.2.zip | 3 --- numpy-1.21.4.zip | 3 +++ numpy-fix-cpu_asimdfhm.patch | 29 +++++++++++++++++++++++++++++ python-numpy.changes | 6 ++++++ python-numpy.spec | 8 +++++--- 5 files changed, 43 insertions(+), 6 deletions(-) delete mode 100644 numpy-1.21.2.zip create mode 100644 numpy-1.21.4.zip create mode 100644 numpy-fix-cpu_asimdfhm.patch diff --git a/numpy-1.21.2.zip b/numpy-1.21.2.zip deleted file mode 100644 index a93fec1..0000000 --- a/numpy-1.21.2.zip +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:423216d8afc5923b15df86037c6053bf030d15cc9e3224206ef868c2d63dd6dc -size 10264801 diff --git a/numpy-1.21.4.zip b/numpy-1.21.4.zip new file mode 100644 index 0000000..248026a --- /dev/null +++ b/numpy-1.21.4.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3a53237368feac510d2fc38d46eefce044d906e29ec40c1b3fccdcad96595ce0 +size 9221439 diff --git a/numpy-fix-cpu_asimdfhm.patch b/numpy-fix-cpu_asimdfhm.patch new file mode 100644 index 0000000..13f19b3 --- /dev/null +++ b/numpy-fix-cpu_asimdfhm.patch @@ -0,0 +1,29 @@ +From 2113cad8cbb4c4bc9469e0c94025bd7cbbe6f2d6 Mon Sep 17 00:00:00 2001 +From: Thomas Green +Date: Tue, 16 Nov 2021 22:36:18 +0000 +Subject: [PATCH] Update cpu_asimdfhm.c + +Updated `vfmlal_low_u32` and `vfmlslq_high_u32` to their `f16` new names. Described here: + +https://www.mail-archive.com/gcc-bugs@gcc.gnu.org/msg664008.html + +Many of the intrinsics had names updated. Supposedly previous specifications were not published so old names not required. +--- + numpy/distutils/checks/cpu_asimdfhm.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/numpy/distutils/checks/cpu_asimdfhm.c b/numpy/distutils/checks/cpu_asimdfhm.c +index bb437aa4035..cb49751c4c2 100644 +--- a/numpy/distutils/checks/cpu_asimdfhm.c ++++ b/numpy/distutils/checks/cpu_asimdfhm.c +@@ -10,8 +10,8 @@ int main(void) + float32x4_t vf = vdupq_n_f32(1.0f); + float32x2_t vlf = vdup_n_f32(1.0f); + +- int ret = (int)vget_lane_f32(vfmlal_low_u32(vlf, vlhp, vlhp), 0); +- ret += (int)vgetq_lane_f32(vfmlslq_high_u32(vf, vhp, vhp), 0); ++ int ret = (int)vget_lane_f32(vfmlal_low_f16(vlf, vlhp, vlhp), 0); ++ ret += (int)vgetq_lane_f32(vfmlslq_high_f16(vf, vhp, vhp), 0); + + return ret; + } diff --git a/python-numpy.changes b/python-numpy.changes index 44318d4..8fc25fd 100644 --- a/python-numpy.changes +++ b/python-numpy.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Dec 3 10:54:01 UTC 2021 - Guillaume GARDET + +- Add patch to fix aarch64 support: + * numpy-fix-cpu_asimdfhm.patch + ------------------------------------------------------------------- Fri Nov 19 00:33:15 UTC 2021 - Steve Kowalik diff --git a/python-numpy.spec b/python-numpy.spec index 705a220..1117bc9 100644 --- a/python-numpy.spec +++ b/python-numpy.spec @@ -24,8 +24,8 @@ %endif %global flavor @BUILD_FLAVOR@%{nil} -%define ver 1.21.2 -%define _ver 1_21_2 +%define ver 1.21.4 +%define _ver 1_21_4 %define pname python-numpy %define hpc_upcase_trans_hyph() %(echo %{**} | tr [a-z] [A-Z] | tr '-' '_') %if "%{flavor}" == "" @@ -86,6 +86,8 @@ Patch0: numpy-buildfix.patch Patch1: numpy-1.9.0-remove-__declspec.patch # PATCH-FIX-UPSTREAM -- gh#numpy/numpy/commit/8871c7285fc097fd1bf713aa184cba7e2804f625 Patch2: bpo-45167-fixes.patch +# PATCH-FIX-UPSTREAM -- h#numpy/numpy/commit/2113cad8cbb4c4bc9469e0c94025bd7cbbe6f2d6 +Patch3: numpy-fix-cpu_asimdfhm.patch BuildConflicts: gcc11 < 11.2 BuildRequires: %{python_module Cython >= 0.29.24} BuildRequires: %{python_module base >= 3.7} @@ -178,7 +180,7 @@ sed -i '1s/^#!.*$//' numpy/{compat/setup,random/_examples/cython/setup,distutils sed -i '1s/^#!.*$//' numpy/random/_examples/cython/*.pyx # force cythonization -rm PKG-INFO +rm -f PKG-INFO %build %define _lto_cflags %{nil} From af7f736e1f3127c7b4039b3843c0fe566d13272bfb85262c72086e299ea29c7f Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Sun, 5 Dec 2021 07:26:26 +0000 Subject: [PATCH 2/4] - Fix abbreviated references OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numpy?expand=0&rev=101 --- python-numpy.changes | 5 +++++ python-numpy.spec | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/python-numpy.changes b/python-numpy.changes index 8fc25fd..058d77e 100644 --- a/python-numpy.changes +++ b/python-numpy.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Dec 5 07:26:13 UTC 2021 - Matej Cepl + +- Fix abbreviated references + ------------------------------------------------------------------- Fri Dec 3 10:54:01 UTC 2021 - Guillaume GARDET diff --git a/python-numpy.spec b/python-numpy.spec index 1117bc9..e489f24 100644 --- a/python-numpy.spec +++ b/python-numpy.spec @@ -84,9 +84,9 @@ Source99: python-numpy-rpmlintrc Patch0: numpy-buildfix.patch # PATCH-FIX-OPENSUSE numpy-1.9.0-remove-__declspec.patch -- fix for spurious compiler warnings that cause build failure Patch1: numpy-1.9.0-remove-__declspec.patch -# PATCH-FIX-UPSTREAM -- gh#numpy/numpy/commit/8871c7285fc097fd1bf713aa184cba7e2804f625 +# PATCH-FIX-UPSTREAM -- gh#numpy/numpy#20347 Patch2: bpo-45167-fixes.patch -# PATCH-FIX-UPSTREAM -- h#numpy/numpy/commit/2113cad8cbb4c4bc9469e0c94025bd7cbbe6f2d6 +# PATCH-FIX-UPSTREAM -- gh#numpy/numpy#20388 Patch3: numpy-fix-cpu_asimdfhm.patch BuildConflicts: gcc11 < 11.2 BuildRequires: %{python_module Cython >= 0.29.24} From ba52966c6775931a1e59ea6ce531a7f25c355d3aa01c6eba1a3274733cf97f06 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Sun, 5 Dec 2021 20:29:26 +0000 Subject: [PATCH 3/4] Redownload the zipball again. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numpy?expand=0&rev=102 --- numpy-1.21.4.zip | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/numpy-1.21.4.zip b/numpy-1.21.4.zip index 248026a..078ed24 100644 --- a/numpy-1.21.4.zip +++ b/numpy-1.21.4.zip @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3a53237368feac510d2fc38d46eefce044d906e29ec40c1b3fccdcad96595ce0 -size 9221439 +oid sha256:e6c76a87633aa3fa16614b61ccedfae45b91df2767cf097aa9c933932a7ed1e0 +size 10646392 From ad46d677c9bfb61e5981f78417a6b48a70d2abd50815e0575a2fb6ffcd6edc92 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 6 Dec 2021 08:39:03 +0000 Subject: [PATCH 4/4] Accepting request 935924 from home:Guillaume_G:branches:devel:languages:python:numeric Add missing version update in changelog OBS-URL: https://build.opensuse.org/request/show/935924 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numpy?expand=0&rev=103 --- python-numpy.changes | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/python-numpy.changes b/python-numpy.changes index 058d77e..8d4fea5 100644 --- a/python-numpy.changes +++ b/python-numpy.changes @@ -6,6 +6,25 @@ Sun Dec 5 07:26:13 UTC 2021 - Matej Cepl ------------------------------------------------------------------- Fri Dec 3 10:54:01 UTC 2021 - Guillaume GARDET +- Update to 1.21.4: + * #20278: BUG: Fix shadowed reference of dtype in type stub + * #20293: BUG: Fix headers for universal2 builds + * #20294: BUG: VOID_nonzero could sometimes mutate alignment flag + * #20295: BUG: Do not use nonzero fastpath on unaligned arrays + * #20296: BUG: Distutils patch to allow for 2 as a minor version (!) + * #20297: BUG, SIMD: Fix 64-bit/8-bit integer division by a scalar + * #20298: BUG, SIMD: Workaround broadcasting SIMD 64-bit integers on MSVC... + * #20300: REL: Prepare for the NumPy 1.21.4 release. + * #20302: TST: Fix a Arrayterator typing test failure +- Release to 1.21.3: + * #19745: ENH: Add dtype-support to 3 `generic/ndarray methods + * #19955: BUG: Resolve Divide by Zero on Apple silicon + test failures... + * #19958: MAINT: Mark type-check-only ufunc subclasses as ufunc aliases... + * #19994: BUG: np.tan(np.inf) test failure + * #20080: BUG: Correct incorrect advance in PCG with emulated int128 + * #20081: BUG: Fix NaT handling in the PyArray_CompareFunc for datetime... + * #20082: DOC: Ensure that we add documentation also as to the dict for... + * #20106: BUG: core: result_type(0, np.timedelta64(4)) would seg. fault. - Add patch to fix aarch64 support: * numpy-fix-cpu_asimdfhm.patch