From 5ccfaee41a6feb9449f22f9733ec418366546f6f Mon Sep 17 00:00:00 2001 From: Marco Barbone Date: Sat, 31 Oct 2026 15:10:39 -0400 Subject: [PATCH] Fix pre-existing CI failures on MSYS2 CLANG64 and macOS The '0 ^ x with exception' block of test_pow unmasked FE_INVALID around both the pow calls and CHECK_BATCH_EQ. The comparison's vectorized arithmetic raises FE_INVALID on inf/NaN lanes (for example inf - inf), which traps and kills the test runner on MSYS2 CLANG64 (exit 127). Store the batch results while the exception is unmasked and compare after the restore. macOS 14 runner images are retired as of 2026-11-02 and jobs on them are cancelled by brownouts, so run the native cell on macos-15. Assisted-by: MiMo-V2.6-Pro-MOPD --- .github/workflows/macos.yml | 3 ++- test/test_power.cpp | 13 +++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index ba873e432..37fea8355 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -9,7 +9,8 @@ jobs: strategy: matrix: sys: - - { os: '14', arch: 'native' } + # macos-14 runner images are retired as of 2026-11-02 + - { os: '15', arch: 'native' } - { os: '15', arch: 'neon64' } - { os: '15-intel', arch: 'sse4.2' } runs-on: macos-${{ matrix.sys.os }} diff --git a/test/test_power.cpp b/test/test_power.cpp index cdf8c146a..de2ed14ff 100644 --- a/test/test_power.cpp +++ b/test/test_power.cpp @@ -86,17 +86,26 @@ struct power_test // Test with FE_INVALID... unsigned mask = _MM_GET_EXCEPTION_MASK(); _MM_SET_EXCEPTION_MASK(mask & ~_MM_MASK_INVALID); + std::vector computed(nb_input); for (size_t i = 0; i < nb_input; i += size) { - batch_type zlhs_in, rhs_in, out, ref; + batch_type zlhs_in, rhs_in, out; detail::load_batch(zlhs_in, zlhs_input, i); detail::load_batch(rhs_in, rhs_input, i); out = pow(zlhs_in, rhs_in); + detail::store_batch(out, computed, i); + } + _MM_SET_EXCEPTION_MASK(mask); + // Compare after the restore: the comparison raises FE_INVALID on + // inf/NaN lanes and would trap with the exception unmasked. + for (size_t i = 0; i < nb_input; i += size) + { + batch_type ref, out; detail::load_batch(ref, expected, i); + detail::load_batch(out, computed, i); INFO("0 ^ x with exception"); CHECK_BATCH_EQ(ref, out); } - _MM_SET_EXCEPTION_MASK(mask); #endif } #ifndef __FAST_MATH__