-
Notifications
You must be signed in to change notification settings - Fork 138
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
Certain tests fail on gcc 12.0.0 pre-release #439
Comments
Updated with |
This updates sleef to latest upstream commit 85440a5e87dae36ca1b891de14bc83b441ae7c43 which fixes a bunch of things including AVX2 detection. DFT library is now disabled by default because it has issues indicated by issue reports in upstream repo. There are also some issues with unit tests and/or library itself which may results in bugs however unit tests works fine on 13.2-RELEASE amd64 at least. Import patch from Debian to fix build of unit tests References: shibatch/sleef#439 https://salsa.debian.org/science-team/sleef/-/blob/master/debian/patches/disable-duplicate-mpfr-funcs.patch PR: 266784 Reviewed by: jmd (maintainer)
I re-tested this with Sleef 3.5.1 and GCC 14.0.1. I see some regressions in Sleef 3.6 (bug report to follow), and I wanted to make sure I still had a correct baseline to compare against. Note that I am not building the DFT library due to #214, and I am not building the quad-precision library since it is still marked experimental in 3.5.1. (If possible, I plan to enable it for 3.6.) Fedora no longer supports All of the test failures on each architecture are still exactly the same as in the original report. I don’t really know how to debug these, but please let me know if there’s anything I can do to help. |
Again thanks for the detailed report! AFAICT your baseline sounds sensible, these bugs have not been fixed yet unfortunately. I'm going to look into these failures right now.
Thanks, I'll let you know if I need help reproducing, but IIRC these were easy to reproduce.
Thanks for sharing. What about i386? This is currently missing in our CI, but wondered how important that is. |
We don’t build for true Anyway, |
So the issue with the The issue appears at
Expected result with
Unexpected result with
If input is -0.0f, then output is 0.0f in first case, -0.0f in second. It is unclear to me why this option was introduced, removing the option fixes all failures with gcc12 unfortunately it might have an impact on performance. Would it affect vector code though? |
It was introduced in 33ffaff via #169. Unfortunately, the rationale was never documented. Normally I’m leaning toward the idea that this is a compiler bug, at least assuming C guarantees |
The comment seems to indicate that the aim was to prevent compilers from emitting calls to libm, e.g. sqrt. But only the flag
You mean NOT affect, right?
After discussing with gcc people we have reached a similar conclusion, it looks like a violation of the default So we have 2 options here, we could wait for the bug to be fixed (might take some time but safer) or simply remove the option (and deal with minor consequences on scalar performance). |
Hi! Good news, this was filed as a definite gcc bug and has been taken care of by @joeramsay and people in our GNU team. These signed-zero cases often get forgotten, for obvious reasons. Will close this and #483 once fix is backported and tests pass. Unless there are some leftover tests failing. |
Thank you! I will keep an eye on this. The GCC package in Fedora tracks upstream pretty closely, so I should be able to test the fix quickly once it’s released. If I have time, I might build my own GCC package with that commit backported just to validate the fix. |
Ok, it took more than a day to build the patched GCC in COPR, but it looks like—once it’s released and packaged—I can expect that the GCC change will indeed fix all of the test failures reported in this issue. Next I’ll double-check Sleef 3.6 and see if all of the test failures from #518 are still present with the patched GCC. |
Hi! Thanks, we appreciate the effort. Let me know how it goes, if new failures are still present in 3.6 we will investigate each of them to better characterise the failures and open new issues. |
Using |
Indeed it is a workaround, but we were worried about the implications on performance (although scalar performance should not matter). |
For now, I’d rather favor strict correctness over maximum scalar performance. In any case, once the GCC fix is released, I’ll drop |
Plot twist: either |
Hi! So, @joeramsay's fix to this gcc bug was merged into gcc 14 and has just been backported to gcc 12 and 13. |
Fedora Linux just introduced a pre-release build of
gcc
12.0.0 to the development version of Fedora (Rawhide). (Fedora 36 will be released with GCC 12 in mid-2022.) This has resulted in a few new test failures in the sleef package on several architectures.The release notes for GCC 12 are here. It’s not obvious whether these new failures are a Sleef bug or a GCC bug. Disabling LTO makes no difference.
armv7hl
OK (no failures)
i686
OK (no failures)
x86_64
aarch64
ppc64le
s390x
The text was updated successfully, but these errors were encountered: