diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-09-04 17:47:12 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-09-05 08:09:13 +0100 |
commit | 7dcf79b8f8bc0ddf756963548314a5f59e34e90f (patch) | |
tree | 78e200e3995c243f49f941cf5a0f321669f4cac2 | |
parent | 0fdd8f8c84c599a80ef27e8afaeb0b7995a3e56c (diff) | |
download | poky-7dcf79b8f8bc0ddf756963548314a5f59e34e90f.tar.gz |
python3-numpy: Attempt to fix reproducibility issue
We've seen reproducibility failures where it appears an extra -O3 compiler flag ends
up in the multiarray library compilation. This can only really have come through
extra_info for BLASS support since it only affects just this library. Rather than
try and track down exactly where this came from in a rabbit warren of code, just
disable this since we don't have any of the dependencies anyway.
(From OE-Core rev: 1d07be514ccacedb4d1ac48e0fdd3a36ae098698)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-devtools/python/python3-numpy/disable_blas.patch | 37 | ||||
-rw-r--r-- | meta/recipes-devtools/python/python3-numpy_1.25.2.bb | 1 |
2 files changed, 38 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python3-numpy/disable_blas.patch b/meta/recipes-devtools/python/python3-numpy/disable_blas.patch new file mode 100644 index 0000000000..09d65e8419 --- /dev/null +++ b/meta/recipes-devtools/python/python3-numpy/disable_blas.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | We've seen reproducibility failures where it appears an extra -O3 compiler flag ends | ||
2 | up in the multiarray library compilation. This can only really have come through | ||
3 | extra_info since it only affects just this library. Rather than try and track | ||
4 | down exactly where this came from in a rabbit warren of code, just disable | ||
5 | this since we don't have any of the dependencies. | ||
6 | |||
7 | Upstream-Status: Inappropriate [OE specific config hack] | ||
8 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
9 | |||
10 | Index: numpy-1.25.2/numpy/core/setup.py | ||
11 | =================================================================== | ||
12 | --- numpy-1.25.2.orig/numpy/core/setup.py | ||
13 | +++ numpy-1.25.2/numpy/core/setup.py | ||
14 | @@ -755,22 +755,7 @@ def configuration(parent_package='',top_ | ||
15 | join('src', 'common', 'npy_cpu_features.c'), | ||
16 | ] | ||
17 | |||
18 | - if os.environ.get('NPY_USE_BLAS_ILP64', "0") != "0": | ||
19 | - blas_info = get_info('blas_ilp64_opt', 2) | ||
20 | - else: | ||
21 | - blas_info = get_info('blas_opt', 0) | ||
22 | - | ||
23 | - have_blas = blas_info and ('HAVE_CBLAS', None) in blas_info.get('define_macros', []) | ||
24 | - | ||
25 | - if have_blas: | ||
26 | - extra_info = blas_info | ||
27 | - # These files are also in MANIFEST.in so that they are always in | ||
28 | - # the source distribution independently of HAVE_CBLAS. | ||
29 | - common_src.extend([join('src', 'common', 'cblasfuncs.c'), | ||
30 | - join('src', 'common', 'python_xerbla.c'), | ||
31 | - ]) | ||
32 | - else: | ||
33 | - extra_info = {} | ||
34 | + extra_info = {} | ||
35 | |||
36 | ####################################################################### | ||
37 | # _multiarray_umath module - multiarray part # | ||
diff --git a/meta/recipes-devtools/python/python3-numpy_1.25.2.bb b/meta/recipes-devtools/python/python3-numpy_1.25.2.bb index 0c6c0a3287..4793b23a38 100644 --- a/meta/recipes-devtools/python/python3-numpy_1.25.2.bb +++ b/meta/recipes-devtools/python/python3-numpy_1.25.2.bb | |||
@@ -10,6 +10,7 @@ SRCNAME = "numpy" | |||
10 | SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/${SRCNAME}-${PV}.tar.gz \ | 10 | SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/${SRCNAME}-${PV}.tar.gz \ |
11 | file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \ | 11 | file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \ |
12 | file://0001-numpy-core-Define-RISCV-32-support.patch \ | 12 | file://0001-numpy-core-Define-RISCV-32-support.patch \ |
13 | file://disable_blas.patch \ | ||
13 | file://run-ptest \ | 14 | file://run-ptest \ |
14 | " | 15 | " |
15 | SRC_URI[sha256sum] = "fd608e19c8d7c55021dffd43bfe5492fab8cc105cc8986f813f8c3c048b38760" | 16 | SRC_URI[sha256sum] = "fd608e19c8d7c55021dffd43bfe5492fab8cc105cc8986f813f8c3c048b38760" |