-
Notifications
You must be signed in to change notification settings - Fork 306
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
Result of floating point computations does not match between AVX2 and AVX512 #2782
Comments
It's expected, at least with |
Yes, the compiler has much more leeway to reorder operations when doing |
We are not using --fast-math, but 'fast' library of math functions --math-lib. However, even if I use --math-lib=default, I still get different results from AVX512 path. Also, I replaced rcp(x) by '1 / x' and rsqrt(x) by '1 / sqrt(x)' and issue persists. Is this still expected under above conditions ? |
Try Removing If it's not a library, then it could be slightly different sequence of FMA instructions due to optimization. You can try |
Great tips ! Thanks ! |
@petrsm, is your project open-source? |
Unfortunately it is not. At the end, by avoiding usage of rsqrt() and rcp() I managed to make results of computations to match between AVX512 a AVX2, except of few specific functions. I ran out of time for investigation, so for those which does not match, I always use AVX2. |
Hi guys !
We have complex floating point ISPC code, which produces slightly different results for
avx2-i32x8 vs avx512skx-x16 targets. Both targets have exactly same command line and
we are using "--math-lib=fast".
Is this behavior expected ? Or output should be exactly the same ?
Unfortunately, I have not isolated the issue yet - I am just checking what is expected state.
Thanks !
The text was updated successfully, but these errors were encountered: