Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
TST: fix test_validate_transcendentals skip condition to match SVML d…
…ispatch

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.
  • Loading branch information
stratakis committed Apr 25, 2026
commit c31f18ca4198edaded4fa980108c9556fb03c925
8 changes: 4 additions & 4 deletions numpy/_core/tests/test_umath_accuracy.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
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)

# 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")
Expand Down
Loading