#32080 closed defect (invalid)

Apply some upstream NumPy patches for CPU detection

Reported by: John Palmieri Owned by:
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: packages: standard Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: u/jhpalmieri/numpy-cpu-patches (Commits, GitHub, GitLab) Commit: f7dd6ddd7281ab918c9e868aa875a3f5c2bea91f
Dependencies: #32488 Stopgaps:

Status badges

Description

Followup to #32021

Change History (11)

comment:1 Changed 18 months ago by John Palmieri

Status: newneeds_review

comment:2 Changed 18 months ago by John Palmieri

Branch: u/jhpalmieri/numpy-cpu-patches

comment:3 Changed 18 months ago by John Palmieri

Commit: f7dd6ddd7281ab918c9e868aa875a3f5c2bea91f
Dependencies: #32021

New commits:

07a66e0header guard for sage-build-env
ba795b5move ifs from sage-build-env-config to sage-build-env
b3e2a53disable march=native for numpy
9c87b65correct explanation as popcnt wasnt the problem here
56ffafbmore consistent header guard name
f7dd6ddtrac 32080: add two upstream patches to NumPy

comment:4 Changed 18 months ago by Matthias Köppe

Reviewers: https://github.com/mkoeppe/sage/actions/runs/984105414, https://github.com/mkoeppe/sage/actions/runs/984105423

comment:5 Changed 17 months ago by Matthias Köppe

The cygwin-standard build of this ticket (https://github.com/mkoeppe/sage/runs/2947289812?check_suite_focus=true) failed because of a mistake in my CI scripts. I'm pushing the necessary changes to #32021 so that we can test it properly.

comment:6 Changed 17 months ago by Matthias Köppe

Dependencies: #32021#32257

comment:7 Changed 17 months ago by Matthias Köppe

Reviewers: https://github.com/mkoeppe/sage/actions/runs/984105414, https://github.com/mkoeppe/sage/actions/runs/984105423https://github.com/mkoeppe/sage/actions/runs/1056686451

comment:8 Changed 16 months ago by Matthias Köppe

Milestone: sage-9.4sage-9.5

comment:9 Changed 15 months ago by Matthias Köppe

Authors: John Palmieri
Dependencies: #32257#32488
Milestone: sage-9.5sage-duplicate/invalid/wontfix
Reviewers: https://github.com/mkoeppe/sage/actions/runs/1056686451

So the upgrade to #32488 makes these patches obsolete.

The question whether this change:

--- a/build/pkgs/numpy/spkg-install.in
+++ b/build/pkgs/numpy/spkg-install.in
@@ -22,10 +22,6 @@ python3 ../lapack_conf.py
 export FFLAGS="$FFLAGS -fPIC"
 export FCFLAGS="$FCFLAGS -fPIC"
 
-# Numpy 1.20.3 enables some intrinsics on machines without support with `-march=native`.
-# We disable it until this is fixed.
-export CFLAGS="$CFLAGS_NON_NATIVE"
-
 export NUMPY_FCONFIG="config_fc --noopt --noarch"
 if [ "$SAGE_FAT_BINARY" = "yes" ]; then
     export NUMPY_FCONFIG="--cpu-baseline=NONE"

should be done can be reopened after #32488, #32434, #32424 have been resolved.

comment:10 Changed 15 months ago by John Palmieri

Status: needs_reviewpositive_review

Okay, I will leave the decision about whether to remove export CFLAGS="$CFLAGS_NON_NATIVE" to others. I don't know anything about NumPy? or how this might affect its performance.

comment:11 Changed 15 months ago by Matthias Köppe

Resolution: invalid
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.