forked from pool/python-numpy
Compare commits
246 Commits
Author | SHA256 | Date | |
---|---|---|---|
f62ea266b2 | |||
cf9407f14c | |||
c0e6a1a4c7 | |||
8fc76b3557 | |||
5b86ce5e4d | |||
5d3f5395f7 | |||
ca90e3c8a7 | |||
32cea0c587 | |||
9e8139f90c | |||
79e298ad04 | |||
6e199229d3 | |||
bec1d9ad74 | |||
04389342d2 | |||
e5e258441f | |||
079cc09df6 | |||
9350058396 | |||
950e7d4a41 | |||
869ea14cd3 | |||
c47dae8375 | |||
50e9cfbf6b | |||
adcc16f741 | |||
edd60e5d10 | |||
c09f910cce | |||
43e93f8cea | |||
0c44f45ff9 | |||
33a6f574a9 | |||
8ce4520ead | |||
ad4bf88387 | |||
3d7c13b578 | |||
1dfe7b31d1 | |||
c7c3450678 | |||
211584182a | |||
6dc21206c3 | |||
e149f0cb5b | |||
2698ad8c6b | |||
a6763b3e9b | |||
6b81c58c75 | |||
7fcebde335 | |||
56fa262a6d | |||
58f55e2775 | |||
adfbe5f872 | |||
c5479985d3 | |||
8307078259 | |||
a4d2c5710d | |||
0dffee2e95 | |||
10d8d19460 | |||
bada428c78 | |||
d68d7a5cc8 | |||
a2a44450e8 | |||
d3624c65a5 | |||
9f3c5f50bd | |||
9d67365ab9 | |||
92b96662f9 | |||
667e485e2a | |||
db98fd23f4 | |||
dd56b17cdb | |||
0cd1b24682 | |||
714eeea639 | |||
a52f28a9f9 | |||
86e04028f8 | |||
2c1a78827f | |||
527bf65fb5 | |||
7696892d20 | |||
c46939bf86 | |||
c793af4453 | |||
c07dd1f804 | |||
6e247645cd | |||
409adf5858 | |||
3f91cc86e3 | |||
eefc1342c8 | |||
9de1686f54 | |||
02883a96ec | |||
87dc00ef25 | |||
812da66f8e | |||
d95e460342 | |||
4b830e648f | |||
db074a0111 | |||
46d5a03e25 | |||
9d866ca8d3 | |||
a7ec7495ab | |||
a1f81648e5 | |||
ad46d677c9 | |||
ba52966c67 | |||
af7f736e1f | |||
9796138577 | |||
2328010569 | |||
9949f4b209 | |||
52eaf4ce26 | |||
08facfee47 | |||
7cd8024d3a | |||
4b609746f3 | |||
c96fc808a3 | |||
e7c9721a26 | |||
0b4f6d23fe | |||
b54abb607a | |||
72ffe75e2f | |||
8200b106d4 | |||
696375d29d | |||
e26b263996 | |||
c7e05108e5 | |||
6b0fd26340 | |||
4e47611290 | |||
16887d977a | |||
e27db48e18 | |||
b27177045e | |||
5027d4ba1c | |||
b893c66c3a | |||
8140c2a849 | |||
e4c6fd1c43 | |||
cd12e33e65 | |||
d36528b0ab | |||
90512b6a86 | |||
2647c1b9cc | |||
28391653e3 | |||
68b917de82 | |||
eddae912bf | |||
589024d3d0 | |||
ca2a40df89 | |||
4920d2aaf4 | |||
88b9cfea4c | |||
ab79378cf9 | |||
ff0c08796d | |||
9e0ee404c8 | |||
55ebc72acb | |||
df803b1822 | |||
6f5d912eaf | |||
c435d72a44 | |||
ea52e4acc4 | |||
fee81c867f | |||
42f5627d37 | |||
a5d64b0b8c | |||
4555cf9980 | |||
a50fb5315b | |||
b771d963e1 | |||
f76f7bca93 | |||
29be322a4b | |||
bc4475f984 | |||
9a860be495 | |||
806fb71119 | |||
4a25d3a4dc | |||
3756b8af42 | |||
84607317fe | |||
136be57a2c | |||
a95f1ac5e7 | |||
590c88af60 | |||
90c21abf98 | |||
955dd5425c | |||
c3b090eec6 | |||
2934e52b92 | |||
4fd678ba61 | |||
1aded1c7b3 | |||
53d663ab65 | |||
6695e2c226 | |||
793bbb5e9d | |||
3e5c75258d | |||
b5912d8ab2 | |||
4e98884891 | |||
453c67acd2 | |||
3af9bf4445 | |||
60615a32a3 | |||
90605da46c | |||
7418fd5978 | |||
58be9ab6dc | |||
c9bf903fb6 | |||
e440f96c99 | |||
5e1238720c | |||
25512a8bbb | |||
6630543ee6 | |||
cd15dd2167 | |||
4ed8230673 | |||
be2c2ff31f | |||
23b173f379 | |||
9f32296479 | |||
d50624b717 | |||
e3f48a114e | |||
811ebadef3 | |||
13579fa2be | |||
9d89b4d70a | |||
5bf4d817ee | |||
657c0bc1ce | |||
b049adc9f4 | |||
76b54386b3 | |||
c3de8e2aeb | |||
18d76d858b | |||
484f16bf08 | |||
58fcc5e6c7 | |||
0782c0a445 | |||
bf2f4604de | |||
6be798bbfa | |||
8aa69f6956 | |||
39280035c5 | |||
17a9f05a74 | |||
86f4ebb8ed | |||
a9db530e5e | |||
e22abeab4d | |||
ef8b7cc7fa | |||
4fa9108c00 | |||
24df67b9a4 | |||
560a227704 | |||
c709c31ae8 | |||
bc36378310 | |||
b0104303c0 | |||
356eb6c492 | |||
9a299d1889 | |||
61d47c6163 | |||
b8838938c2 | |||
d68f7cec03 | |||
e11fb1df02 | |||
17dec2c552 | |||
0b7cdf7963 | |||
b899a1c85f | |||
bc31cfcf65 | |||
680be04ad9 | |||
acb14efbdb | |||
5a43e667c8 | |||
be91075e0c | |||
631b05e826 | |||
5b22870945 | |||
9521c1fa2a | |||
397afecd8d | |||
eb01a5abec | |||
1f403f5bf5 | |||
93784b1b28 | |||
7f54f2fdba | |||
8d10ebf29d | |||
5a5b35419d | |||
9512ffddf4 | |||
ecb12a2a9e | |||
a941e61bba | |||
597be76d88 | |||
2fb0d92668 | |||
f81be4a10d | |||
0c1db2c7d4 | |||
2a4bdd9050 | |||
ff23b9631f | |||
1500bff18a | |||
c488ce8a65 | |||
5a8abcad01 | |||
f413be8ec5 | |||
6d3d2856f1 | |||
6e2acbbf14 | |||
9b27577856 | |||
bfddde775c | |||
47c1476669 | |||
c8ddef0a9a | |||
a0a8503e2f |
@ -1,64 +0,0 @@
|
||||
From bf50761dee8f0670542bcdc1fd9bff5cdb0448d4 Mon Sep 17 00:00:00 2001
|
||||
From: Fabian Vogt <fvogt@suse.de>
|
||||
Date: Thu, 28 Mar 2024 14:39:45 +0100
|
||||
Subject: [PATCH] BUG: Fix test_impossible_feature_enable failing without
|
||||
BASELINE_FEAT
|
||||
|
||||
If the build has no baseline features set, the test ended up setting
|
||||
e.g. NPY_ENABLE_CPU_FEATURES="ASIMDHP, None". This actually made the
|
||||
execution succeed, as the warning for decoding "None" overrode the
|
||||
error for the real feature. Fix the error handling there by removing
|
||||
the errorneous "return 0;", add a test for this, and avoid passing
|
||||
"None" by accident.
|
||||
---
|
||||
numpy/core/src/common/npy_cpu_features.c | 1 -
|
||||
numpy/core/tests/test_cpu_features.py | 14 ++++++++++++--
|
||||
2 files changed, 12 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/numpy/core/src/common/npy_cpu_features.c b/numpy/core/src/common/npy_cpu_features.c
|
||||
index bd149f8b4..f4d25cc50 100644
|
||||
--- a/numpy/core/src/common/npy_cpu_features.c
|
||||
+++ b/numpy/core/src/common/npy_cpu_features.c
|
||||
@@ -324,7 +324,6 @@ npy__cpu_check_env(int disable, const char *env) {
|
||||
) < 0) {
|
||||
return -1;
|
||||
}
|
||||
- return 0;
|
||||
}
|
||||
|
||||
#define NOTSUPP_BODY \
|
||||
diff --git a/numpy/core/tests/test_cpu_features.py b/numpy/core/tests/test_cpu_features.py
|
||||
index 48ab30a4a..88e4ad185 100644
|
||||
--- a/numpy/core/tests/test_cpu_features.py
|
||||
+++ b/numpy/core/tests/test_cpu_features.py
|
||||
@@ -308,8 +308,8 @@ def test_impossible_feature_enable(self):
|
||||
err_type = "RuntimeError"
|
||||
self._expect_error(msg, err_type)
|
||||
|
||||
- # Ensure that only the bad feature gets reported
|
||||
- feats = f"{bad_feature}, {self.BASELINE_FEAT}"
|
||||
+ # Ensure that it fails even when providing garbage in addition
|
||||
+ feats = f"{bad_feature}, Foobar"
|
||||
self.env['NPY_ENABLE_CPU_FEATURES'] = feats
|
||||
msg = (
|
||||
f"You cannot enable CPU features \\({bad_feature}\\), since they "
|
||||
@@ -317,6 +317,16 @@ def test_impossible_feature_enable(self):
|
||||
)
|
||||
self._expect_error(msg, err_type)
|
||||
|
||||
+ if self.BASELINE_FEAT is not None:
|
||||
+ # Ensure that only the bad feature gets reported
|
||||
+ feats = f"{bad_feature}, {self.BASELINE_FEAT}"
|
||||
+ self.env['NPY_ENABLE_CPU_FEATURES'] = feats
|
||||
+ msg = (
|
||||
+ f"You cannot enable CPU features \\({bad_feature}\\), since "
|
||||
+ "they are not supported by your machine."
|
||||
+ )
|
||||
+ self._expect_error(msg, err_type)
|
||||
+
|
||||
is_linux = sys.platform.startswith('linux')
|
||||
is_cygwin = sys.platform.startswith('cygwin')
|
||||
machine = platform.machine()
|
||||
--
|
||||
2.44.0
|
||||
|
@ -1,46 +0,0 @@
|
||||
From 79e7c3c3262374de778145946b612135fb7cd581 Mon Sep 17 00:00:00 2001
|
||||
From: Fabian Vogt <fvogt@suse.de>
|
||||
Date: Thu, 28 Mar 2024 13:15:54 +0100
|
||||
Subject: [PATCH] feature module: Fix handling of multiple conflicts per
|
||||
attribute
|
||||
|
||||
- Attributes without match were never actually added to the list
|
||||
- Only the last conflict actually had an effect, earlier results were
|
||||
discarded
|
||||
---
|
||||
vendored-meson/meson/mesonbuild/modules/features/module.py | 7 ++-----
|
||||
1 file changed, 2 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/vendored-meson/meson/mesonbuild/modules/features/module.py b/vendored-meson/meson/mesonbuild/modules/features/module.py
|
||||
index 0be6af06c..a6f357b3f 100644
|
||||
--- a/vendored-meson/meson/mesonbuild/modules/features/module.py
|
||||
+++ b/vendored-meson/meson/mesonbuild/modules/features/module.py
|
||||
@@ -371,15 +371,12 @@ class Module(NewExtensionModule):
|
||||
values: List[ConflictAttr] = getattr(fet, attr)
|
||||
accumulate_values = test_result[attr] # type: ignore
|
||||
for conflict in values:
|
||||
- if not conflict.match:
|
||||
- accumulate_values.append(conflict.val)
|
||||
- continue
|
||||
conflict_vals: List[str] = []
|
||||
# select the acc items based on the match
|
||||
new_acc: List[str] = []
|
||||
for acc in accumulate_values:
|
||||
# not affected by the match so we keep it
|
||||
- if not conflict.match.match(acc):
|
||||
+ if not (conflict.match and conflict.match.match(acc)):
|
||||
new_acc.append(acc)
|
||||
continue
|
||||
# no filter so we totaly escape it
|
||||
@@ -396,7 +393,7 @@ class Module(NewExtensionModule):
|
||||
continue
|
||||
conflict_vals.append(conflict.mjoin.join(filter_val))
|
||||
new_acc.append(conflict.val + conflict.mjoin.join(conflict_vals))
|
||||
- test_result[attr] = new_acc # type: ignore
|
||||
+ accumulate_values = test_result[attr] = new_acc # type: ignore
|
||||
|
||||
test_args = compiler.has_multi_arguments
|
||||
args = test_result['args']
|
||||
--
|
||||
2.44.0
|
||||
|
@ -1,3 +0,0 @@
|
||||
<multibuild>
|
||||
<package>gnu-hpc</package>
|
||||
</multibuild>
|
@ -1,53 +0,0 @@
|
||||
From 59694be29a71b17ad1ce58c865a5524c50bfedee Mon Sep 17 00:00:00 2001
|
||||
From: Ralf Gommers <ralf.gommers@gmail.com>
|
||||
Date: Fri, 16 Feb 2024 22:18:43 +0100
|
||||
Subject: [PATCH] TST: fix Cython compile test which invokes `meson`
|
||||
|
||||
Closes gh-24956
|
||||
|
||||
[skip circle]
|
||||
---
|
||||
numpy/core/tests/test_cython.py | 14 ++++++++++++--
|
||||
1 file changed, 12 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: numpy-1.26.4/numpy/core/tests/test_cython.py
|
||||
===================================================================
|
||||
--- numpy-1.26.4.orig/numpy/core/tests/test_cython.py
|
||||
+++ numpy-1.26.4/numpy/core/tests/test_cython.py
|
||||
@@ -37,6 +37,13 @@ def install_temp(tmpdir_factory):
|
||||
srcdir = os.path.join(os.path.dirname(__file__), 'examples', 'cython')
|
||||
build_dir = tmpdir_factory.mktemp("cython_test") / "build"
|
||||
os.makedirs(build_dir, exist_ok=True)
|
||||
+ # Ensure we use the correct Python interpreter even when `meson` is
|
||||
+ # installed in a different Python environment (see gh-24956)
|
||||
+ native_file = str(build_dir / 'interpreter-native-file.ini')
|
||||
+ with open(native_file, 'w') as f:
|
||||
+ f.write("[binaries]\n")
|
||||
+ f.write(f"python = '{sys.executable}'")
|
||||
+
|
||||
try:
|
||||
subprocess.check_call(["meson", "--version"])
|
||||
except FileNotFoundError:
|
||||
@@ -44,17 +51,20 @@ def install_temp(tmpdir_factory):
|
||||
if sys.platform == "win32":
|
||||
subprocess.check_call(["meson", "setup",
|
||||
"--buildtype=release",
|
||||
- "--vsenv", str(srcdir)],
|
||||
+ "--vsenv", "--native-file", native_file,
|
||||
+ str(srcdir)],
|
||||
cwd=build_dir,
|
||||
)
|
||||
else:
|
||||
- subprocess.check_call(["meson", "setup", str(srcdir)],
|
||||
+ subprocess.check_call(["meson", "setup",
|
||||
+ "--native-file", native_file, str(srcdir)],
|
||||
cwd=build_dir
|
||||
)
|
||||
subprocess.check_call(["meson", "compile", "-vv"], cwd=build_dir)
|
||||
|
||||
sys.path.append(str(build_dir))
|
||||
|
||||
+
|
||||
def test_is_timedelta64_object(install_temp):
|
||||
import checks
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2a02aba9ed12e4ac4eb3ea9421c420301a0c6460d9830d74a9df87efa4912010
|
||||
size 15786129
|
@ -1,28 +0,0 @@
|
||||
From: toddrme2178@gmail.com
|
||||
Date: 2014-09-09 04:45:00 +0000
|
||||
Subject: Remove windows-specific function
|
||||
Upstream: openSUSE Fix
|
||||
References:
|
||||
http://lists.opensuse.org/opensuse-packaging/2014-09/msg00004.html
|
||||
http://lists.opensuse.org/opensuse-packaging/2014-09/msg00005.html
|
||||
|
||||
__declspec(thread) is a windows-specific function that is causing
|
||||
spurious compiler warnings. These warnings can be safely ignored,
|
||||
but are being falsely flagged as serious problems that cause the
|
||||
build to fail. Since this is windows-specific, it can be
|
||||
safely removed.
|
||||
|
||||
|
||||
Index: numpy-1.24.0/numpy/core/setup_common.py
|
||||
===================================================================
|
||||
--- numpy-1.24.0.orig/numpy/core/setup_common.py
|
||||
+++ numpy-1.24.0/numpy/core/setup_common.py
|
||||
@@ -141,7 +141,7 @@ OPTIONAL_FILE_FUNCS = ["ftello", "fseeko
|
||||
OPTIONAL_MISC_FUNCS = ["backtrace", "madvise"]
|
||||
|
||||
# variable attributes tested via "int %s a" % attribute
|
||||
-OPTIONAL_VARIABLE_ATTRIBUTES = ["__thread", "__declspec(thread)"]
|
||||
+OPTIONAL_VARIABLE_ATTRIBUTES = ["__thread"]
|
||||
|
||||
# Subset of OPTIONAL_*_FUNCS which may already have HAVE_* defined by Python.h
|
||||
OPTIONAL_FUNCS_MAYBE = [
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:cf5d1c9e6837f8af9f92b6bd3e86d513cdc11f60fd62185cc49ec7d1aba34864
|
||||
size 18326228
|
BIN
numpy-2.2.2.tar.gz
(Stored with Git LFS)
Normal file
BIN
numpy-2.2.2.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -1,3 +1,184 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 24 16:06:08 UTC 2025 - Nicolas Morey <nicolas.morey@suse.com>
|
||||
|
||||
- Disable and remove support of gnu-hpc build flavours (bsc#1239982)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 24 16:32:10 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- Update to 2.2.2
|
||||
* New functions matvec and vecmat
|
||||
* Many improved annotations
|
||||
* Improved support for the new StringDType
|
||||
* Improved support for free threaded Python
|
||||
* Fixes for f2py
|
||||
## Deprecations
|
||||
* _add_newdoc_ufunc is now deprecated. ufunc.__doc__ = newdoc should
|
||||
be used instead.
|
||||
## Expired deprecations
|
||||
* bool(np.array([])) and other empty arrays will now raise an error.
|
||||
Use arr.size > 0 instead to check whether an array has no elements.
|
||||
## Compatibility notes
|
||||
* numpy.cov now properly transposes single-row (2d array) design
|
||||
matrices when rowvar=False. Previously, single-row design matrices
|
||||
would return a scalar in this scenario, which is not correct, so
|
||||
this is a behavior change and an array of the appropriate shape
|
||||
will now be returned.
|
||||
## New Features
|
||||
* New functions for matrix-vector and vector-matrix products
|
||||
* np.complexfloating[T, T] can now also be written as np.complexfloating[T]
|
||||
* UFuncs now support __dict__ attribute and allow overriding __doc__
|
||||
(either directly or via ufunc.__dict__["__doc__"]). __dict__ can be
|
||||
used to also override other properties, such as __module__ or
|
||||
__qualname__.
|
||||
* The “nbit” type parameter of np.number and its subtypes now defaults
|
||||
to typing.Any. This way, type-checkers will infer annotations such
|
||||
as x: np.floating as x: np.floating[Any], even in strict mode.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 12 16:55:08 UTC 2025 - Bernhard Wiedemann <bwiedemann@suse.com>
|
||||
|
||||
- Avoid writing non-deterministic .pyc files during build
|
||||
for reproducible builds
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 22 22:33:50 UTC 2024 - Matej Cepl <mcepl@cepl.eu>
|
||||
|
||||
- Add update-meson-1_5_2.patch (gh#numpy/numpy#27531)
|
||||
- Skip failing test test_api_importable
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 18 17:23:11 UTC 2024 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- Revert the switch to openblas, should skip test instead
|
||||
* see discussion at gh#scipy/scipy#21475
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 5 01:59:21 UTC 2024 - Richard Rahl <rrahl0@opensuse.org>
|
||||
|
||||
- update to 2.1.3:
|
||||
* #27512: MAINT: prepare 2.1.x for further development
|
||||
* #27537: MAINT: Bump actions/cache from 4.0.2 to 4.1.1
|
||||
* #27538: MAINT: Bump pypa/cibuildwheel from 2.21.2 to 2.21.3
|
||||
* #27539: MAINT: MSVC does not support #warning directive
|
||||
* #27543: BUG: Fix user dtype can-cast with python scalar during promotion
|
||||
* #27561: DEV: bump python to 3.12 in environment.yml
|
||||
* #27562: BLD: update vendored Meson to 1.5.2
|
||||
* #27563: BUG: weighted quantile for some zero weights (#27549)
|
||||
* #27565: MAINT: Use miniforge for macos conda test.
|
||||
* #27566: BUILD: satisfy gcc-13 pendantic errors
|
||||
* #27569: BUG: handle possible error for PyTraceMallocTrack
|
||||
* #27570: BLD: start building Windows free-threaded wheels [wheel build]
|
||||
* #27571: BUILD: vendor tempita from Cython
|
||||
* #27574: BUG: Fix warning "differs in levels of indirection" in npy_atomic.h...
|
||||
* #27592: MAINT: Update Highway to latest
|
||||
* #27593: BUG: Adjust numpy.i for SWIG 4.3 compatibility
|
||||
* #27616: BUG: Fix Linux QEMU CI workflow
|
||||
* #27668: BLD: Do not set __STDC_VERSION__ to zero during build
|
||||
* #27669: ENH: fix wasm32 runtime type error in numpy._core
|
||||
* #27672: BUG: Fix a reference count leak in npy_find_descr_for_scalar.
|
||||
* #27673: BUG: fixes for StringDType/unicode promoters
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 30 07:43:06 UTC 2024 - Guillaume GARDET <guillaume.gardet@opensuse.org>
|
||||
|
||||
- Use openblas instead of blas+lapack due to precision problems
|
||||
with scipy on aarch64 - https://github.com/scipy/scipy/issues/21475#issuecomment-2446077407
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 24 12:21:00 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
- Build with latest gcc for Leap 16.0
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 21 06:52:58 UTC 2024 - Richard Rahl <rrahl0@opensuse.org>
|
||||
|
||||
- update to 2.1.2
|
||||
* #27333: MAINT: prepare 2.1.x for further development
|
||||
* #27400: BUG: apply critical sections around populating the dispatch cache
|
||||
* #27406: BUG: Stub out get_build_msvc_version if distutils.msvccompiler...
|
||||
* #27416: BUILD: fix missing include for std::ptrdiff_t for C++23 language...
|
||||
* #27433: BLD: pin setuptools to avoid breaking numpy.distutils
|
||||
* #27437: BUG: Allow unsigned shift argument for np.roll
|
||||
* #27439: BUG: Disable SVE VQSort
|
||||
* #27471: BUG: rfftn axis bug
|
||||
* #27479: BUG: Fix extra decref of PyArray_UInt8DType.
|
||||
* #27480: CI: use PyPI not scientific-python-nightly-wheels for CI doc...
|
||||
* #27481: MAINT: Check for SVE support on demand
|
||||
* #27484: BUG: initialize the promotion state to be weak
|
||||
* #27501: MAINT: Bump pypa/cibuildwheel from 2.20.0 to 2.21.2
|
||||
* #27506: BUG: avoid segfault on bad arguments in ndarray.__array_function__
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 6 18:35:18 UTC 2024 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- Update to 2.1.1
|
||||
* #27259: BUG: revert unintended change in the return value of
|
||||
set_printoptions
|
||||
* #27266: BUG: fix reference counting bug in __array_interface__
|
||||
implementation...
|
||||
* #27267: TST: Add regression test for missing descr in
|
||||
array-interface
|
||||
* #27276: BUG: Fix #27256 and #27257
|
||||
* #27278: BUG: Fix array_equal for numeric and non-numeric scalar
|
||||
types
|
||||
* #27304: BUG: f2py: better handle filtering of public/private
|
||||
subroutines
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Aug 31 09:36:14 UTC 2024 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- Update to 2.1.0
|
||||
* Support for Python 3.13.
|
||||
* Preliminary support for free threaded Python 3.13.
|
||||
* Support for the array-api 2023.12 standard.
|
||||
## New functions
|
||||
* A new function np.unstack(array, axis=...) was added, which
|
||||
splits an array into a tuple of arrays along an axis. It serves
|
||||
as the inverse of numpy.stack. (gh-26579)
|
||||
## Deprecations
|
||||
* The fix_imports keyword argument in numpy.save is deprecated.
|
||||
Since NumPy 1.17, numpy.save uses a pickle protocol that no
|
||||
longer supports Python 2, and ignored fix_imports keyword. This
|
||||
keyword is kept only for backward compatibility. It is now
|
||||
deprecated. (gh-26452)
|
||||
* Passing non-integer inputs as the first argument of bincount is
|
||||
now deprecated, because such inputs are silently cast to
|
||||
integers with no warning about loss of precision. (gh-27076)
|
||||
## Expired deprecations
|
||||
* Scalars and 0D arrays are disallowed for numpy.nonzero and
|
||||
numpy.ndarray.nonzero. (gh-26268)
|
||||
* set_string_function internal function was removed and
|
||||
PyArray_SetStringFunction was stubbed out. (gh-26611)
|
||||
## C API changes
|
||||
* API symbols now hidden but customizable
|
||||
* Many shims removed from npy_3kcompat.h
|
||||
* New PyUFuncObject field process_core_dims_func
|
||||
## New Features
|
||||
* Preliminary Support for Free-Threaded CPython 3.13
|
||||
* f2py can generate freethreading-compatible C extensions
|
||||
## Improvements
|
||||
* histogram auto-binning now returns bin sizes >=1 for integer
|
||||
input data
|
||||
* ndarray shape-type parameter is now covariant and bound to
|
||||
tuple[int, ...]
|
||||
* np.quantile with method closest_observation chooses nearest
|
||||
even order statistic
|
||||
* lapack_lite is now thread safe
|
||||
* The numpy.printoptions context manager is now thread and
|
||||
async-safe
|
||||
* Type hinting numpy.polynomial
|
||||
* Improved numpy.dtypes type hints
|
||||
## Performance improvements and changes
|
||||
* ma.cov and ma.corrcoef are now significantly faster
|
||||
## Changes
|
||||
* ma.corrcoef may return a slightly different result
|
||||
* Cast-safety fixes in copyto and full
|
||||
- Release 2.0.1
|
||||
## Improvements
|
||||
* np.quantile with method closest_observation chooses nearest
|
||||
even order statistic
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 13 06:04:49 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-numpy
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -16,30 +16,8 @@
|
||||
#
|
||||
|
||||
|
||||
%global flavor @BUILD_FLAVOR@%{nil}
|
||||
%define ver 2.0.0
|
||||
%define _ver 2_0_0
|
||||
%define pname python-numpy
|
||||
%define plainpython python
|
||||
%define hpc_upcase_trans_hyph() %(echo %{**} | tr [a-z] [A-Z] | tr '-' '_')
|
||||
%if "%{flavor}" == ""
|
||||
%bcond_with hpc
|
||||
%bcond_with openblas
|
||||
%endif
|
||||
%if "%{flavor}" == "gnu-hpc"
|
||||
%bcond_without hpc
|
||||
%endif
|
||||
%if "%{flavor}" == "gnu7-hpc"
|
||||
%define c_f_ver 7
|
||||
%bcond_without hpc
|
||||
%endif
|
||||
%if %{with hpc}
|
||||
%bcond_without openblas
|
||||
%endif
|
||||
%if 0%{?sle_version} == 120300
|
||||
%{?with_openblas:ExclusiveArch: do_not_build}
|
||||
%endif
|
||||
%{?with_hpc:%{hpc_requires}}
|
||||
|
||||
#
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without libalternatives
|
||||
@ -49,30 +27,11 @@
|
||||
%bcond_with cblas
|
||||
%endif
|
||||
#
|
||||
%bcond_with ringdisabled
|
||||
#
|
||||
%if %{without hpc}
|
||||
%define package_name %{pname}
|
||||
%define p_python_sitearch %{python_sitearch}
|
||||
%define p_prefix %{_prefix}
|
||||
%define p_bindir %{_bindir}
|
||||
%else
|
||||
%{!?compiler_family:%global compiler_family gnu}
|
||||
%{hpc_init -c %{compiler_family} %{?c_f_ver:-v %{c_f_ver}} %{?mpi_ver:-V %{mpi_ver}}}
|
||||
%define package_name %{hpc_package_name %{_ver}}
|
||||
%define p_python_sitearch %{hpc_python_sitearch}
|
||||
%define p_prefix %{hpc_prefix}
|
||||
%define p_bindir %{hpc_bindir}
|
||||
# Magic for OBS Staging. Only build the flavors required by
|
||||
# other packages in the ring.
|
||||
%if %{with ringdisabled}
|
||||
ExclusiveArch: do_not_build
|
||||
%endif
|
||||
%endif
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: %{package_name}
|
||||
|
||||
Name: python-numpy
|
||||
# set %%ver and %%_ver instead above
|
||||
Version: %{ver}
|
||||
Version: 2.2.2
|
||||
Release: 0
|
||||
Summary: NumPy array processing for numbers, strings, records and objects
|
||||
License: BSD-3-Clause
|
||||
@ -81,14 +40,17 @@ Source: https://files.pythonhosted.org/packages/source/n/numpy/numpy-%{v
|
||||
Source99: python-numpy-rpmlintrc
|
||||
# PATCH-FIX-OPENSUSE numpy-buildfix.patch -- openSUSE-specific build fixes
|
||||
Patch0: numpy-buildfix.patch
|
||||
# PATCH-FIX-UPSTREAM update-meson-1_5_2.patch gh#numpy/numpy#27531 mcepl@suse.com
|
||||
# update vendored meson
|
||||
Patch1: update-meson-1_5_2.patch
|
||||
BuildRequires: %{python_module Cython >= 3.0}
|
||||
BuildRequires: %{python_module base >= 3.9}
|
||||
BuildRequires: %{python_module base >= 3.10}
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module meson-python >= 0.15}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module pyproject-metadata >= 0.7.1}
|
||||
BuildRequires: cmake
|
||||
%if 0%{?suse_version} <= 1600
|
||||
%if 0%{?suse_version} < 1600
|
||||
BuildRequires: gcc12
|
||||
BuildRequires: gcc12-c++
|
||||
%else
|
||||
@ -109,7 +71,6 @@ BuildRequires: %{python_module pytest-xdist}
|
||||
BuildRequires: %{python_module testsuite}
|
||||
BuildRequires: %{python_module typing-extensions >= 4.2.0}
|
||||
# /SECTION
|
||||
%if %{without hpc}
|
||||
# Last version which packaged %%{_bindir}/f2py without update-alternatives
|
||||
Conflicts: %{plainpython}-numpy <= 1.12.0
|
||||
%if 0%{?suse_version}
|
||||
@ -117,9 +78,6 @@ BuildRequires: gcc-fortran
|
||||
%else
|
||||
BuildRequires: gcc-gfortran
|
||||
%endif
|
||||
%if %{with openblas}
|
||||
BuildRequires: openblas-devel > 0.3.20
|
||||
%else
|
||||
BuildRequires: blas-devel
|
||||
BuildRequires: lapack-devel
|
||||
%if %{with cblas}
|
||||
@ -127,7 +85,6 @@ BuildRequires: lapack-devel
|
||||
BuildRequires: cblas-devel
|
||||
Recommends: libopenblas_pthreads0
|
||||
%endif
|
||||
%endif
|
||||
%if %{with libalternatives}
|
||||
BuildRequires: alts
|
||||
Requires: alts
|
||||
@ -135,15 +92,6 @@ Requires: alts
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
%endif
|
||||
%else
|
||||
BuildRequires: %{compiler_family}%{?c_f_ver}-compilers-hpc-macros-devel
|
||||
BuildRequires: libopenblas%{?hpc_ext}-%{compiler_family}%{?c_f_ver}-hpc-devel
|
||||
%ifnarch %ix86 %arm
|
||||
BuildRequires: lua-lmod
|
||||
%endif
|
||||
BuildRequires: suse-hpc
|
||||
Requires: libopenblas%{?hpc_ext}-%{compiler_family}%{?c_f_ver}-hpc
|
||||
%endif
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
@ -158,33 +106,20 @@ interfacing with general-purpose data-base applications.
|
||||
There are also basic facilities for discrete fourier transform,
|
||||
basic linear algebra and random number generation.
|
||||
|
||||
%{?with_hpc:%{hpc_python_master_package -L -a }}
|
||||
|
||||
%package devel
|
||||
Summary: Development files for numpy applications
|
||||
Requires: %{name} = %{version}
|
||||
Requires: blas-devel
|
||||
Requires: python-devel
|
||||
Requires: %plainpython(abi) = %{python_version}
|
||||
%if %{without hpc}
|
||||
%if %{with openblas}
|
||||
Requires: openblas-devel
|
||||
%else
|
||||
Requires: blas-devel
|
||||
%if %{with cblas}
|
||||
Requires: cblas-devel
|
||||
%endif
|
||||
Requires: lapack-devel
|
||||
%endif
|
||||
%else
|
||||
Requires: libopenblas%{?hpc_ext}-%{compiler_family}%{?c_f_ver}-hpc-devel
|
||||
%{hpc_requires_devel}
|
||||
%endif
|
||||
|
||||
%description devel
|
||||
This package contains files for developing applications using numpy.
|
||||
|
||||
%{?with_hpc:%{hpc_python_master_package devel -a }}
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n numpy-%{version}
|
||||
# Fix non-executable scripts
|
||||
@ -201,21 +136,10 @@ chmod -x \
|
||||
rm -f PKG-INFO
|
||||
|
||||
%build
|
||||
export PYTHONDONTWRITEBYTECODE=1
|
||||
%define _lto_cflags %{nil}
|
||||
%if %{with hpc}
|
||||
%hpc_setup
|
||||
module load openblas
|
||||
export CFLAGS="$(pkg-config --cflags openblas) %{optflags} -fno-strict-aliasing" LIBS="$(pkg-config --libs openblas)"
|
||||
cat > site.cfg <<EOF
|
||||
[openblas]
|
||||
libraries = openblas
|
||||
library_dirs = $OPENBLAS_LIB
|
||||
include_dirs = $OPENBLAS_INC
|
||||
EOF
|
||||
%else
|
||||
export CFLAGS="%{optflags} -fno-strict-aliasing"
|
||||
%endif
|
||||
%if 0%{?suse_version} <= 1600
|
||||
%if 0%{?suse_version} < 1600
|
||||
export CC=gcc-12
|
||||
export CXX=g++-12
|
||||
%endif
|
||||
@ -223,67 +147,17 @@ export CXX=g++-12
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%{?with_hpc:%hpc_setup}
|
||||
%{?with_hpc:module load openblas}
|
||||
%pyproject_install
|
||||
|
||||
%pyproject_install --prefix %{p_prefix} --root %{buildroot}
|
||||
|
||||
%if !%{with hpc}
|
||||
%python_clone -a %{buildroot}%{_bindir}/f2py
|
||||
%python_clone -a %{buildroot}%{_bindir}/numpy-config
|
||||
%endif
|
||||
|
||||
%if 0%{?suse_version}
|
||||
%fdupes %{buildroot}%{p_prefix}
|
||||
%endif
|
||||
|
||||
%if %{with hpc}
|
||||
|
||||
%define hpc_module_pname ${python_flavor}-numpy
|
||||
%{python_expand # Don't package testsuite
|
||||
python_flavor=`cat _current_flavor`
|
||||
sitesearch_path=`$python -c "import sysconfig as s; print(s.get_paths(vars={'platbase':'%{hpc_prefix}','base':'%{hpc_prefix}'}).get('platlib'))"`
|
||||
rm -rf %{buildroot}${sitesearch_path}/numpy/{,_core,distutils,f2py,fft,lib,linalg,ma,matrixlib,oldnumeric,polynomial,random,testing}/tests
|
||||
%hpc_write_modules_files
|
||||
#%%Module1.0#####################################################################
|
||||
|
||||
proc ModulesHelp { } {
|
||||
|
||||
puts stderr " "
|
||||
puts stderr "This module loads the %{pname} library built with the %{compiler_family} compiler"
|
||||
puts stderr "toolchain."
|
||||
puts stderr "\nVersion %{version}\n"
|
||||
|
||||
}
|
||||
module-whatis "Name: %{pname} built with %{compiler_family} compiler"
|
||||
module-whatis "Version: %{version}"
|
||||
module-whatis "Category: python module"
|
||||
module-whatis "Description: %{SUMMARY:0}"
|
||||
module-whatis "URL %{url}"
|
||||
|
||||
set version %{version}
|
||||
|
||||
if [ expr [ module-info mode load ] || [module-info mode display ] ] {
|
||||
if { ![is-loaded intel] && ![is-loaded openblas] } {
|
||||
module load openblas
|
||||
}
|
||||
}
|
||||
|
||||
prepend-path PATH %{hpc_bindir}
|
||||
prepend-path PYTHONPATH ${sitesearch_path}
|
||||
|
||||
setenv %{hpc_upcase_trans_hyph %{pname}}_DIR %{hpc_prefix}
|
||||
setenv %{hpc_upcase_trans_hyph %{pname}}_BIN %{hpc_bindir}
|
||||
|
||||
family "NumPy"
|
||||
EOF
|
||||
}
|
||||
|
||||
%fdupes %{buildroot}%{_prefix}
|
||||
%endif
|
||||
|
||||
%check
|
||||
# https://numpy.org/doc/stable/dev/development_environment.html#running-tests
|
||||
%if %{without hpc}
|
||||
|
||||
mkdir -p testing
|
||||
cp pytest.ini testing/
|
||||
@ -295,7 +169,6 @@ for b in f2py numpy-config; do
|
||||
ln -s %{buildroot}%{_bindir}/$b-%{$python_bin_suffix} build/flavorbin/$b
|
||||
done
|
||||
}
|
||||
%endif
|
||||
|
||||
# flaky tests
|
||||
test_failok+=" or test_structured_object_indexing"
|
||||
@ -352,6 +225,8 @@ test_failok+=" or (test_umath and test_fp_noncontiguous)"
|
||||
%endif
|
||||
# The meson command is always on the primary python and wants to import numpy from there
|
||||
test_failok+=" or test_limited_api"
|
||||
# gh#numpy/numpy#27531
|
||||
test_failok+=" or test_api_importable"
|
||||
|
||||
echo "
|
||||
import sys
|
||||
@ -372,7 +247,6 @@ $python runobstest.py "not (test_new_policy ${test_failok} or slow)"
|
||||
popd
|
||||
%endif
|
||||
|
||||
%if %{without hpc}
|
||||
%pre
|
||||
# If libalternatives is used: Removing old update-alternatives entries.
|
||||
%python_libalternatives_reset_alternative f2py
|
||||
@ -382,12 +256,10 @@ popd
|
||||
|
||||
%postun
|
||||
%python_uninstall_alternative f2py
|
||||
%endif
|
||||
|
||||
%files %{python_files}
|
||||
%doc README.md THANKS.txt
|
||||
%license LICENSE.txt
|
||||
%if %{without hpc}
|
||||
%python_alternative %{_bindir}/f2py
|
||||
%python_alternative %{_bindir}/numpy-config
|
||||
%{python_sitearch}/numpy/
|
||||
@ -399,37 +271,9 @@ popd
|
||||
%exclude %{python_sitearch}/numpy/distutils/checks/*.c
|
||||
%exclude %{python_sitearch}/numpy/f2py/src/
|
||||
%exclude %{python_sitearch}/numpy/random/lib/libnpyrandom.a
|
||||
%else
|
||||
%if "%{python_flavor}" == "python3" || "%{python_provides}" == "python3"
|
||||
%{p_bindir}/f2py
|
||||
%{p_bindir}/numpy-config
|
||||
%else
|
||||
%exclude %{p_bindir}/f2py
|
||||
%exclude %{p_bindir}/numpy-config
|
||||
%endif
|
||||
%{p_python_sitearch}/numpy/
|
||||
%{p_python_sitearch}/numpy-%{version}.dist-info
|
||||
%exclude %{p_python_sitearch}/numpy/_core/include/
|
||||
%exclude %{p_python_sitearch}/numpy/_core/lib/libnpymath.a
|
||||
%exclude %{p_python_sitearch}/numpy/_core/lib/pkgconfig/numpy.pc
|
||||
%exclude %{p_python_sitearch}/numpy/random/lib/libnpyrandom.a
|
||||
%exclude %{p_python_sitearch}/numpy/distutils/mingw/*.c
|
||||
%exclude %{p_python_sitearch}/numpy/distutils/checks/*.c
|
||||
%exclude %{p_python_sitearch}/numpy/f2py/src/
|
||||
%endif
|
||||
|
||||
%if %{with hpc}
|
||||
%define hpc_module_pname %{python_flavor}-numpy
|
||||
%{hpc_modules_files}
|
||||
%{hpc_dirs}
|
||||
%dir %{hpc_bindir}
|
||||
%dir %{hpc_libdir}/python%{hpc_python_version}
|
||||
%dir %{p_python_sitearch}
|
||||
%endif
|
||||
|
||||
%files %{python_files devel}
|
||||
%license LICENSE.txt
|
||||
%if %{without hpc}
|
||||
%{python_sitearch}/numpy/_core/include/
|
||||
%if 0%{python_version_nodots} < 312
|
||||
%{python_sitearch}/numpy/distutils/mingw/*.c
|
||||
@ -439,16 +283,5 @@ popd
|
||||
%{python_sitearch}/numpy/_core/lib/libnpymath.a
|
||||
%{python_sitearch}/numpy/_core/lib/pkgconfig/numpy.pc
|
||||
%{python_sitearch}/numpy/random/lib/libnpyrandom.a
|
||||
%else
|
||||
%{p_python_sitearch}/numpy/_core/include/
|
||||
%{p_python_sitearch}/numpy/_core/lib/pkgconfig/numpy.pc
|
||||
%{p_python_sitearch}/numpy/_core/lib/libnpymath.a
|
||||
%{p_python_sitearch}/numpy/random/lib/libnpyrandom.a
|
||||
%if 0%{python_version_nodots} < 312
|
||||
%{p_python_sitearch}/numpy/distutils/mingw/*.c
|
||||
%{p_python_sitearch}/numpy/distutils/checks/*.c
|
||||
%endif
|
||||
%{p_python_sitearch}/numpy/f2py/src/
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
612
update-meson-1_5_2.patch
Normal file
612
update-meson-1_5_2.patch
Normal file
@ -0,0 +1,612 @@
|
||||
diff -uNr numpy-2.1.3.orig/vendored-meson/meson/ci/ciimage/.gitignore numpy-2.1.3/vendored-meson/meson/ci/ciimage/.gitignore
|
||||
--- numpy-2.1.3.orig/vendored-meson/meson/ci/ciimage/.gitignore 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ numpy-2.1.3/vendored-meson/meson/ci/ciimage/.gitignore 2024-11-22 23:52:31.819240220 +0100
|
||||
@@ -0,0 +1,3 @@
|
||||
+/build_*
|
||||
+/test_*
|
||||
+/user.sh
|
||||
diff -uNr numpy-2.1.3.orig/vendored-meson/meson/.git numpy-2.1.3/vendored-meson/meson/.git
|
||||
--- numpy-2.1.3.orig/vendored-meson/meson/.git 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ numpy-2.1.3/vendored-meson/meson/.git 2024-11-22 23:52:31.599238818 +0100
|
||||
@@ -0,0 +1 @@
|
||||
+gitdir: ../../.git/modules/vendored-meson/meson
|
||||
diff -uNr numpy-2.1.3.orig/vendored-meson/meson/.gitattributes numpy-2.1.3/vendored-meson/meson/.gitattributes
|
||||
--- numpy-2.1.3.orig/vendored-meson/meson/.gitattributes 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ numpy-2.1.3/vendored-meson/meson/.gitattributes 2024-11-22 23:52:31.815906865 +0100
|
||||
@@ -0,0 +1,7 @@
|
||||
+.gitignore export-ignore
|
||||
+.gitattributes export-ignore
|
||||
+* text eol=lf
|
||||
+*.png binary
|
||||
+*.icns binary
|
||||
+data/shell-completions/bash/meson linguist-language=Shell
|
||||
+data/shell-completions/zsh/_meson linguist-language=Shell
|
||||
diff -uNr numpy-2.1.3.orig/vendored-meson/meson/.gitignore numpy-2.1.3/vendored-meson/meson/.gitignore
|
||||
--- numpy-2.1.3.orig/vendored-meson/meson/.gitignore 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ numpy-2.1.3/vendored-meson/meson/.gitignore 2024-11-22 23:52:31.815906865 +0100
|
||||
@@ -0,0 +1,34 @@
|
||||
+.mypy_cache/
|
||||
+.pytest_cache/
|
||||
+/.project
|
||||
+/.pydevproject
|
||||
+/.settings
|
||||
+/.cproject
|
||||
+/.idea
|
||||
+/.vscode
|
||||
+
|
||||
+__pycache__
|
||||
+/.coverage/
|
||||
+/.coveragerc
|
||||
+/install dir
|
||||
+/work area
|
||||
+
|
||||
+/meson-test-run.txt
|
||||
+/meson-test-run.xml
|
||||
+/meson-cross-test-run.txt
|
||||
+/meson-cross-test-run.xml
|
||||
+
|
||||
+.DS_Store
|
||||
+*~
|
||||
+*.swp
|
||||
+packagecache
|
||||
+/MANIFEST
|
||||
+/build
|
||||
+/dist
|
||||
+/meson.egg-info
|
||||
+
|
||||
+/docs/built_docs
|
||||
+/docs/hotdoc-private*
|
||||
+
|
||||
+*.pyc
|
||||
+/*venv*
|
||||
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/common/153 wrap file should not failed/subprojects/.gitignore" "numpy-2.1.3/vendored-meson/meson/test cases/common/153 wrap file should not failed/subprojects/.gitignore"
|
||||
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/common/153 wrap file should not failed/subprojects/.gitignore" 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ "numpy-2.1.3/vendored-meson/meson/test cases/common/153 wrap file should not failed/subprojects/.gitignore" 2024-11-22 23:52:31.892574021 +0100
|
||||
@@ -0,0 +1,3 @@
|
||||
+/foo-1.0
|
||||
+/bar-1.0
|
||||
+/foo-1.0-patchdir
|
||||
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/common/234 get_file_contents/.gitattributes" "numpy-2.1.3/vendored-meson/meson/test cases/common/234 get_file_contents/.gitattributes"
|
||||
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/common/234 get_file_contents/.gitattributes" 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ "numpy-2.1.3/vendored-meson/meson/test cases/common/234 get_file_contents/.gitattributes" 2024-11-22 23:52:31.905907439 +0100
|
||||
@@ -0,0 +1 @@
|
||||
+utf-16-text binary
|
||||
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/d/11 dub/.gitignore" "numpy-2.1.3/vendored-meson/meson/test cases/d/11 dub/.gitignore"
|
||||
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/d/11 dub/.gitignore" 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ "numpy-2.1.3/vendored-meson/meson/test cases/d/11 dub/.gitignore" 2024-11-22 23:52:31.819240220 +0100
|
||||
@@ -0,0 +1 @@
|
||||
+dub.json
|
||||
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_asimd.c" "numpy-2.1.3/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_asimd.c"
|
||||
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_asimd.c" 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ "numpy-2.1.3/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_asimd.c" 2024-11-22 23:52:31.835906993 +0100
|
||||
@@ -0,0 +1,27 @@
|
||||
+#ifdef _MSC_VER
|
||||
+ #include <Intrin.h>
|
||||
+#endif
|
||||
+#include <arm_neon.h>
|
||||
+
|
||||
+int main(int argc, char **argv)
|
||||
+{
|
||||
+ float *src = (float*)argv[argc-1];
|
||||
+ float32x4_t v1 = vdupq_n_f32(src[0]), v2 = vdupq_n_f32(src[1]);
|
||||
+ /* MAXMIN */
|
||||
+ int ret = (int)vgetq_lane_f32(vmaxnmq_f32(v1, v2), 0);
|
||||
+ ret += (int)vgetq_lane_f32(vminnmq_f32(v1, v2), 0);
|
||||
+ /* ROUNDING */
|
||||
+ ret += (int)vgetq_lane_f32(vrndq_f32(v1), 0);
|
||||
+#ifdef __aarch64__
|
||||
+ {
|
||||
+ double *src2 = (double*)argv[argc-1];
|
||||
+ float64x2_t vd1 = vdupq_n_f64(src2[0]), vd2 = vdupq_n_f64(src2[1]);
|
||||
+ /* MAXMIN */
|
||||
+ ret += (int)vgetq_lane_f64(vmaxnmq_f64(vd1, vd2), 0);
|
||||
+ ret += (int)vgetq_lane_f64(vminnmq_f64(vd1, vd2), 0);
|
||||
+ /* ROUNDING */
|
||||
+ ret += (int)vgetq_lane_f64(vrndq_f64(vd1), 0);
|
||||
+ }
|
||||
+#endif
|
||||
+ return ret;
|
||||
+}
|
||||
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_neon.c" "numpy-2.1.3/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_neon.c"
|
||||
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_neon.c" 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ "numpy-2.1.3/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_neon.c" 2024-11-22 23:52:31.835906993 +0100
|
||||
@@ -0,0 +1,19 @@
|
||||
+#ifdef _MSC_VER
|
||||
+ #include <Intrin.h>
|
||||
+#endif
|
||||
+#include <arm_neon.h>
|
||||
+
|
||||
+int main(int argc, char **argv)
|
||||
+{
|
||||
+ // passing from untraced pointers to avoid optimizing out any constants
|
||||
+ // so we can test against the linker.
|
||||
+ float *src = (float*)argv[argc-1];
|
||||
+ float32x4_t v1 = vdupq_n_f32(src[0]), v2 = vdupq_n_f32(src[1]);
|
||||
+ int ret = (int)vgetq_lane_f32(vmulq_f32(v1, v2), 0);
|
||||
+#ifdef __aarch64__
|
||||
+ double *src2 = (double*)argv[argc-2];
|
||||
+ float64x2_t vd1 = vdupq_n_f64(src2[0]), vd2 = vdupq_n_f64(src2[1]);
|
||||
+ ret += (int)vgetq_lane_f64(vmulq_f64(vd1, vd2), 0);
|
||||
+#endif
|
||||
+ return ret;
|
||||
+}
|
||||
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_neon_fp16.c" "numpy-2.1.3/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_neon_fp16.c"
|
||||
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_neon_fp16.c" 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ "numpy-2.1.3/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_neon_fp16.c" 2024-11-22 23:52:31.835906993 +0100
|
||||
@@ -0,0 +1,11 @@
|
||||
+#ifdef _MSC_VER
|
||||
+ #include <Intrin.h>
|
||||
+#endif
|
||||
+#include <arm_neon.h>
|
||||
+
|
||||
+int main(int argc, char **argv)
|
||||
+{
|
||||
+ short *src = (short*)argv[argc-1];
|
||||
+ float32x4_t v_z4 = vcvt_f32_f16((float16x4_t)vld1_s16(src));
|
||||
+ return (int)vgetq_lane_f32(v_z4, 0);
|
||||
+}
|
||||
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_neon_vfpv4.c" "numpy-2.1.3/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_neon_vfpv4.c"
|
||||
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_neon_vfpv4.c" 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ "numpy-2.1.3/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_neon_vfpv4.c" 2024-11-22 23:52:31.835906993 +0100
|
||||
@@ -0,0 +1,21 @@
|
||||
+#ifdef _MSC_VER
|
||||
+ #include <Intrin.h>
|
||||
+#endif
|
||||
+#include <arm_neon.h>
|
||||
+
|
||||
+int main(int argc, char **argv)
|
||||
+{
|
||||
+ float *src = (float*)argv[argc-1];
|
||||
+ float32x4_t v1 = vdupq_n_f32(src[0]);
|
||||
+ float32x4_t v2 = vdupq_n_f32(src[1]);
|
||||
+ float32x4_t v3 = vdupq_n_f32(src[2]);
|
||||
+ int ret = (int)vgetq_lane_f32(vfmaq_f32(v1, v2, v3), 0);
|
||||
+#ifdef __aarch64__
|
||||
+ double *src2 = (double*)argv[argc-2];
|
||||
+ float64x2_t vd1 = vdupq_n_f64(src2[0]);
|
||||
+ float64x2_t vd2 = vdupq_n_f64(src2[1]);
|
||||
+ float64x2_t vd3 = vdupq_n_f64(src2[2]);
|
||||
+ ret += (int)vgetq_lane_f64(vfmaq_f64(vd1, vd2, vd3), 0);
|
||||
+#endif
|
||||
+ return ret;
|
||||
+}
|
||||
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_sse.c" "numpy-2.1.3/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_sse.c"
|
||||
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_sse.c" 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ "numpy-2.1.3/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_sse.c" 2024-11-22 23:52:31.835906993 +0100
|
||||
@@ -0,0 +1,7 @@
|
||||
+#include <xmmintrin.h>
|
||||
+
|
||||
+int main(void)
|
||||
+{
|
||||
+ __m128 a = _mm_add_ps(_mm_setzero_ps(), _mm_setzero_ps());
|
||||
+ return (int)_mm_cvtss_f32(a);
|
||||
+}
|
||||
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_sse2.c" "numpy-2.1.3/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_sse2.c"
|
||||
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_sse2.c" 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ "numpy-2.1.3/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_sse2.c" 2024-11-22 23:52:31.835906993 +0100
|
||||
@@ -0,0 +1,7 @@
|
||||
+#include <emmintrin.h>
|
||||
+
|
||||
+int main(void)
|
||||
+{
|
||||
+ __m128i a = _mm_add_epi16(_mm_setzero_si128(), _mm_setzero_si128());
|
||||
+ return _mm_cvtsi128_si32(a);
|
||||
+}
|
||||
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_sse3.c" "numpy-2.1.3/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_sse3.c"
|
||||
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_sse3.c" 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ "numpy-2.1.3/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_sse3.c" 2024-11-22 23:52:31.835906993 +0100
|
||||
@@ -0,0 +1,7 @@
|
||||
+#include <pmmintrin.h>
|
||||
+
|
||||
+int main(void)
|
||||
+{
|
||||
+ __m128 a = _mm_hadd_ps(_mm_setzero_ps(), _mm_setzero_ps());
|
||||
+ return (int)_mm_cvtss_f32(a);
|
||||
+}
|
||||
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_sse41.c" "numpy-2.1.3/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_sse41.c"
|
||||
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_sse41.c" 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ "numpy-2.1.3/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_sse41.c" 2024-11-22 23:52:31.835906993 +0100
|
||||
@@ -0,0 +1,7 @@
|
||||
+#include <smmintrin.h>
|
||||
+
|
||||
+int main(void)
|
||||
+{
|
||||
+ __m128 a = _mm_floor_ps(_mm_setzero_ps());
|
||||
+ return (int)_mm_cvtss_f32(a);
|
||||
+}
|
||||
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_ssse3.c" "numpy-2.1.3/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_ssse3.c"
|
||||
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_ssse3.c" 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ "numpy-2.1.3/vendored-meson/meson/test cases/features/1 baseline/init_features/checks/cpu_ssse3.c" 2024-11-22 23:52:31.835906993 +0100
|
||||
@@ -0,0 +1,7 @@
|
||||
+#include <tmmintrin.h>
|
||||
+
|
||||
+int main(void)
|
||||
+{
|
||||
+ __m128i a = _mm_hadd_epi16(_mm_setzero_si128(), _mm_setzero_si128());
|
||||
+ return (int)_mm_cvtsi128_si32(a);
|
||||
+}
|
||||
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/1 baseline/init_features/meson.build" "numpy-2.1.3/vendored-meson/meson/test cases/features/1 baseline/init_features/meson.build"
|
||||
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/1 baseline/init_features/meson.build" 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ "numpy-2.1.3/vendored-meson/meson/test cases/features/1 baseline/init_features/meson.build" 2024-11-22 23:52:31.835906993 +0100
|
||||
@@ -0,0 +1,98 @@
|
||||
+#project('test-features', 'c')
|
||||
+mod_features = import('features')
|
||||
+cpu_family = host_machine.cpu_family()
|
||||
+compiler_id = meson.get_compiler('c').get_id()
|
||||
+source_root = meson.project_source_root() + '/../init_features/'
|
||||
+# Basic X86 Features
|
||||
+# ------------------
|
||||
+SSE = mod_features.new(
|
||||
+ 'SSE', 1, args: '-msse',
|
||||
+ test_code: files(source_root + 'checks/cpu_sse.c')[0]
|
||||
+)
|
||||
+SSE2 = mod_features.new(
|
||||
+ 'SSE2', 2, implies: SSE,
|
||||
+ args: '-msse2',
|
||||
+ test_code: files(source_root + 'checks/cpu_sse2.c')[0]
|
||||
+)
|
||||
+# enabling SSE without SSE2 is useless also
|
||||
+# it's non-optional for x86_64
|
||||
+SSE.update(implies: SSE2)
|
||||
+SSE3 = mod_features.new(
|
||||
+ 'SSE3', 3, implies: SSE2,
|
||||
+ args: '-msse3',
|
||||
+ test_code: files(source_root + 'checks/cpu_sse3.c')[0]
|
||||
+)
|
||||
+SSSE3 = mod_features.new(
|
||||
+ 'SSSE3', 4, implies: SSE3,
|
||||
+ args: '-mssse3',
|
||||
+ test_code: files(source_root + 'checks/cpu_ssse3.c')[0]
|
||||
+)
|
||||
+SSE41 = mod_features.new(
|
||||
+ 'SSE41', 5, implies: SSSE3,
|
||||
+ args: '-msse4.1',
|
||||
+ test_code: files(source_root + 'checks/cpu_sse41.c')[0]
|
||||
+)
|
||||
+if cpu_family not in ['x86', 'x86_64']
|
||||
+ # should disable any prevalent features
|
||||
+ SSE.update(disable: 'not supported by the current platform')
|
||||
+endif
|
||||
+# Specializations for non unix-like compilers
|
||||
+if compiler_id == 'intel-cl'
|
||||
+ foreach fet : [SSE, SSE2, SSE3, SSSE3]
|
||||
+ fet.update(args: {'val': '/arch:' + fet.get('name'), 'match': '/arch:.*'})
|
||||
+ endforeach
|
||||
+ SSE41.update(args: {'val': '/arch:SSE4.1', 'match': '/arch:.*'})
|
||||
+elif compiler_id == 'msvc'
|
||||
+ # only available on 32-bit. Its enabled by default on 64-bit mode
|
||||
+ foreach fet : [SSE, SSE2]
|
||||
+ if cpu_family == 'x86'
|
||||
+ fet.update(args: {'val': '/arch:' + fet.get('name'), 'match': clear_arch})
|
||||
+ else
|
||||
+ fet.update(args: '')
|
||||
+ endif
|
||||
+ endforeach
|
||||
+ # The following features don't own private FLAGS still
|
||||
+ # the compiler provides ISA capability for them.
|
||||
+ foreach fet : [SSE3, SSSE3, SSE41]
|
||||
+ fet.update(args: '')
|
||||
+ endforeach
|
||||
+endif
|
||||
+
|
||||
+# Basic ARM Features
|
||||
+# ------------------
|
||||
+NEON = mod_features.new(
|
||||
+ 'NEON', 200,
|
||||
+ test_code: files(source_root + 'checks/cpu_neon.c')[0]
|
||||
+)
|
||||
+NEON_FP16 = mod_features.new(
|
||||
+ 'NEON_FP16', 201, implies: NEON,
|
||||
+ test_code: files(source_root + 'checks/cpu_neon_fp16.c')[0]
|
||||
+)
|
||||
+# FMA
|
||||
+NEON_VFPV4 = mod_features.new(
|
||||
+ 'NEON_VFPV4', 202, implies: NEON_FP16,
|
||||
+ test_code: files(source_root + 'checks/cpu_neon_vfpv4.c')[0]
|
||||
+)
|
||||
+# Advanced SIMD
|
||||
+ASIMD = mod_features.new(
|
||||
+ 'ASIMD', 203, implies: NEON_VFPV4, detect: {'val': 'ASIMD', 'match': 'NEON.*'},
|
||||
+ test_code: files(source_root + 'checks/cpu_asimd.c')[0]
|
||||
+)
|
||||
+if cpu_family == 'aarch64'
|
||||
+ # hardware baseline, they can't be enabled independently
|
||||
+ NEON.update(implies: [NEON_FP16, NEON_VFPV4, ASIMD])
|
||||
+ NEON_FP16.update(implies: [NEON, NEON_VFPV4, ASIMD])
|
||||
+ NEON_VFPV4.update(implies: [NEON, NEON_FP16, ASIMD])
|
||||
+elif cpu_family == 'arm'
|
||||
+ NEON.update(args: '-mfpu=neon')
|
||||
+ NEON_FP16.update(args: ['-mfp16-format=ieee', {'val': '-mfpu=neon-fp16', 'match': '-mfpu=.*'}])
|
||||
+ NEON_VFPV4.update(args: {'val': '-mfpu=neon-vfpv4', 'match': '-mfpu=.*'})
|
||||
+ ASIMD.update(args: [
|
||||
+ {'val': '-mfpu=neon-fp-armv8', 'match': '-mfpu=.*'},
|
||||
+ '-march=armv8-a+simd'
|
||||
+ ])
|
||||
+else
|
||||
+ # should disable any prevalent features
|
||||
+ NEON.update(disable: 'not supported by the current platform')
|
||||
+endif
|
||||
+
|
||||
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_asimd.c" "numpy-2.1.3/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_asimd.c"
|
||||
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_asimd.c" 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ "numpy-2.1.3/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_asimd.c" 2024-11-22 23:52:31.835906993 +0100
|
||||
@@ -0,0 +1,27 @@
|
||||
+#ifdef _MSC_VER
|
||||
+ #include <Intrin.h>
|
||||
+#endif
|
||||
+#include <arm_neon.h>
|
||||
+
|
||||
+int main(int argc, char **argv)
|
||||
+{
|
||||
+ float *src = (float*)argv[argc-1];
|
||||
+ float32x4_t v1 = vdupq_n_f32(src[0]), v2 = vdupq_n_f32(src[1]);
|
||||
+ /* MAXMIN */
|
||||
+ int ret = (int)vgetq_lane_f32(vmaxnmq_f32(v1, v2), 0);
|
||||
+ ret += (int)vgetq_lane_f32(vminnmq_f32(v1, v2), 0);
|
||||
+ /* ROUNDING */
|
||||
+ ret += (int)vgetq_lane_f32(vrndq_f32(v1), 0);
|
||||
+#ifdef __aarch64__
|
||||
+ {
|
||||
+ double *src2 = (double*)argv[argc-1];
|
||||
+ float64x2_t vd1 = vdupq_n_f64(src2[0]), vd2 = vdupq_n_f64(src2[1]);
|
||||
+ /* MAXMIN */
|
||||
+ ret += (int)vgetq_lane_f64(vmaxnmq_f64(vd1, vd2), 0);
|
||||
+ ret += (int)vgetq_lane_f64(vminnmq_f64(vd1, vd2), 0);
|
||||
+ /* ROUNDING */
|
||||
+ ret += (int)vgetq_lane_f64(vrndq_f64(vd1), 0);
|
||||
+ }
|
||||
+#endif
|
||||
+ return ret;
|
||||
+}
|
||||
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_neon.c" "numpy-2.1.3/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_neon.c"
|
||||
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_neon.c" 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ "numpy-2.1.3/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_neon.c" 2024-11-22 23:52:31.835906993 +0100
|
||||
@@ -0,0 +1,19 @@
|
||||
+#ifdef _MSC_VER
|
||||
+ #include <Intrin.h>
|
||||
+#endif
|
||||
+#include <arm_neon.h>
|
||||
+
|
||||
+int main(int argc, char **argv)
|
||||
+{
|
||||
+ // passing from untraced pointers to avoid optimizing out any constants
|
||||
+ // so we can test against the linker.
|
||||
+ float *src = (float*)argv[argc-1];
|
||||
+ float32x4_t v1 = vdupq_n_f32(src[0]), v2 = vdupq_n_f32(src[1]);
|
||||
+ int ret = (int)vgetq_lane_f32(vmulq_f32(v1, v2), 0);
|
||||
+#ifdef __aarch64__
|
||||
+ double *src2 = (double*)argv[argc-2];
|
||||
+ float64x2_t vd1 = vdupq_n_f64(src2[0]), vd2 = vdupq_n_f64(src2[1]);
|
||||
+ ret += (int)vgetq_lane_f64(vmulq_f64(vd1, vd2), 0);
|
||||
+#endif
|
||||
+ return ret;
|
||||
+}
|
||||
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_neon_fp16.c" "numpy-2.1.3/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_neon_fp16.c"
|
||||
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_neon_fp16.c" 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ "numpy-2.1.3/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_neon_fp16.c" 2024-11-22 23:52:31.835906993 +0100
|
||||
@@ -0,0 +1,11 @@
|
||||
+#ifdef _MSC_VER
|
||||
+ #include <Intrin.h>
|
||||
+#endif
|
||||
+#include <arm_neon.h>
|
||||
+
|
||||
+int main(int argc, char **argv)
|
||||
+{
|
||||
+ short *src = (short*)argv[argc-1];
|
||||
+ float32x4_t v_z4 = vcvt_f32_f16((float16x4_t)vld1_s16(src));
|
||||
+ return (int)vgetq_lane_f32(v_z4, 0);
|
||||
+}
|
||||
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_neon_vfpv4.c" "numpy-2.1.3/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_neon_vfpv4.c"
|
||||
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_neon_vfpv4.c" 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ "numpy-2.1.3/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_neon_vfpv4.c" 2024-11-22 23:52:31.835906993 +0100
|
||||
@@ -0,0 +1,21 @@
|
||||
+#ifdef _MSC_VER
|
||||
+ #include <Intrin.h>
|
||||
+#endif
|
||||
+#include <arm_neon.h>
|
||||
+
|
||||
+int main(int argc, char **argv)
|
||||
+{
|
||||
+ float *src = (float*)argv[argc-1];
|
||||
+ float32x4_t v1 = vdupq_n_f32(src[0]);
|
||||
+ float32x4_t v2 = vdupq_n_f32(src[1]);
|
||||
+ float32x4_t v3 = vdupq_n_f32(src[2]);
|
||||
+ int ret = (int)vgetq_lane_f32(vfmaq_f32(v1, v2, v3), 0);
|
||||
+#ifdef __aarch64__
|
||||
+ double *src2 = (double*)argv[argc-2];
|
||||
+ float64x2_t vd1 = vdupq_n_f64(src2[0]);
|
||||
+ float64x2_t vd2 = vdupq_n_f64(src2[1]);
|
||||
+ float64x2_t vd3 = vdupq_n_f64(src2[2]);
|
||||
+ ret += (int)vgetq_lane_f64(vfmaq_f64(vd1, vd2, vd3), 0);
|
||||
+#endif
|
||||
+ return ret;
|
||||
+}
|
||||
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_sse.c" "numpy-2.1.3/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_sse.c"
|
||||
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_sse.c" 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ "numpy-2.1.3/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_sse.c" 2024-11-22 23:52:31.835906993 +0100
|
||||
@@ -0,0 +1,7 @@
|
||||
+#include <xmmintrin.h>
|
||||
+
|
||||
+int main(void)
|
||||
+{
|
||||
+ __m128 a = _mm_add_ps(_mm_setzero_ps(), _mm_setzero_ps());
|
||||
+ return (int)_mm_cvtss_f32(a);
|
||||
+}
|
||||
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_sse2.c" "numpy-2.1.3/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_sse2.c"
|
||||
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_sse2.c" 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ "numpy-2.1.3/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_sse2.c" 2024-11-22 23:52:31.835906993 +0100
|
||||
@@ -0,0 +1,7 @@
|
||||
+#include <emmintrin.h>
|
||||
+
|
||||
+int main(void)
|
||||
+{
|
||||
+ __m128i a = _mm_add_epi16(_mm_setzero_si128(), _mm_setzero_si128());
|
||||
+ return _mm_cvtsi128_si32(a);
|
||||
+}
|
||||
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_sse3.c" "numpy-2.1.3/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_sse3.c"
|
||||
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_sse3.c" 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ "numpy-2.1.3/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_sse3.c" 2024-11-22 23:52:31.835906993 +0100
|
||||
@@ -0,0 +1,7 @@
|
||||
+#include <pmmintrin.h>
|
||||
+
|
||||
+int main(void)
|
||||
+{
|
||||
+ __m128 a = _mm_hadd_ps(_mm_setzero_ps(), _mm_setzero_ps());
|
||||
+ return (int)_mm_cvtss_f32(a);
|
||||
+}
|
||||
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_sse41.c" "numpy-2.1.3/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_sse41.c"
|
||||
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_sse41.c" 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ "numpy-2.1.3/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_sse41.c" 2024-11-22 23:52:31.835906993 +0100
|
||||
@@ -0,0 +1,7 @@
|
||||
+#include <smmintrin.h>
|
||||
+
|
||||
+int main(void)
|
||||
+{
|
||||
+ __m128 a = _mm_floor_ps(_mm_setzero_ps());
|
||||
+ return (int)_mm_cvtss_f32(a);
|
||||
+}
|
||||
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_ssse3.c" "numpy-2.1.3/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_ssse3.c"
|
||||
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_ssse3.c" 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ "numpy-2.1.3/vendored-meson/meson/test cases/features/2 multi_targets/init_features/checks/cpu_ssse3.c" 2024-11-22 23:52:31.835906993 +0100
|
||||
@@ -0,0 +1,7 @@
|
||||
+#include <tmmintrin.h>
|
||||
+
|
||||
+int main(void)
|
||||
+{
|
||||
+ __m128i a = _mm_hadd_epi16(_mm_setzero_si128(), _mm_setzero_si128());
|
||||
+ return (int)_mm_cvtsi128_si32(a);
|
||||
+}
|
||||
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/2 multi_targets/init_features/meson.build" "numpy-2.1.3/vendored-meson/meson/test cases/features/2 multi_targets/init_features/meson.build"
|
||||
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/features/2 multi_targets/init_features/meson.build" 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ "numpy-2.1.3/vendored-meson/meson/test cases/features/2 multi_targets/init_features/meson.build" 2024-11-22 23:52:31.835906993 +0100
|
||||
@@ -0,0 +1,98 @@
|
||||
+#project('test-features', 'c')
|
||||
+mod_features = import('features')
|
||||
+cpu_family = host_machine.cpu_family()
|
||||
+compiler_id = meson.get_compiler('c').get_id()
|
||||
+source_root = meson.project_source_root() + '/../init_features/'
|
||||
+# Basic X86 Features
|
||||
+# ------------------
|
||||
+SSE = mod_features.new(
|
||||
+ 'SSE', 1, args: '-msse',
|
||||
+ test_code: files(source_root + 'checks/cpu_sse.c')[0]
|
||||
+)
|
||||
+SSE2 = mod_features.new(
|
||||
+ 'SSE2', 2, implies: SSE,
|
||||
+ args: '-msse2',
|
||||
+ test_code: files(source_root + 'checks/cpu_sse2.c')[0]
|
||||
+)
|
||||
+# enabling SSE without SSE2 is useless also
|
||||
+# it's non-optional for x86_64
|
||||
+SSE.update(implies: SSE2)
|
||||
+SSE3 = mod_features.new(
|
||||
+ 'SSE3', 3, implies: SSE2,
|
||||
+ args: '-msse3',
|
||||
+ test_code: files(source_root + 'checks/cpu_sse3.c')[0]
|
||||
+)
|
||||
+SSSE3 = mod_features.new(
|
||||
+ 'SSSE3', 4, implies: SSE3,
|
||||
+ args: '-mssse3',
|
||||
+ test_code: files(source_root + 'checks/cpu_ssse3.c')[0]
|
||||
+)
|
||||
+SSE41 = mod_features.new(
|
||||
+ 'SSE41', 5, implies: SSSE3,
|
||||
+ args: '-msse4.1',
|
||||
+ test_code: files(source_root + 'checks/cpu_sse41.c')[0]
|
||||
+)
|
||||
+if cpu_family not in ['x86', 'x86_64']
|
||||
+ # should disable any prevalent features
|
||||
+ SSE.update(disable: 'not supported by the current platform')
|
||||
+endif
|
||||
+# Specializations for non unix-like compilers
|
||||
+if compiler_id == 'intel-cl'
|
||||
+ foreach fet : [SSE, SSE2, SSE3, SSSE3]
|
||||
+ fet.update(args: {'val': '/arch:' + fet.get('name'), 'match': '/arch:.*'})
|
||||
+ endforeach
|
||||
+ SSE41.update(args: {'val': '/arch:SSE4.1', 'match': '/arch:.*'})
|
||||
+elif compiler_id == 'msvc'
|
||||
+ # only available on 32-bit. Its enabled by default on 64-bit mode
|
||||
+ foreach fet : [SSE, SSE2]
|
||||
+ if cpu_family == 'x86'
|
||||
+ fet.update(args: {'val': '/arch:' + fet.get('name'), 'match': clear_arch})
|
||||
+ else
|
||||
+ fet.update(args: '')
|
||||
+ endif
|
||||
+ endforeach
|
||||
+ # The following features don't own private FLAGS still
|
||||
+ # the compiler provides ISA capability for them.
|
||||
+ foreach fet : [SSE3, SSSE3, SSE41]
|
||||
+ fet.update(args: '')
|
||||
+ endforeach
|
||||
+endif
|
||||
+
|
||||
+# Basic ARM Features
|
||||
+# ------------------
|
||||
+NEON = mod_features.new(
|
||||
+ 'NEON', 200,
|
||||
+ test_code: files(source_root + 'checks/cpu_neon.c')[0]
|
||||
+)
|
||||
+NEON_FP16 = mod_features.new(
|
||||
+ 'NEON_FP16', 201, implies: NEON,
|
||||
+ test_code: files(source_root + 'checks/cpu_neon_fp16.c')[0]
|
||||
+)
|
||||
+# FMA
|
||||
+NEON_VFPV4 = mod_features.new(
|
||||
+ 'NEON_VFPV4', 202, implies: NEON_FP16,
|
||||
+ test_code: files(source_root + 'checks/cpu_neon_vfpv4.c')[0]
|
||||
+)
|
||||
+# Advanced SIMD
|
||||
+ASIMD = mod_features.new(
|
||||
+ 'ASIMD', 203, implies: NEON_VFPV4, detect: {'val': 'ASIMD', 'match': 'NEON.*'},
|
||||
+ test_code: files(source_root + 'checks/cpu_asimd.c')[0]
|
||||
+)
|
||||
+if cpu_family == 'aarch64'
|
||||
+ # hardware baseline, they can't be enabled independently
|
||||
+ NEON.update(implies: [NEON_FP16, NEON_VFPV4, ASIMD])
|
||||
+ NEON_FP16.update(implies: [NEON, NEON_VFPV4, ASIMD])
|
||||
+ NEON_VFPV4.update(implies: [NEON, NEON_FP16, ASIMD])
|
||||
+elif cpu_family == 'arm'
|
||||
+ NEON.update(args: '-mfpu=neon')
|
||||
+ NEON_FP16.update(args: ['-mfp16-format=ieee', {'val': '-mfpu=neon-fp16', 'match': '-mfpu=.*'}])
|
||||
+ NEON_VFPV4.update(args: {'val': '-mfpu=neon-vfpv4', 'match': '-mfpu=.*'})
|
||||
+ ASIMD.update(args: [
|
||||
+ {'val': '-mfpu=neon-fp-armv8', 'match': '-mfpu=.*'},
|
||||
+ '-march=armv8-a+simd'
|
||||
+ ])
|
||||
+else
|
||||
+ # should disable any prevalent features
|
||||
+ NEON.update(disable: 'not supported by the current platform')
|
||||
+endif
|
||||
+
|
||||
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/frameworks/35 boost symlinks/boost/include/boost/version.hpp" "numpy-2.1.3/vendored-meson/meson/test cases/frameworks/35 boost symlinks/boost/include/boost/version.hpp"
|
||||
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/frameworks/35 boost symlinks/boost/include/boost/version.hpp" 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ "numpy-2.1.3/vendored-meson/meson/test cases/frameworks/35 boost symlinks/boost/include/boost/version.hpp" 2024-11-22 23:52:31.849240411 +0100
|
||||
@@ -0,0 +1,3 @@
|
||||
+#define BOOST_VERSION 300
|
||||
+
|
||||
+#error This is not a real version of boost
|
||||
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/unit/78 user options for subproject/.gitignore" "numpy-2.1.3/vendored-meson/meson/test cases/unit/78 user options for subproject/.gitignore"
|
||||
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/unit/78 user options for subproject/.gitignore" 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ "numpy-2.1.3/vendored-meson/meson/test cases/unit/78 user options for subproject/.gitignore" 2024-11-22 23:52:31.889240666 +0100
|
||||
@@ -0,0 +1 @@
|
||||
+/subprojects
|
||||
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/unit/78 user options for subproject/75 user options for subproject/.gitignore" "numpy-2.1.3/vendored-meson/meson/test cases/unit/78 user options for subproject/75 user options for subproject/.gitignore"
|
||||
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/unit/78 user options for subproject/75 user options for subproject/.gitignore" 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ "numpy-2.1.3/vendored-meson/meson/test cases/unit/78 user options for subproject/75 user options for subproject/.gitignore" 2024-11-22 23:52:31.889240666 +0100
|
||||
@@ -0,0 +1 @@
|
||||
+subprojects/*
|
||||
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/unit/98 link full name/.gitignore" "numpy-2.1.3/vendored-meson/meson/test cases/unit/98 link full name/.gitignore"
|
||||
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/unit/98 link full name/.gitignore" 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ "numpy-2.1.3/vendored-meson/meson/test cases/unit/98 link full name/.gitignore" 2024-11-22 23:52:31.892574021 +0100
|
||||
@@ -0,0 +1,5 @@
|
||||
+*.a
|
||||
+*.o
|
||||
+a.out
|
||||
+libtestprovider.a
|
||||
+build
|
||||
diff -uNr "numpy-2.1.3.orig/vendored-meson/meson/test cases/windows/22 msvc library argument order/lib/.gitignore" "numpy-2.1.3/vendored-meson/meson/test cases/windows/22 msvc library argument order/lib/.gitignore"
|
||||
--- "numpy-2.1.3.orig/vendored-meson/meson/test cases/windows/22 msvc library argument order/lib/.gitignore" 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ "numpy-2.1.3/vendored-meson/meson/test cases/windows/22 msvc library argument order/lib/.gitignore" 2024-11-22 23:52:31.902574084 +0100
|
||||
@@ -0,0 +1,2 @@
|
||||
+*.obj
|
||||
+*.lib
|
Reference in New Issue
Block a user