Closed m-hagelin closed 2 years ago
I see the same failures in the fft_accuracy test. I am running archlinux which moved to clang 11 not long ago. avx2 on an i7 8700k.
Investigating this. Likely vector optimizer bug in clang 11. Once a workaround will be found for this, patch for kfr will be released.
I found same problem ... any news so far for kfr patch availability ?
I still see the failures in fft_accuracy test when compiling with clang 12.0.1 and clang 13 with CPU_ARCH=avx2. At the cost of a small performance loss, I found that disabling fast-math for libkfr_dft made all tests pass. Thus, it seems that one of the optimizations done by fast-math in newer clang/llvm versions is problematic.
Fixed in dev branch with no performance loss (spoiler: -ffp-contract=fast
).
@slarew, There was indeed a Clang bug in the code of optimizations enabled by -ffast-math
switch but fortunately not -ffp-contract=fast
. Newest Xcode 13 was also affected but clang-cl was not.
The testcase fft_accuracy fails quite badly after building with clang 11.