Skip to content

ci: fix wasm red — cherry-pick upstream #25943 (OpenMP off for wasm, job moved to build-wasm.yml) - #1

Merged
kainlan merged 1 commit into
masterfrom
fix/master-ci-webgpu
Aug 9, 2026
Merged

ci: fix wasm red — cherry-pick upstream #25943 (OpenMP off for wasm, job moved to build-wasm.yml)#1
kainlan merged 1 commit into
masterfrom
fix/master-ci-webgpu

Conversation

@kainlan

@kainlan kainlan commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Fixes the CI (webgpu) ubuntu-wasm red on master by cherry-picking upstream ggml-org/llama.cpp 7cdd557f768 (PR ggml-org#25943) verbatim: emscripten 6.0.3+ cannot compile OpenMP reduction criticals to wasm (error: common symbols are not yet implemented for Wasm: .gomp_critical_user_.reduction.var), so the wasm build now configures with -DGGML_OPENMP=OFF, and the wasm job moves from build-webgpu.yml into its own build-wasm.yml (job ubuntu-webgpu).

Evidence (all verified by two independent reviewers):

  • Bisect from this repo's run history: run 29059881795 (2026-07-10, emsdk latest→6.0.2) green; run 29440423694 (2026-07-15, latest→6.0.3) red with the exact error above; run 31290170215 (today, 6.0.6) red identically. No fork commit in the 07-10→07-15 window touched anything relevant — the toolchain moved under a floating latest alias.
  • Local RED/GREEN repro against emsdk 6.0.6 using the exact CI compile line: RED with -fopenmp=libomp reproduces the byte-identical error; GREEN without it produces a real 222 KB object.
  • Both workflow files are byte-identical to current ggml-org master; -x provenance and upstream authorship preserved.

This PR is itself the verification gate: pull_request evaluates workflows from the merge commit, so the new build-wasm.yml (absent from master, hence undispatchable) runs here alongside the trimmed CI (webgpu). GREEN = CI (webgpu)'s 3 jobs (format/macos/ubuntu) + CI (wasm)'s ubuntu-webgpu.

Tracker: llama.cpp-46ct.

🤖 Generated with Claude Code

https://claude.ai/code/session_012PWqLcXa9SZoxz6TffBbLw

* Fix emscripten compilation with openmp

* Separate wasm job to its own workflow

* Add flags necessary for newer emsdk

* Just disable openmp

* Update triggers

(cherry picked from commit 7cdd557)

Fork note (llama.cpp-46ct): this is upstream ggml-org's own fix for the
exact failure our master CI hit, adopted verbatim rather than invented.

`CI (webgpu)`'s ubuntu-wasm job has been red since the 2026-07-15 push
with, on ggml/src/ggml-quants.c under emcc:

    error: common symbols are not yet implemented for Wasm:
    .gomp_critical_user_.reduction.var

Cause is toolchain drift, not a fork commit: the job runs
`./emsdk install latest`, a floating pointer. Bisected from the run logs
of this repo -- emsdk 6.0.2 green (run 29059881795, 2026-07-10),
6.0.3 red (run 29440423694, 2026-07-15), 6.0.6 red (run 31290170215,
2026-08-09). No fork commit in that window touches ggml-quants.c, OpenMP,
or the workflow.

Reproduced locally with emsdk 6.0.6 and the failing job's exact compile
line: byte-identical error with `-DGGML_USE_OPENMP -fopenmp=libomp`,
clean object file without them -- which is precisely what this commit's
`-DGGML_OPENMP=OFF` produces (ggml/src/CMakeLists.txt:230-245 gates both
the define and the OpenMP link on GGML_OPENMP).

Upstream deliberately did NOT pin emsdk; they disabled OpenMP for the
wasm build and moved the job into its own `CI (wasm)` workflow. Pinning
was considered and rejected here for the same reason: the emscripten
limitation is real, so a pin would freeze the toolchain indefinitely
around it.

Verification note: after this change `CI (webgpu)` no longer has a
ubuntu-wasm job -- the wasm build lives in the new `CI (wasm)` workflow
as job `ubuntu-webgpu`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012PWqLcXa9SZoxz6TffBbLw
@github-actions github-actions Bot added the devops label Aug 9, 2026
@kainlan
kainlan merged commit 7aae2c0 into master Aug 9, 2026
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants