Init a new branch to update to meson v1.11#27
Conversation
This module aims to provide a more dynamic way to control common features between compilers that would generally require special headers, arguments, or compile-time test cases, quite ideal to manage CPU features and solve compatibility issues.
and brings X86 CPU features
- Removes CPU features implmentation and move them NumPy meson scripts
- Removes attr 'header', since it can be handeled within
a configuration file
- re-implment method test, make it more simple
- Implment method `multi_targets`
Handels multi_targets via meson script was pretty anoyning
from python make it much simpler
- Improve multi_targets() method:
* rename multi_target() to multi_targets() use plural to indicates handling more than one CPU target
* Split the function into multiple smaller functions for better organization.
* Modify the function to return a single library array instead of a list of libraries.
* Avoid returning the result of testing the enabled features to keep it
* simple.
* Enhance debugging capabilities by printing the test results of enabled targets.
* Avoid returns static_lib instead wraps it with another object
to reduce the number of final generated objects also
to sort the all objects based on lowest interest
* validate the sort of dispatch features
- fix mypy
- init the module doc
- allow disables the cache
- fix method `features.new` name during trigger arguments errors
- generate config files inside the builddir instead
- add test cases
- cache tests within coredata
- fix duplicate baseline build
- refactor module name from `feature` to `features`
- fix python typying
- Attributes without match were never actually added to the list - Only the last conflict actually had an effect, earlier results were discarded
a379a6f to
4b7735b
Compare
…dependencies Also a bit of refactoring and improvements to OpenBLAS and MKL logic to reduce the amount of unnecessary checks.
The two things fixed here: - `xcrun` isn't available on very old versions (MacPorts still supports 10.5/10.6) - Version comparison is done correctly now with `mesonlib.version_compare` See numpy/numpy#25406 for the bug report.
2acb911 to
336cf07
Compare
…eson Port blas_lapack.py to the current Meson dependency/compiler APIs and fix all mypy errors.
4221e53 to
91cdc45
Compare
Sayed: Fix BLAS/LAPACK 3.14 subprocess encoding; guard ios_ver for mypy < 3.13
main.f90 uses default 32-bit integers, so ILP64 (e.g. MKL) segfaults.
91cdc45 to
ce09643
Compare
| # We also need the SDK to be >=13.3 (meaning at least XCode 14.3) | ||
| cmd = ['xcrun', '-sdk', 'macosx', '--show-sdk-version'] | ||
| sdk_version = subprocess.run(cmd, capture_output=True, check=True, text=True).stdout.strip() | ||
| sdk_version = subprocess.run(cmd, capture_output=True, check=True, encoding='utf-8').stdout.strip() |
There was a problem hiding this comment.
That fixes the 3.14 subprocess encoding. IDK if this bug has been reported or not.
There was a problem hiding this comment.
This is only in SciPy and in the open upstream BLAS PR. In SciPy it just leaves both the text and encoding keywords at their default, that works too.
|
Verified by numpy/numpy#31633 |
rgommers
left a comment
There was a problem hiding this comment.
Thanks @seiko2plus. I agree that starting a new branch is healthy; I tried to resolve merge conflicts, but it's not easy indeed. This new branch is purely additive to upstream 1.11.1, and passes CI, so is good to go.
I'll merge this and add branch protection, then make this the new default branch. I also verified that nothing relies on the branch name; switching the default branch should work fine as long as the old branch stays around.
Likely during the merge to v1.9.2 (#24), an incomplete or diverged rebase broke the
mesonsub-project functionality (see CI errors within numpy/numpy#29699). Therefore, I created a new clean branchmain-numpymeson-1.11formesonv1.11, also I made a few changes to make the module feature, and blas compatible with the latest versions ofmeson; see the original PR mesonbuild#11307.back-ported
importlib.resourcesfunctions on Python >=3.13 #4AI disclosure
Parts of this PR were written with the assistance of an AI coding tool
(Claude Code). All changes were reviewed, tested, and verified by me; I take
responsibility for the contents.