-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
gh-130317: Skip test_pack_unpack_roundtrip_for_nans() on x86 #133155
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
cc @skirpichev |
Example of failure with 32-bit float on x86:
There is a similar problem with I'm not sure why it works with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (as a temporary fix). Don't close issue.
0xf2 in _testcapi.float_pack() becomes 0xfa in PyFloat_Pack4(). The sNaN becomes a qNaN just by the calling convention, there is nothing that we can do.
I'm not sure why it works with PyFloat_Pack8().
It shouldn't, if your explanation is valid.
Hmm, my tests show that on 32-bit sNaN becomes qNaN after calling. Are you sure that size=8 tests works? |
!buildbot x86 |
🤖 New build scheduled with the buildbot fleet by @vstinner for commit 2d62e7b 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F133155%2Fmerge The command will test the builders whose names match following regular expression: The builders matched are:
|
It works on Python built with |
Reduce also the number of iterations from 1000 to 10 to ease debugging failures and prevent "command line too line" error when tests are re-run.
2d62e7b
to
c39b3c7
Compare
I guess, optimizer avoid using FPU registers As a quick fix I suggest to disable testing in 32-bit mode. And also reduce number of tests as suggested, 10 should be enough. In a follow-up PR I'll do cleanup. Probably float_set_snan() is not helpful, as well as other attempts to workaround passing of sNaN. |
@skirpichev: I rewrote my PR to simply skip the test on x86 Debian, but not skip the test on x86 Windows. Please review the updated PR. |
!buildbot x86 Debian |
🤖 New build scheduled with the buildbot fleet by @vstinner for commit c39b3c7 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F133155%2Fmerge The command will test the builders whose names match following regular expression: The builders matched are:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets merge when bots pass.
Merged, thanks for the review. Sadly, I don't think that we can work around "compiler bugs" if sNaN becomes qNaN as soon as we call a simple function taking a |
Reduce also the number of iterations from 1000 to 10 to ease
debugging failures and prevent "command line too line" error when
tests are re-run.
nan
floats is non-invertible #130317