diff options
| author | Michał Górny <mgorny@gentoo.org> | 2025-09-16 11:16:11 +0200 |
|---|---|---|
| committer | Michał Górny <mgorny@gentoo.org> | 2025-09-16 11:21:18 +0200 |
| commit | e0c2ec7b476311a209c00258ed3d352eab5c41e9 (patch) | |
| tree | 46ab42d46a5c2d0c1a9ab4d724287b29bbf09343 /dev-python/numpy | |
| parent | 900a8112f251dc11768648c184e4c27bc022ca92 (diff) | |
| download | gentoo-e0c2ec7b476311a209c00258ed3d352eab5c41e9.tar.gz gentoo-e0c2ec7b476311a209c00258ed3d352eab5c41e9.tar.bz2 gentoo-e0c2ec7b476311a209c00258ed3d352eab5c41e9.zip | |
dev-python/numpy: Backport a fix for building with AVX512F only
Closes: https://bugs.gentoo.org/961476
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/numpy')
| -rw-r--r-- | dev-python/numpy/files/numpy-2.3.3-avx512f-only.patch | 25 | ||||
| -rw-r--r-- | dev-python/numpy/numpy-2.3.3.ebuild | 2 |
2 files changed, 27 insertions, 0 deletions
diff --git a/dev-python/numpy/files/numpy-2.3.3-avx512f-only.patch b/dev-python/numpy/files/numpy-2.3.3-avx512f-only.patch new file mode 100644 index 000000000000..41205229202a --- /dev/null +++ b/dev-python/numpy/files/numpy-2.3.3-avx512f-only.patch @@ -0,0 +1,25 @@ +From f3c224a321b86647cff902d69a5463823c2fdcbd Mon Sep 17 00:00:00 2001 +From: Raghuveer <devulapalli.raghuveer@gmail.com> +Date: Fri, 5 Sep 2025 20:56:52 -0700 +Subject: [PATCH] Remove #error and fallback to AVX2 when compiled with just + -mavx512f + +--- + src/x86simdsort-static-incl.h | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/src/x86simdsort-static-incl.h b/src/x86simdsort-static-incl.h +--- a/numpy/_core/src/npysort/x86-simd-sort/src/x86simdsort-static-incl.h ++++ b/numpy/_core/src/npysort/x86-simd-sort/src/x86simdsort-static-incl.h +@@ -197,10 +197,7 @@ void x86simdsortStatic::partial_qsort<_Float16>( + } + #endif + +-#elif defined(__AVX512F__) +-#error "x86simdsort requires AVX512DQ and AVX512VL to be enabled in addition to AVX512F to use AVX512" +- +-#elif defined(__AVX2__) && !defined(__AVX512F__) ++#elif defined(__AVX2__) + /* 32-bit and 64-bit dtypes vector definitions on AVX2 */ + #include "avx2-32bit-half.hpp" + #include "avx2-32bit-qsort.hpp" diff --git a/dev-python/numpy/numpy-2.3.3.ebuild b/dev-python/numpy/numpy-2.3.3.ebuild index c11582e95608..be424340c11e 100644 --- a/dev-python/numpy/numpy-2.3.3.ebuild +++ b/dev-python/numpy/numpy-2.3.3.ebuild @@ -75,6 +75,8 @@ PATCHES=( "${FILESDIR}"/${PN}-2.3.2-no-detect.patch # https://github.com/numpy/numpy/pull/29579 "${FILESDIR}"/${PN}-2.3.2-arm-asimddp.patch + # https://github.com/intel/x86-simd-sort/pull/212 + "${FILESDIR}"/${P}-avx512f-only.patch ) has_all_x86() { |
