highway: unexpected emu128 failures

After a recent highway upgrade https://github.com/libjxl/libjxl/pull/1452, we are observing some unexpected failures in tests with the highway target emu128 on 32 bit architectures, for example

[----------] 1 test from HwyMulTestGroup/HwyMulTest
[ RUN      ] HwyMulTestGroup/HwyMulTest.TestAllMulHigh/Emu128
i16x8 expect [0+ ->]:
  0x3FFF,0x0FFF,0x03FF,0x00FF,0x003F,0x000F,0x0003,
i16x8 actual [0+ ->]:
  0xBFFF,0x0FFF,0xE400,0x00FF,0xF840,0x000F,0xFE04,
Abort at ./third_party/highway/hwy/tests/mul_test.cc:131: Emu128, i16x8 lane 0 mismatch: expected '0x3FFF', got '0xBFFF'.

see here: https://github.com/libjxl/libjxl/runs/6916936967?check_suite_focus=true Also see the discussion on https://github.com/libjxl/libjxl/pull/1500.

Two questions:

  1. Shouldn’t the tests still pass when setting the tolerance to 0, as done here: https://github.com/libjxl/libjxl/runs/6917084785?check_suite_focus=true?
  2. Is the HwyMulTestGroup/HwyMulTest.TestAllMulHigh/Emu128 above something that needs to be fixed upstream?

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (15 by maintainers)

Commits related to this issue

Most upvoted comments

hm, it might indeed be a compiler issue. I see both convolve_test and mul_test working with ci.sh asan (clang 13). What’s running on the builder is clang-7. I see two options: updating the compiler on the builder, or opting out of EMU128 (and reverting to HWY_SCALAR) on certain platforms - any preference?

On the failing “Windows MSYS2 / i686” test, the compiler seems to be mingw-w64-i686-gcc-12.1.0-2. Perhaps it is a bug in gcc 12.1.0-2? I will try with clang instead and also try reverting to HWY_SCALAR on that platform.

It seems the “passing” tests were build-only, not actually running those tests?

Yes, exactly.