Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply some upstream NumPy patches for CPU detection #32080

Closed
jhpalmieri opened this issue Jun 28, 2021 · 13 comments
Closed

Apply some upstream NumPy patches for CPU detection #32080

jhpalmieri opened this issue Jun 28, 2021 · 13 comments

Comments

@jhpalmieri
Copy link
Member

Followup to #32021

Depends on #32488

Component: packages: standard

Branch/Commit: u/jhpalmieri/numpy-cpu-patches @ f7dd6dd

Issue created by migration from https://trac.sagemath.org/ticket/32080

@jhpalmieri
Copy link
Member Author

Branch: u/jhpalmieri/numpy-cpu-patches

@jhpalmieri
Copy link
Member Author

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

@jhpalmieri
Copy link
Member Author

Commit: f7dd6dd

@jhpalmieri
Copy link
Member Author

Dependencies: #32021

@mkoeppe
Copy link
Member

mkoeppe commented Jun 29, 2021

@mkoeppe
Copy link
Member

mkoeppe commented Jul 6, 2021

comment:5

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.

@mkoeppe
Copy link
Member

mkoeppe commented Jul 22, 2021

Changed dependencies from #32021 to #32257

@mkoeppe mkoeppe modified the milestones: sage-9.4, sage-9.5 Aug 9, 2021
@mkoeppe
Copy link
Member

mkoeppe commented Sep 9, 2021

Changed dependencies from #32257 to #32488

@mkoeppe
Copy link
Member

mkoeppe commented Sep 9, 2021

comment:9

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.

@mkoeppe
Copy link
Member

mkoeppe commented Sep 9, 2021

Changed author from John Palmieri to none

@mkoeppe
Copy link
Member

mkoeppe commented Sep 9, 2021

Changed reviewer from https://github.com/mkoeppe/sage/actions/runs/1056686451 to none

@mkoeppe mkoeppe removed this from the sage-9.5 milestone Sep 9, 2021
@jhpalmieri
Copy link
Member Author

comment:10

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants