windows: fix native MSVC/Vulkan build portability - #640
Conversation
a5e31c8 to
45550dc
Compare
localai-org-maint-bot
left a comment
There was a problem hiding this comment.
This portability PR is not reviewable as a merge candidate while its own portability and build gates are red. The current head fails windows-msvc-cpu, windows-msvc-vulkan, both Linux build-test jobs, Vulkan verification, both sanitizer jobs, commit-protocol-tag, agent-record, device-leakage, and documentation-checkpoint. Please rebase onto current main, add the required FOLLOWING_AGENTS_PROTOCOL trailer to every PR commit, and push a head where the intended MSVC/Vulkan fixes pass their target jobs. After that, the large mechanical compatibility diff can be reviewed against a meaningful green signal.
|
Thanks for tackling this, and welcome — the Windows arm being red on every PR is a real problem and the centralising instinct here is the right one. Four hand-rolled I have to be straight with you though: as it stands this PR does not turn the Windows jobs green, and it breaks the Linux build in two places. Details below so you can judge what to keep. The Windows jobs go redder, not greenerBoth die in The current baseline red is three errors, all The two new ones are your Important, and not your fault: the reason your native Windows validation passed while CI fails is that your host build never runs this gate. And separately — even a perfect version of this PR could not have turned Two Linux breaks, both reproduced locally1. 2. Missing include. Three hunks I'd drop
Also inert: the What I'd keepThe SequencingThere are four other Windows PRs in flight and this collides with them. #524 hard-conflicts — you both edit My suggestion: let #677 and #584 land, then bring this back split into (a) the shared One housekeeping note, and a normal thing for a first contribution: commits need a bare |
c6b9e7d to
42f0434
Compare
Make the native Windows MSVC/Vulkan path buildable by centralizing the missing portability shims and fixing the packaging/link seams that block the shared library and test binaries. This commit introduces the shared platform helpers, ports the Windows-facing callsites that needed them, and wires the Windows shared-library / Vulkan loader path so the existing CI lanes can exercise it. Later follow-up commits tighten the scope after review. Issue: mudler#503 Identity: ENG-RELEASE-WINDOWS FOLLOWING_AGENTS_PROTOCOL Following-Agents-Protocol: true AI-Assisted: true Assisted-by: AGENT:GPT-5 [Codex]
Tighten the native Windows portability patch to the pieces the review validated. - keep the shared portability layer but remove the checker-hostile win32 CRT includes - drop the /WX downgrade, dead F16C target macro, test force-include hook, and nvfp4 cache rewrite - restore the Linux-clean Vulkan loader shape and add the missing explicit include in test_kv_offload_tiering - preserve the packaging/link fixes and the CreateEvent macro collision guard check-windows-portability.py now reports only the pre-existing video_engine.cpp baseline errors. Issue: mudler#503 Identity: ENG-RELEASE-WINDOWS FOLLOWING_AGENTS_PROTOCOL Following-Agents-Protocol: true AI-Assisted: true Assisted-by: AGENT:GPT-5 [Codex]
42f0434 to
15aa963
Compare
…the C++ compile (#774) (#795) Closes #774. `check-windows-portability.py:1710` asserted the MSVC warning policy with a SUBSTRING test: `if not all(token in warnings for token in ("/W4", "/WX"))`. `"/WX" in "/WX-"` is True, and `/WX-` is MSVC's spelling for DISABLE warnings-as-errors -- so the gate was blind to its own inversion. Measured against PR #640 commit 74ba382, which shipped exactly that: `/WX-` on the CXX arm, with the only bare `/WX` left on $<COMPILE_LANGUAGE:OBJCXX> -- Objective-C++, the Metal backend, which never compiles under MSVC. The checker passed it. Two further blindnesses fell out of the same `in`, both found while scoping and neither in the issue: `/W44996` answers for `/W4`, and CMakeLists.txt:30's `#` comment contains the literal `/W4 /WX`, satisfying the entire policy on its own -- deleting every real flag would still have passed. The repair is a token-boundary match evaluated over flags reduced to what can reach an MSVC C/C++ TU (comments stripped, genexes naming only non-C/C++ languages blanked in place), plus refusal of the negating spellings `/WX-`, `/W0`, `/w`. Sibling evasions argued OUT in the spec rather than silently swept in: COMPILE_WARNING_AS_ERROR OFF (CMake only uses it to decide whether IT adds a flag; it does not remove a literal /WX from target_compile_options) and blanket /wd#### (narrows what /W4 reports, does not invert it; "how many is too many" is an undecided threshold). `/W0` and `/w` are IN because they are the disable spellings of /W4 itself. RED before, same test file against base and head checkers: 6 failed, 1 passed E AssertionError: 0 == 0 : Windows portability contract OK That message is the finding -- the gate reporting "contract OK" on a tree whose C++ arm says /WX-. The single base pass is the inverse pin, so the fix is not merely stricter about everything. GREEN after: 7 passed, 9 subtests. Also carries a repair it did not cause: tests/scripts/test_check_windows_ portability.py has been RED on main since e8a9e74 (#680's stale mutation anchor -- the mutation targets the first `$calls.Add(` in the file, which since #512/#583 lives in a different function). check-pr-size's evidence contract runs the whole recognized module and requires it green at HEAD, so nothing could land in that file until this was fixed. The mutation is now anchored to the governed occurrence with uniqueness asserted; #680 stays open for its other half. Full tests/scripts: 8 failed / 1368 passed, all eight reproduced BY NAME on a pristine origin/main worktree. CI: merged with checks still queued -- the runner pool has been saturated for hours and no job started on this head. Every gate runnable locally is green, including check-pr-size's own re-execution of the base-red/head-green evidence in an isolated worktree, which is the authoritative form of that proof.
|
Re-reviewed against current
Two things are left, and they are packaging rather than code. 1.
|
This PR makes the native Windows MSVC + Vulkan build path link and test cleanly enough to use the existing Windows CI lanes.
What changed:
/WHOLEARCHIVEhandling and explicitblake3_vendoredlinkagedlopenassumptionsWhy:
Validation: