Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.5k
DRAFT: Analyze macos-15-intel problems of issue 23710#23728
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation
DO NOT MERGE!Issue 2370 shows that only on "macos-15-intel" hardware, `signal.closest_STFT_dual_window` does not produce identical results though, it should.Here, additional tests are added to investigate that behavior.This PR is needed due to lack of having local macos-15-intel hardware.Consult also PR 23713.
DO NOT MERGE! Continuing analysis on Issue 2370.
DO NOT MERGE! Continuing analysis on Issue 2370 (1).[skip circle]
DO NOT MERGE! Continuing analysis on Issue 2370 (2).[skip circle]
DietBru commentedOct 3, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Thistest shows that matrix multiplication and addition does not produce identical results (or I'm blind), i.e.: xp_assert_equal(qd2,qd1)assertqd1isnotqd2# ensure mutating qd1 is not the problem# Taken from closest_STFT_dual_window (qd1 == qd2):denominator1=qd1.T.real @qd1.real+qd1.T.imag @qd1.imag# always >= 0denominator2=qd2.T.real @qd2.real+qd2.T.imag @qd2.imag# always >= 0xp_assert_equal(denominator2,denominator1)# fails only on macos15-intel Do you have any ideas,@andyfaff? The corresponding log output:
|
Sorry, this isn't my area of expertise. I just discovered the issue ¯_(ツ)_/¯. I would naively expect it to be equal. Same size arrays, same dtype, identical contents. The difference looks to be an ULP. Perhaps we can just skip the test? How important is it that the calculation is identical in this case?
Can you boil it down to a standalone example (just numpy)? That calculation doesn't involve any scipy code, that check is purely a numpy calculation. We should find out more about the numpy configuration. |
DO NOT MERGE! Continuing analysis on Issue 2370 (3).Attempt at creating self-contained test.[skip circle]
Thanks for reporting this issue to NumPy,@andyfaff.
It would be nice to have some sort of confirmation that the deviations are always in the least significant mantissa bits. My hunch is that some uninitialized memory area is assumed to be zeroed (perhaps caused by using imaginary parts of an real-valued array), which could potentially lead to large deviations... |
DO NOT MERGE! Continuing analysis on Issue 2370 (4).Improve failing test.[skip circle]
DO NOT MERGE! Continuing analysis on Issue 2370 (5).New test to check if matrix multiplication is the problem.[skip circle]
DO NOT MERGE! Continuing analysis on Issue 2370 (6).Attempt to isolate the problem a little more.[skip circle]
DO NOT MERGE! Continuing analysis on Issue 2370 (7).Attempt to isolate the problem a little more.[skip circle]
…acos-15-intel backendAs discussed in NumPy issue 29873, utilizing the inner product does not always guarantee identical results. This commit changes the equality test to a testing approximate equality in `test_closest_STFT_dual_window_roundtrip`.Introduced with PRscipy#23713. Investigations can be found in the draft PRscipy#23728.Closesscipy#23710.
Discussion can be found inNumPy issue 29873. PR#23767 fixes the test by testing for approximate equality. |
Uh oh!
There was an error while loading.Please reload this page.
DO NOT MERGE!
Issue#23713 shows that only on "macos-15-intel" hardware,
signal.closest_STFT_dual_window
does not produce identical results though, it should. Here, additional tests are added to investigate that behavior.This PR is needed due to lack of having local macos-15-intel hardware. Consult also PR#23713.