Fix crash on CPUs without AVX-512#702
Merged
Merged
Conversation
ggml's runtime ggml_cpu_has_*() helpers are compile-time macros, not CPUID probes, so a CI build with GGML_NATIVE=ON on a runner that happens to have AVX-512 embeds AVX-512 instructions in the static lib. Intel disabled AVX-512 on all consumer 12th-14th gen CPUs, so the resulting binaries crash with STATUS_ILLEGAL_INSTRUCTION during whisper_init on common user hardware (e.g. issue #701, Raptor Lake). Disable GGML_NATIVE and explicitly enable AVX, AVX2, F16C, FMA, BMI2, and SSE4.2 on amd64 builds (Windows and Linux). Matches the AVX2 guard already enforced in cmd/skyeye/main.go. macOS arm64 is unaffected. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Don't let GGML auto-detect CPU features and instead specify them explicitly. Fixes an issue where because the build environment could support CPU instructions not available on users' PCs, the published builds could run fine in CI tests but crash on user PCs.
Fixes #701