Skip to content

Emulate AVX-512 on Linux runners that lack it - #4

Merged
bfierz merged 2 commits into
mainfrom
emulate-avx512
Sep 12, 2026
Merged

bfierz merged 2 commits into
mainfrom
emulate-avx512

Conversation

@bfierz

@bfierz bfierz commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • The Linux AVX-512 legs (ubuntu-latest, gcc-12/clang-18) previously just skipped ctest when the assigned runner's CPU didn't support AVX-512, so those legs frequently didn't actually exercise the AVX-512 backend at all.
  • They now fall back to running under Intel SDE (sde64 -skx) when /proc/cpuinfo shows the host lacks avx512f/avx512vl/avx512dq, via CMAKE_CROSSCOMPILING_EMULATOR — the same mechanism this workflow already uses for the armv7 qemu-arm cross job, just pointed at a different emulator. SDE (downloaded, checksum-pinned) is a dynamic binary instrumentation tool built by Intel specifically to emulate exact microarchitectures, including newer ISA extensions on hardware that predates them; -skx targets Skylake-X, the first mainstream chip with AVX-512F/CD/BW/DQ/VL.
    • QEMU's qemu-x86_64 user-mode TCG emulator was tried first (same CMAKE_CROSSCOMPILING_EMULATOR mechanism, -cpu max), but its AVX-512 coverage proved too incomplete for this codebase's instruction mix: most tests segfaulted under it, inconsistently (some passed, most didn't), pointing at gaps in specific instruction forms rather than a config mistake.
  • When the runner does have native AVX-512 support, nothing changes: the emulator arg stays empty and tests run natively as before (no emulation overhead).
  • Windows AVX-512 is untouched — it still skips on unsupported hardware, since this only covers the Linux legs.

@bfierz
bfierz merged commit 9311a84 into main Sep 12, 2026
26 checks passed
@bfierz
bfierz deleted the emulate-avx512 branch September 12, 2026 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant