https://bugs.kde.org/show_bug.cgi?id=413330
Bug ID: 413330
Summary: avx-1 test fails on AMD EPYC 7401P 24-Core Processor
Product: valgrind
Version: unspecified
Platform: Other
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: general
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
SUMMARY
avx-1 test fails on AMD EPYC 7401P 24-Core Processor due to slightly different
RSQRTPS implementation
rsqrtps may produce slighly different results on different CPU families because
the results of instructions like reciprocal square root estimate are not
defined by the IEEE standard
(https://randomascii.wordpress.com/2013/07/16/floating-point-determinism/)
I tried to run this simple code on AMD EPYC 7401P 24-Core Processor (dell) and
Intel(R) Core(TM) i7-7600U CPU @ 2.80GHz (intel)
code:
#include<stdio.h>
int main()
{
float arr_in[4], arr_out[4];
arr_in[0] = 1;
arr_in[1] = 2;
arr_in[2] = 3;
arr_in[3] = 4;
arr_out[0] = 0;
arr_out[1] = 0;
arr_out[2] = 0;
arr_out[3] = 0;
__asm__ __volatile__(
"movups %0, %%xmm0; \n\t"
"rsqrtss %%xmm0, %%xmm1; \n\t"
"movups %%xmm1, %1; \n\t"
: "=m" (arr_in)
: "m" (arr_out)
:
);
printf("arr_out: ");
for (int i = 0; i < 4; i++)
printf("%lf ", arr_out[i]);
printf("\n");
return 0;
}
the results:
dell: arr_out: 0.999878 0.707031 0.577271 0.499939
intel: arr_out: 0.999756 0.706909 0.577271 0.499878
avx-1 test always expects exactly the same output which causes its failure on
some CPU's
--
You are receiving this mail because:
You are watching all bug changes.