From 31675ed30aabe8edbd9568fd04dd20d411543807995ebd0b196637ec7e2b4935 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Sun, 5 Dec 2021 07:19:11 +0000 Subject: [PATCH] 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}