Skip to content

fix(build): ship a portable CPU baseline instead of host-native code - #1

Merged
chamsechan merged 1 commit into
mainfrom
fix/portable-cpu-baseline
Oct 20, 2026
Merged

chamsechan merged 1 commit into
mainfrom
fix/portable-cpu-baseline

Conversation

@chamsechan

Copy link
Copy Markdown
Owner

Problem

The v0.1.0 `inferlet-x64` archive was configured without `GGML_NATIVE=OFF`. ggml enables native tuning by default when not cross-compiling, so `ggml-cpu` (`ggml-cpu.c`, `mmq.cpp`, `ops.cpp`, `sgemm.cpp`, …) was compiled with the release runner's AVX-512 instructions. On AVX2-only hosts, such as some GitHub `ubuntu-latest` AMD runners, any load crashes with SIGILL. This was seen in LLM-EdgeFlow PR #204 (`InferletBackendTest.InvalidWeightsFailSynchronouslyAcrossRepeatedLoads`). The ARM package was cross-compiled and not affected.

Change

  • `cmake/InferletOptions.cmake`: force `GGML_NATIVE=OFF`. On x86_64, ggml then uses its portable baseline: SSE4.2/AVX/AVX2/BMI2/FMA/F16C, with AVX-512 off. It also stops the macOS package from depending on the build host's CPU.
  • Release workflow: fail the x64 job if the packaged archive contains AVX-512/AMX instructions (`%zmm`, `%k`, `%tmm`).
  • Version 0.1.1.

After merging, tag `v0.1.1` to publish the release.

🤖 Generated with Claude Code

The v0.1.0 x64 archive was built with GGML_NATIVE defaulting to ON, so
ggml-cpu used the release runner's AVX-512 instructions and faults with
SIGILL on AVX2-only hosts. Force GGML_NATIVE=OFF for distributed
archives, guard the x64 package against AVX-512/AMX code, and bump the
version to 0.1.1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chamsechan
chamsechan merged commit 28a29d4 into main Oct 20, 2026
5 checks passed
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