Opened 18 months ago

Closed 15 months ago

## #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: |

### Description

Followup to #32021

### Change History (11)

### comment:1 Changed 18 months ago by

Status: | new → needs_review |
---|

### comment:2 Changed 18 months ago by

Branch: | → u/jhpalmieri/numpy-cpu-patches |
---|

### comment:3 Changed 18 months ago by

Commit: | → f7dd6ddd7281ab918c9e868aa875a3f5c2bea91f |
---|---|

Dependencies: | → #32021 |

### comment:4 Changed 18 months ago by

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

### comment:5 Changed 17 months ago by

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

Dependencies: | #32021 → #32257 |
---|

### comment:7 Changed 17 months ago by

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

### comment:8 Changed 16 months ago by

Milestone: | sage-9.4 → sage-9.5 |
---|

### comment:9 Changed 15 months ago by

Authors: | John Palmieri |
---|---|

Dependencies: | #32257 → #32488 |

Milestone: | sage-9.5 → sage-duplicate/invalid/wontfix |

Reviewers: | https://github.com/mkoeppe/sage/actions/runs/1056686451 |

- 19074 was merged in https://github.com/numpy/numpy/releases/tag/v1.21.0rc1
- 19365 was merged in https://github.com/numpy/numpy/releases/tag/v1.21.1

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

Status: | needs_review → positive_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

Resolution: | → invalid |
---|---|

Status: | positive_review → closed |

**Note:**See TracTickets for help on using tickets.

New commits:

`header guard for sage-build-env`

`move ifs from sage-build-env-config to sage-build-env`

`disable march=native for numpy`

`correct explanation as popcnt wasnt the problem here`

`more consistent header guard name`

`trac 32080: add two upstream patches to NumPy`