simde icon indicating copy to clipboard operation
simde copied to clipboard

avx512/dpbf16 g++ on i686 error ; Results are off by 0.5 exactly

Open mr-c opened this issue 2 years ago • 3 comments

[238/3004] g++ -Itest/x86/avx512/dpbf16-native-cpp.p -Itest/x86/avx512 -I../test/x86/avx512 -I. -I.. -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -g -O2 '-ffile-prefix-map=/<<PKGBUILDDIR>>=.' -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fopenmp-simd -DSIMDE_CONSTRAINED_COMPILATION -DSIMDE_ENABLE_OPENMP -Wno-psabi -DSIMDE_TEST_BARE -MD -MQ test/x86/avx512/dpbf16-native-cpp.p/meson-generated_.._dpbf16.cpp.o -MF test/x86/avx512/dpbf16-native-cpp.p/meson-generated_.._dpbf16.cpp.o.d -o test/x86/avx512/dpbf16-native-cpp.p/meson-generated_.._dpbf16.cpp.o -c test/x86/avx512/dpbf16.cpp
[239/3004] g++  -o test/x86/avx512/dpbf16-native-cpp test/x86/avx512/dpbf16-native-cpp.p/meson-generated_.._dpbf16.cpp.o -Wl,--as-needed -Wl,--no-undefined -g -O2 '-ffile-prefix-map=/<<PKGBUILDDIR>>=.' -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -Wl,-z,now -Wl,--start-group -lm -Wl,--end-group

--- command ---
06:03:53 /<<PKGBUILDDIR>>/gcc_test/test/x86/avx512/dpbf16-native-cpp
--- stdout ---
1..9
ok 1 dpbf16/mm_dpbf16_ps
ok 2 dpbf16/mm_mask_dpbf16_ps
not ok 3 dpbf16/mm_maskz_dpbf16_ps
ok 4 dpbf16/mm256_dpbf16_ps
not ok 5 dpbf16/mm256_mask_dpbf16_ps
ok 6 dpbf16/mm256_maskz_dpbf16_ps
ok 7 dpbf16/mm512_dpbf16_ps
not ok 8 dpbf16/mm512_mask_dpbf16_ps
not ok 9 dpbf16/mm512_maskz_dpbf16_ps
--- stderr ---
test/x86/avx512/dpbf16.cpp:245: assertion failed: r[0] ~= simde_mm_loadu_ps(test_vec[i].r)[0] (-6336335.500000 ~= -6336335.000000)
test/x86/avx512/dpbf16.cpp:482: assertion failed: r[5] ~= simde_mm256_loadu_ps(test_vec[i].r)[5] (-6323842.000000 ~= -6323841.500000)
test/x86/avx512/dpbf16.cpp:971: assertion failed: r[8] ~= simde_mm512_loadu_ps(test_vec[i].r)[8] (-6323621.500000 ~= -6323621.000000)
test/x86/avx512/dpbf16.cpp:1159: assertion failed: r[0] ~= simde_mm512_loadu_ps(test_vec[i].r)[0] (-6324085.500000 ~= -6324086.000000)

mr-c avatar Aug 17 '21 07:08 mr-c

I can confirm this as of 90523a2 via Debian's gcc 11.2

https://buildd.debian.org/status/fetch.php?pkg=simde&arch=i386&ver=0.7.3%7E0git20210929204341.90523a2-1&stamp=1634121011&raw=0

not ok 3 dpbf16/mm_maskz_dpbf16_ps
not ok 5 dpbf16/mm256_mask_dpbf16_ps
not ok 8 dpbf16/mm512_mask_dpbf16_ps
not ok 9 dpbf16/mm512_maskz_dpbf16_ps
stderr:
test/x86/avx512/dpbf16.cpp:245: assertion failed: r[0] ~= simde_mm_loadu_ps(test_vec[i].r)[0] (-6336335.500000 ~= -6336335.000000)
test/x86/avx512/dpbf16.cpp:482: assertion failed: r[5] ~= simde_mm256_loadu_ps(test_vec[i].r)[5] (-6323842.000000 ~= -6323841.500000)
test/x86/avx512/dpbf16.cpp:971: assertion failed: r[8] ~= simde_mm512_loadu_ps(test_vec[i].r)[8] (-6323621.500000 ~= -6323621.000000)
test/x86/avx512/dpbf16.cpp:1159: assertion failed: r[0] ~= simde_mm512_loadu_ps(test_vec[i].r)[0] (-6324085.500000 ~= -6324086.000000)

Results are off by 0.5 exactly

mr-c avatar Oct 13 '21 10:10 mr-c

I'm removing this from the 0.8 milestone as AVX512_BF16 is not fully implemented / supported: https://github.com/simd-everywhere/implementation-status/blob/main/x86.md#avx512_bf16

mr-c avatar Oct 13 '21 10:10 mr-c

b721e9d34b13ff1f127a2083e24ab32639616948 skip vector ops on i686 for now

A minimized testcase should be sent to the GCC devs

mr-c avatar Feb 12 '23 11:02 mr-c