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(ci): pass /arch:AVX2 to CMake builds (whisper.cpp/GGML) on Windows
Louis Beaumont772e63a3d987
diff --git a/.github/workflows/release-app.yml b/.github/workflows/release-app.ymlindex 8871f6b58..73b104bb9 100644--- a/.github/workflows/release-app.yml+++ b/.github/workflows/release-app.yml@@ -812,9 +812,12 @@ jobs:# 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, etc.) that lack AVX-512+ # 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_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' || '-DGGML_NATIVE=OFF' }}+ # 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.+ 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 718391314..3243f2f66 100644--- a/.github/workflows/release-cli.yml+++ b/.github/workflows/release-cli.yml@@ -328,9 +328,11 @@ jobs:CARGO_PROFILE_RELEASE_PANIC: "abort"CARGO_PROFILE_RELEASE_INCREMENTAL: "false"RUSTFLAGS: "-C link-arg=/LTCG"- # Cap MSVC codegen at AVX2 — prevent AVX-512 on Lunar Lake etc.+ # Cap MSVC codegen at AVX2 — prevent AVX-512 on Lunar Lake, Arrow Lake etc.CFLAGS: "/arch:AVX2"CXXFLAGS: "/arch:AVX2"+ # Also cap CMake-built deps (whisper.cpp/GGML) — CFLAGS doesn't reach cmake crate+ 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.2OPENBLAS_PATH: ${{ github.workspace }}/apps/screenpipe-app-tauri/src-tauri/openblas