simd-everywhere / simde

Implementations of SIMD instruction sets for systems which don't natively support them.
https://simd-everywhere.github.io/blog/
MIT License
2.35k stars 243 forks source link

arm/neon/aba/native/c and arm/neon/aba/native/cpp fail on ppc64el #1057

Open bdrung opened 1 year ago

bdrung commented 1 year ago

Two test cases fail on ppc64el on Ubuntu 23.04 (mantic) when building from the master branch (as of 2023-08-31):

================================== 265/792 ===================================
test:         arm/neon/aba/native/c
start time:   11:32:59
duration:     0.01s
result:       exit status 1
command:      MALLOC_PERTURB_=132 /home/ubuntu/simde/gcc_test/test/arm/neon/aba-native-c
----------------------------------- stdout -----------------------------------
1..12
ok 1 aba/vaba_s8
ok 2 aba/vaba_s16
ok 3 aba/vaba_u8
ok 4 aba/vaba_u16
ok 5 aba/vaba_u32
not ok 6 aba/vaba_s32
ok 7 aba/vabaq_s8
ok 8 aba/vabaq_s16
ok 9 aba/vabaq_u8
ok 10 aba/vabaq_u16
ok 11 aba/vabaq_s32
ok 12 aba/vabaq_u32
----------------------------------- stderr -----------------------------------
../test/arm/neon/aba.c:200: assertion failed: r[0] == simde_vld1_s32(test_vec[i].r)[0] (-1971202570 == -1971202570)

(test program exited with status code 1)
==============================================================================

================================== 266/792 ===================================
test:         arm/neon/aba/native/cpp
start time:   11:32:59
duration:     0.01s
result:       exit status 1
command:      MALLOC_PERTURB_=27 /home/ubuntu/simde/gcc_test/test/arm/neon/aba-native-cpp
----------------------------------- stdout -----------------------------------
1..12
ok 1 aba/vaba_s8
ok 2 aba/vaba_s16
ok 3 aba/vaba_u8
ok 4 aba/vaba_u16
ok 5 aba/vaba_u32
not ok 6 aba/vaba_s32
ok 7 aba/vabaq_s8
ok 8 aba/vabaq_s16
ok 9 aba/vabaq_u8
ok 10 aba/vabaq_u16
ok 11 aba/vabaq_s32
ok 12 aba/vabaq_u32
----------------------------------- stderr -----------------------------------
test/arm/neon/aba.cpp:200: assertion failed: r[0] == simde_vld1_s32(test_vec[i].r)[0] (-1971202570 == -1971202570)

(test program exited with status code 1)
==============================================================================

These two test succeed on ppc64el when using the 0.7.6 release (but 126 other arm/neon test cases fail, see LP #2033648)

mr-c commented 1 year ago

Thank you for your report. What is the difference in compiler versions between the two runs? Typically this type of failure means there was a regression in the compiler itself.

Ah, you are comparing the latest release to the tip of the development branch.

The ppc64el tests pass on Debian with SIMDe 0.7.6-1 with gcc 13.2.0-1

https://ci.debian.net/data/autopkgtest/unstable/ppc64el/s/simde/36349569/log.gz

bdrung commented 1 year ago

Yes, I wanted to see if the tip of the development branch fixed the failure on ppc64el. The test showed that the development branch fixes the failures but regressed on those two test cases.

mr-c commented 1 year ago

@bdrung What I'm trying to do is to figure out the source of the failures

  1. SIMDE v0.7.6-1 passes on Debian 'sid'/'testing' on pcc64el
  2. SIMDE v0.7.6-1 fails on Ubuntu mantic on ppc64el
  3. SIMDE latest dev (v0.7.7+) passes on Ubuntu Jammy on qemu ppc64el

So I would suggest that this could be a libc 2.38 bug.

bdrung commented 1 year ago

Besides comparing the package/library versions, the compiler flags should be compared. Things like -O2/-O3 or LTO could be the culprit. Sadly the logs to not show the compiler flags.

mr-c commented 1 year ago

Besides comparing the package/library versions, the compiler flags should be compared. Things like -O2/-O3 or LTO could be the culprit. Sadly the logs to not show the compiler flags.

We can change the autopkgtests to be verbose, yep!

mr-c commented 10 months ago

@bdrung Can you test the recent v0.8.0-rc1 release I made?

kukrimate commented 10 months ago

0.7.6-1 is FTBFS in the same way on both jammy and noble for me. 0.8.0 is FTBFS on noble but as @bdrung mentioned it fails different tests. I guess I'll start bisecting the tree and see where this comes from, will report back if I managed to find the cause.

kukrimate commented 10 months ago

@mr-c I've done a test merge with the head of the development branch, and I am getting the following two errors on ppc64el: https://launchpadlibrarian.net/700085671/buildlog_ubuntu-noble-ppc64el.simde_0.8.0~rc1+git+20231129+471a342-0ubuntu1_BUILDING.txt.gz

mr-c commented 10 months ago

@kukrimate Thanks for the test! A pretty surprising error ; maybe a compiler error?

../test/arm/neon/aba.c:200: assertion failed: r[0] == simde_vld1_s32(test_vec[i].r)[0] (-1971202570 == -1971202570)