YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
fix: disable AVX-512 in whisper-rs builds to fix Lunar Lake crashes
louis030195b042308d5ad8
diff --git a/.github/workflows/release-app.yml b/.github/workflows/release-app.ymlindex adbd4332c..a1ee7047f 100644--- a/.github/workflows/release-app.yml+++ b/.github/workflows/release-app.yml@@ -686,6 +686,11 @@ jobs:TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}CI: true+ GGML_NATIVE: "OFF"+ GGML_AVX512: "OFF"+ GGML_AVX512_VBMI: "OFF"+ GGML_AVX512_VNNI: "OFF"+ GGML_AVX512_BF16: "OFF"CMAKE_ARGS: -DGGML_NATIVE=OFF -DGGML_AVX512=OFF -DGGML_AVX512_VBMI=OFF -DGGML_AVX512_VNNI=OFF -DGGML_AVX512_BF16=OFFNO_STRIP: truerun: |@@ -793,16 +798,20 @@ jobs:# (0xc000001d) on consumer CPUs without AVX-512 (Arrow Lake, Panther Lake, Lunar Lake).# See: https://developercommunity.visualstudio.com/content/problem/848627RUSTFLAGS: ""- # Cap MSVC codegen at AVX2 — prevents auto-vectorizing C deps- # (e.g. sqlite-vec) to AVX-512 on CI Xeon runners.- # Only set for x86_64 — clang on ARM64 doesn't understand /arch:AVX2.CFLAGS: ${{ matrix.target == 'x86_64-pc-windows-msvc' && '/arch:AVX2' || '' }}CXXFLAGS: ${{ matrix.target == 'x86_64-pc-windows-msvc' && '/arch:AVX2' || '' }}- # Fix whisper.cpp crash on newer CPUs (Lunar Lake, Arrow Lake, etc.) that lack AVX-512- # GGML_NATIVE=ON compiles with -march=native, causing illegal instruction on CPUs without AVX-512- # CMAKE_C_FLAGS/CMAKE_CXX_FLAGS=/arch:AVX2 caps CMake-built deps (whisper.cpp/GGML) at AVX2.- # CFLAGS/CXXFLAGS only affects cc-crate builds (sqlite-vec), NOT cmake-crate builds.- # Without this, MSVC auto-vectorizes GGML code to AVX-512 on Xeon CI runners.+ # Fix whisper.cpp/GGML AVX-512 crash on Lunar Lake, Arrow Lake, etc.+ # whisper-rs build.rs passes env vars starting with GGML_ as cmake defines.+ # CMAKE_ARGS as a single string gets passed as -DCMAKE_ARGS="..." which cmake ignores.+ # Individual GGML_* env vars are the ONLY way to control the whisper-rs cmake build.+ # Without GGML_NATIVE=OFF, FindSIMD.cmake detects AVX-512 on CI Xeon runners+ # and overrides GGML_AVX512 to ON, producing 512-bit ZMM instructions that crash+ # on CPUs without full AVX-512 support (STATUS_ILLEGAL_INSTRUCTION 0xc000001d).+ GGML_NATIVE: "OFF"+ GGML_AVX512: "OFF"+ GGML_AVX512_VBMI: "OFF"+ GGML_AVX512_VNNI: "OFF"+ GGML_AVX512_BF16: "OFF"CMAKE_ARGS: ${{ matrix.target == 'x86_64-pc-windows-msvc' && '-DGGML_NATIVE=OFF -DGGML_AVX512=OFF -DGGML_AVX512_VBMI=OFF -DGGML_AVX512_VNNI=OFF -DGGML_AVX512_BF16=OFF -DCMAKE_C_FLAGS=/arch:AVX2 -DCMAKE_CXX_FLAGS=/arch:AVX2' || '-DGGML_NATIVE=OFF' }}OPENBLAS_PATH: ${{ github.workspace }}/apps/screenpipe-app-tauri/src-tauri/openblasrun: bunx tauri build --verbose ${{ matrix.tauri-args }}diff --git a/.github/workflows/release-cli.yml b/.github/workflows/release-cli.ymlindex 996b70dfd..19deef999 100644--- a/.github/workflows/release-cli.yml+++ b/.github/workflows/release-cli.yml@@ -330,10 +330,15 @@ jobs:# LTCG removed: MSVC LTCG ignores /arch:AVX2 and can emit AVX-512 on Xeon CI runners# causing STATUS_ILLEGAL_INSTRUCTION on consumer CPUs (Arrow Lake, Panther Lake, Lunar Lake)RUSTFLAGS: ""- # Cap MSVC codegen at AVX2 — prevent AVX-512 on consumer CPUsCFLAGS: "/arch:AVX2"CXXFLAGS: "/arch:AVX2"- # Also cap CMake-built deps (whisper.cpp/GGML) — CFLAGS doesn't reach cmake crate+ # whisper-rs build.rs passes GGML_* env vars as cmake defines.+ # CMAKE_ARGS string was ignored — these individual vars actually work.+ GGML_NATIVE: "OFF"+ GGML_AVX512: "OFF"+ GGML_AVX512_VBMI: "OFF"+ GGML_AVX512_VNNI: "OFF"+ GGML_AVX512_BF16: "OFF"CMAKE_ARGS: "-DGGML_NATIVE=OFF -DGGML_AVX512=OFF -DGGML_AVX512_VBMI=OFF -DGGML_AVX512_VNNI=OFF -DGGML_AVX512_BF16=OFF -DCMAKE_C_FLAGS=/arch:AVX2 -DCMAKE_CXX_FLAGS=/arch:AVX2"ORT_STRATEGY: systemORT_LIB_LOCATION: ${{ github.workspace }}/apps/screenpipe-app-tauri/src-tauri/onnxruntime-win-x64-1.19.2diff --git a/.github/workflows/release-enterprise-windows.yml b/.github/workflows/release-enterprise-windows.ymlindex 3a3cfc24b..0ce30b7ff 100644--- a/.github/workflows/release-enterprise-windows.yml+++ b/.github/workflows/release-enterprise-windows.yml@@ -179,6 +179,11 @@ jobs:CARGO_PROFILE_RELEASE_PANIC: abortCARGO_PROFILE_RELEASE_INCREMENTAL: "false"RUSTFLAGS: "-C link-arg=/LTCG"+ GGML_NATIVE: "OFF"+ GGML_AVX512: "OFF"+ GGML_AVX512_VBMI: "OFF"+ GGML_AVX512_VNNI: "OFF"+ GGML_AVX512_BF16: "OFF"CMAKE_ARGS: "-DGGML_NATIVE=OFF -DGGML_AVX512=OFF -DGGML_AVX512_VBMI=OFF -DGGML_AVX512_VNNI=OFF -DGGML_AVX512_BF16=OFF"with:args: "--target x86_64-pc-windows-msvc --features enterprise-build"