Fix test_validate_transcendentals skip to match SVML dispatch
Resolves: RHEL-193001
This commit is contained in:
parent
7be871eb60
commit
0860696e15
40
fix-test_validate_transcendentals-x86_64.patch
Normal file
40
fix-test_validate_transcendentals-x86_64.patch
Normal file
@ -0,0 +1,40 @@
|
||||
From 8845f7ac440a6469e84030847c2271930a1d538b Mon Sep 17 00:00:00 2001
|
||||
From: Charalampos Stratakis <cstratak@redhat.com>
|
||||
Date: Sat, 25 Apr 2026 05:03:20 +0200
|
||||
Subject: [PATCH] TST: fix test_validate_transcendentals skip condition to
|
||||
match SVML dispatch
|
||||
|
||||
The test was running on machines with FMA3+AVX2 or AVX512F, but the
|
||||
SVML code path requires AVX512_SKX (F+BW+DQ+VL). On machines without
|
||||
AVX512_SKX, the glibc libm scalar fallback is used, which exceeds the
|
||||
2 ULP tolerance for some float64 cbrt inputs.
|
||||
---
|
||||
numpy/_core/tests/test_umath_accuracy.py | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/numpy/_core/tests/test_umath_accuracy.py b/numpy/_core/tests/test_umath_accuracy.py
|
||||
index 5707e92..2c44e97 100644
|
||||
--- a/numpy/_core/tests/test_umath_accuracy.py
|
||||
+++ b/numpy/_core/tests/test_umath_accuracy.py
|
||||
@@ -18,14 +18,14 @@
|
||||
UNARY_OBJECT_UFUNCS.remove(np.invert)
|
||||
UNARY_OBJECT_UFUNCS.remove(np.bitwise_count)
|
||||
|
||||
-IS_AVX = __cpu_features__.get('AVX512F', False) or \
|
||||
- (__cpu_features__.get('FMA3', False) and __cpu_features__.get('AVX2', False))
|
||||
+# SVML is only dispatched on AVX512_SKX (see loops_umath_fp.dispatch.c.src)
|
||||
+IS_SVML = __cpu_features__.get('AVX512_SKX', False)
|
||||
|
||||
IS_AVX512FP16 = __cpu_features__.get('AVX512FP16', False)
|
||||
|
||||
-# only run on linux with AVX, also avoid old glibc (numpy/numpy#20448).
|
||||
+# only run on linux with SVML, also avoid old glibc (numpy/numpy#20448).
|
||||
runtest = (sys.platform.startswith('linux')
|
||||
- and IS_AVX and not _glibc_older_than("2.17"))
|
||||
+ and IS_SVML and not _glibc_older_than("2.17"))
|
||||
platform_skip = pytest.mark.skipif(not runtest,
|
||||
reason="avoid testing inconsistent platform "
|
||||
"library implementations")
|
||||
--
|
||||
2.54.0
|
||||
|
||||
@ -44,6 +44,10 @@ Source0: https://github.com/%{modname}/%{modname}/releases/download/v%{ve
|
||||
# https://github.com/numpy/numpy/pull/31819
|
||||
Patch: coverity-fixes.patch
|
||||
|
||||
# Fix test_validate_transcendentals skip to match SVML dispatch
|
||||
# Sent upstream: https://github.com/numpy/numpy/pull/31333
|
||||
Patch: fix-test_validate_transcendentals-x86_64.patch
|
||||
|
||||
BuildRequires: python%{python3_pkgversion}-devel
|
||||
BuildRequires: gcc-gfortran gcc gcc-c++
|
||||
BuildRequires: lapack-devel
|
||||
@ -241,7 +245,8 @@ export PYTHONPATH=%{buildroot}%{python3_sitearch}
|
||||
%changelog
|
||||
* Tue Jul 07 2026 Charalampos Stratakis <cstratak@redhat.com> - 2.3.4-2
|
||||
- Fix issues identified via Coverity static analysis
|
||||
- Fixes: RHEL-193002
|
||||
- Fix test_validate_transcendentals skip to match SVML dispatch
|
||||
- Fixes: RHEL-193002, RHEL-193001
|
||||
|
||||
* Thu Oct 23 2025 Tomáš Hrnčiar <thrnciar@redhat.com> - 2.3.4-1
|
||||
- Initial import
|
||||
|
||||
Loading…
Reference in New Issue
Block a user