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
This commit is contained in:
Matej Cepl 2021-12-05 07:19:11 +00:00 committed by Git OBS Bridge
parent 9949f4b209
commit 9796138577
5 changed files with 43 additions and 6 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:423216d8afc5923b15df86037c6053bf030d15cc9e3224206ef868c2d63dd6dc
size 10264801

3
numpy-1.21.4.zip Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3a53237368feac510d2fc38d46eefce044d906e29ec40c1b3fccdcad96595ce0
size 9221439

View File

@ -0,0 +1,29 @@
From 2113cad8cbb4c4bc9469e0c94025bd7cbbe6f2d6 Mon Sep 17 00:00:00 2001
From: Thomas Green <tomgreen66@hotmail.com>
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;
}

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Dec 3 10:54:01 UTC 2021 - Guillaume GARDET <guillaume.gardet@opensuse.org>
- Add patch to fix aarch64 support:
* numpy-fix-cpu_asimdfhm.patch
-------------------------------------------------------------------
Fri Nov 19 00:33:15 UTC 2021 - Steve Kowalik <steven.kowalik@suse.com>

View File

@ -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}