Skip to content

Fix: Numpy 1.24 sincos followup - #10786

Merged
esc merged 4 commits into
numba:mainfrom
swap357:fix/np124_sincos_followup
Aug 18, 2026
Merged

esc merged 4 commits into
numba:mainfrom
swap357:fix/np124_sincos_followup

Conversation

@swap357

@swap357 swap357 commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #10572 for remaining CI failures on Linux x86_64 with NumPy < 1.25.

#10572 added a 4-ULP allowance for numpy_sincos_low_precision, but two asserts were missed and two tests still fail under that budget:

  • test_series_ufunc and test_basic_offload now use the same ulps = 4 if numpy_sincos_low_precision else 1 check.
  • test_windowing is skipped: near-zero blackman endpoints differ in sign (4e-17 vs -1e-17), which relative ULP comparison cannot match.
  • test_lift_objectmode_issue_4223 is skipped: repeated sin/cos in that loop lets the NumPy < 1.25 error grow past ULP tolerance.

Strict comparison is unchanged everywhere else.

Fixes #10571

Assisted-by: Kilo (Grok 4.6)

@swap357
swap357 force-pushed the fix/np124_sincos_followup branch from 2c1dce2 to ea33e58 Compare August 17, 2026 19:22
Add the 4-ULP allowance to test_series_ufunc and test_basic_offload,
which numba#10572 missed.
Skip test_windowing and test_lift_objectmode_issue_4223 on
Linux x86_64 with NumPy<1.25, where relative ULP comparison
cannot match near-zero residuals or accumulated error.
@swap357
swap357 force-pushed the fix/np124_sincos_followup branch from ea33e58 to a48c0b3 Compare August 17, 2026 19:25
@swap357 swap357 added skip_release_notes Skip towncrier requirement 3 - Ready for Review and removed 2 - In Progress skip_release_notes Skip towncrier requirement labels Aug 17, 2026
@swap357

swap357 commented Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

I tested this on Intel x86 system (sapphire_rapids) that supports avx512.
without patch -

(py310) spatel@ip-10-5-98-25:~/swap357/numba$ cat /sys/devices/cpu/caps/pmu_name
sapphire_rapids
(py310) spatel@ip-10-5-98-25:~/swap357/numba$ conda list | grep -E 'numba|numpy|python'
numba                      0.67.0           pypi_0           pypi
numpy                      1.24.0           pypi_0           pypi
python                     3.10.20          h741d88c_0
(py310) spatel@ip-10-5-98-25:~/swap357/numba$ TESTS="numba.tests.test_extending.TestPandasLike.test_series_ufunc
numba.tests.test_target_extension.TestTargetOffload.test_basic_offload
numba.tests.test_np_functions.TestNPFunctions.test_windowing
numba.tests.test_looplifting.TestLoopLiftingInAction.test_lift_objectmode_issue_4223"

(py310) spatel@ip-10-5-98-25:~/swap357/numba$ cd /tmp
(py310) spatel@ip-10-5-98-25:/tmp$ python -m numba.runtests $TESTS -vvv -m 4
Parallel: 4. Serial: 0
test_basic_offload (numba.tests.test_target_extension.TestTargetOffload) ... FAIL
test_series_ufunc (numba.tests.test_extending.TestPandasLike)
Check Numpy ufunc on an Series object. ... FAIL
test_lift_objectmode_issue_4223 (numba.tests.test_looplifting.TestLoopLiftingInAction) ... FAIL
test_windowing (numba.tests.test_np_functions.TestNPFunctions) ... FAIL
FAIL

…

----------------------------------------------------------------------
Ran 4 tests in 4.199s

FAILED (failures=5)


with patch -


(py310) spatel@ip-10-5-98-25:~/swap357/numba$ git status
On branch fix/np124_sincos_followup
Your branch is up to date with 'origin/fix/np124_sincos_followup'.

nothing to commit, working tree clean

(py310) spatel@ip-10-5-98-25:~/swap357/numba$ pip install -e .
…
(py310) spatel@ip-10-5-98-25:~/swap357/numba$ conda list | grep -E 'numba|numpy|python'
numba                      0.67.0.dev1+196.g057a78e6f  pypi_0           pypi
numpy                      1.24.0                      pypi_0           pypi
python                     3.10.20                     h741d88c_0

(py310) spatel@ip-10-5-98-25:~/swap357/numba$ python -m numba.runtests $TESTS -vvv -m 4
Parallel: 4. Serial: 0
test_lift_objectmode_issue_4223 (numba.tests.test_looplifting.TestLoopLiftingInAction) ... skipped 'NumPy<1.25 sincos vs libm'
test_windowing (numba.tests.test_np_functions.TestNPFunctions) ... skipped 'NumPy<1.25 sincos vs libm'
test_basic_offload (numba.tests.test_target_extension.TestTargetOffload) ... ok
test_series_ufunc (numba.tests.test_extending.TestPandasLike)
Check Numpy ufunc on an Series object. ... ok

----------------------------------------------------------------------
Ran 4 tests in 2.129s

OK (skipped=2)

@kc611
kc611 requested a review from esc August 18, 2026 14:50

@esc esc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please mention the pre-cursor PR where the reduction was first attempted -- in the release notes snippet. Otherwise, good to go

@esc esc added 4 - Waiting on author Waiting for author to respond to review and removed 3 - Ready for Review labels Aug 18, 2026
@swap357

swap357 commented Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

Please mention the pre-cursor PR where the reduction was first attempted -- in the release notes snippet. Otherwise, good to go

Thank you, I've updated the release note with 4255c69

@esc

esc commented Aug 18, 2026

Copy link
Copy Markdown
Member

Ignoring CI glitch and proceeding with merge

@esc esc added 5 - Ready to merge Review and testing done, is ready to merge and removed 4 - Waiting on author Waiting for author to respond to review labels Aug 18, 2026
@esc
esc merged commit 51031a8 into numba:main Aug 18, 2026
22 of 26 checks passed
@swap357 swap357 added this to the 0.68.0rc1 milestone Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5 - Ready to merge Review and testing done, is ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test failures on NumPy<1.25 on linux-64 with AVX512_SKX instruction

2 participants