You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, first of all I'd like to precise I've read the issue #548 that seems related, but it seems that the PR mentioned in it was merged ~2y ago so I think it might not be related atfer all ?
I finally had some time to dig a bit on this, and I tracked down the bug to the xsimd::kernel::bitofsign function.
This function performs a bitwise & operation on -0.f to retrieve the sign bit. But GCC optimize -0.F to 0.F so the sign is inversed, which poison the whole computing chain.
I haven't yet found a nice way to force the value to be -0.f. It would either require to disable ffast-math on the minuszero function (which is the one actually causing the positive zero to be loaded), but this is hard to do because it is generated through a macro.
Another way would be to disable ffast-math on the whole bitofsign function, and load minus zero manually using batch<float, A>::broadcast(-0.F) rather than calling minuszero.
I'll keep digging when I'll have time, but I'm interested if someone have a feedback on this
Hi, first of all I'd like to precise I've read the issue #548 that seems related, but it seems that the PR mentioned in it was merged ~2y ago so I think it might not be related atfer all ?
Setup
XSIMD versions tested : 11.1.0 / 11.2.0 / e9bd979
I'm cross-compiling with GCC-10.2-2020.11 for aarch64.
flags :
-O3 --ffast-math
The issue
Sometimes, not all times, the result of
xsimd::exp
onxsimd::batch<std::complex<float>>
give the negative of the expected result.Demo
output:
I've tested with both
qemu-aarch64-static
and my raspberry pi 3B+ and both gives the same erroneous resultsNotes
If I remove
--ffast-math
the results are correct.On my intel setup (AVX2 / GCC 11.4.0 /
ffast-math
) the results are correct.Please let me know if there's anything else I can do to help 🙂 And thanks a lot for this library !
The text was updated successfully, but these errors were encountered: