Windows lane: what to send upstream, and in what shape#
The Windows counterpart to
upstreamable-patches.md, which covers the Linux
chain. Same grading scale, same rule: a patch is written against one revision
and nothing else, so re-diff against the branch you intend to target before
filing.
Written 2026-09-02. Every entry marked prepared has a ready-to-send patch and
PR description under windows/upstream/;
none of them has been posted.
grade |
meaning |
|---|---|
A |
Genuine upstream defect, our fix is already in the shape upstream wants. File it. |
B |
Genuine upstream defect, but a maintainer has a design call to make first. |
C |
Deliberate local deviation. Do not file — it would be wrong for upstream. |
✔ |
Upstream already fixed it. We carry the workaround because our pin predates the fix; the action is a version bump, not a PR. |
Where a local change lives is one of three places, and the distinction matters
when you go to regenerate a patch — see
windows/scripts/patches/README.md for
why each fix is in the form it is:
a static
.patchunderwindows/scripts/patches/<component>/an inline guarded edit in a
Build-*.ps1scripta whole-file asset staged over the upstream one
Prepared and ready to send (12)#
Full descriptions in windows/upstream/.
# |
Upstream |
Branch |
What |
Local form |
Grade |
|---|---|---|---|---|---|
1 |
onnxruntime |
|
|
|
A |
2 |
onnxruntime |
|
|
|
B |
3 |
opencv |
|
MLAS forces |
|
A |
4 |
opencv |
|
|
inline, |
A |
5 |
opencv |
|
|
part of |
A |
6 |
opencv |
|
NEON dotprod/fp16 probes reject clang-cl |
inline, |
B |
7 |
opencv_contrib |
|
cudev uses |
|
A |
8 |
gstreamer |
|
|
inline, |
A |
9 |
gstreamer |
|
Vulkan lib dir chosen from |
inline, |
A |
10 |
gstreamer |
|
mediafoundation lacks the |
inline, |
A |
11 |
iree |
|
|
inline, |
A |
12 |
iree |
|
s8s4s32 i8mm tile defined |
inline, |
A |
Branch is not a detail for OpenCV. A defect that exists on 4.x is fixed
there and merged forward; 5.x is right only when the code does not exist on
4.x. Entries 5 and 6 are on 4.x because both files carry the identical
defect there. Entries 3 and 4 are on 5.x because 3rdparty/mlas/ is 404 on
4.x, and entry 7 because 4.x’s cudev has no CV_CUDEV_MAKE_VEC_INST(ulong)
at all. All checked 2026-09-02. OpenCV’s PR template also asks automated agents
to end the title with 🤖🤖🤖 — opencv_contrib’s does not.
Entry 7 sends only the ulong declaration. Our local patch also adds
longlong/ulonglong vector traits for LLP64 64-bit elements; that is an
extension, not a fix for something upstream’s own code breaks on, so it stays
local and is offered as a follow-up in the PR body.
Superseded before filing — someone else got there first#
Both were prepared, then found to duplicate an open upstream PR. The artefacts are kept because they date the local patch and say when it can be retired.
Upstream |
Ours |
Theirs |
|---|---|---|
onnxruntime |
DML: |
#29741 carries byte-identical hunks, down to the two spaces realigning the |
onnxruntime |
DML: |
#29741, same seven special members declared and defined out of line, for the same stated reason |
#29741 — “Support
building ONNX runtime with clang on Windows for Windows ML” — was opened
2026-07-16 from microsoft:adrastogi/clang-windows and is still open, last
touched 2026-07-23. It does not touch softmax.cc or
core/framework/tunable.h, so entries 1 and 2 above are unaffected. If it goes
stale, the useful move is a comment confirming an independent reproduction, not
a competing PR. When it merges, drop the matching hunks from
onnxruntime/003-dml-clangcl-compat.patch.
Already filed#
Upstream |
Item |
Status (checked 2026-09-18) |
|---|---|---|
llvm/llvm-project |
#219275 count the async-EH nop after an |
PR merged 2026-09-16 ( |
llvm/llvm-project |
#219276 report SEH pseudos as zero-size |
PR open — |
llvm/llvm-project |
#219200 missing |
PR merged 2026-09-04; the |
microsoft/hcsshim |
#2855 configurable teardown timeouts |
PR open — package in |
google-ai-edge/LiteRT-LM |
#3245 the CMake lane is stale vs bazel |
issue open — covers the ~30 inline LiteRT-LM edits |
mozilla/sccache |
#2808 nvcc deadlock and miscompile |
issue closed; fixed by #2722/#2811/#2816 — all three ship in the 0.18.0 release (2026-09-14). The Windows lane moved to that released zip on 2026-09-18, so the |
opencv/opencv |
#29788 dnn/ORT |
issue closed — see the next section |
✔ Upstream already fixed it — retire on a version bump#
Local change |
Upstream fix |
|---|---|
|
Fixed on |
gst-libav |
Fixed upstream; see |
B — genuine, but not ready to send#
Upstream |
What |
Why not yet |
|---|---|---|
opencv |
videoio does not build against FFmpeg 8/9 ( |
Upstream fixed this on |
opencv |
MLAS’s vendored kernels are GAS/ELF-only, and clang-cl is a working GAS assembler, so |
|
opencv |
CUDA with a clang-cl host compiler is refused outright, and |
The rest of |
iree |
|
Needs a decision on which variable should name the assembler ( |
iree |
|
Draft: |
gstreamer |
|
|
graphene |
|
Different project ( |
moby/buildkit |
WCOW cache mounts lose writes into an inherited directory |
Draft: |
meson |
|
Draft: |
opencv |
softfloat/NEON on Windows ARM64 |
Draft: |
Not graded yet — local changes added after 2026-09-02#
Found missing from this register on 2026-09-25. The Hailo four are applied .patch-first with an
inline fallback. The grades are the owner’s call.
Local change |
What it fixes |
Applied by |
|---|---|---|
|
|
|
|
The two |
|
|
The Windows |
|
|
|
|
|
|
|
|
GenAI v0.17.0 names experimental typedefs ORT v1.31.0 removed; it takes the model-package entries from the stable |
|
C — never file these#
They are correct for this build and wrong for everyone else.
Local change |
Why it is local-only |
|---|---|
|
Turns FFmpeg’s |
|
Whole-file replacement of FFmpeg’s |
|
Comments out |
|
Emits the XQA host stub unconditionally. Correct only because this build pins |
ORT |
A byte-filter and a floating ExternalProject SHA. Neither is expressible as an upstream diff. |
MSVC STL |
Patches an installed MSVC toolset header, not any upstream repo. |
opencv CMP0146/CMP0148 |
A local policy choice. Upstream has its own migration to make. |
opencv |
A hack that dodges a NEON |
gstreamer |
A tree-wide replace across every |
LiteRT-LM’s ~30 CMake/source edits |
They target ExternalProject-fetched trees whose tags float. Reported as issue #3245 instead. |
Before filing anything#
The 2026-08-24 lesson, in three commands. opencv#29788 reported a defect upstream had fixed 69 days earlier; it cost a maintainer a triage cycle, and it is why this section exists.
# 1. Is the defect still on the branch you are targeting? Not the tag we pin -
# the DEVELOPMENT branch, and EVERY active release branch. For OpenCV a
# defect present on 4.x must be fixed on 4.x, not 5.x.
curl -fsSL https://raw.githubusercontent.com/<org>/<repo>/<branch>/<path>
# 2. Has somebody already sent it?
gh search prs --repo <org>/<repo> --state open '<symbol>'
gh api "repos/<org>/<repo>/commits?path=<file>&sha=<branch>"
# GStreamer lives on GitLab and `gh` cannot see it:
curl -fsSL "https://gitlab.freedesktop.org/api/v4/projects/gstreamer%2Fgstreamer/merge_requests?state=opened&search=<term>"
# 3. Does the patch still apply?
git apply --check -p1 --ignore-whitespace <the .patch>
Step 2 is not optional, and a file-name search is not enough. Two of the
fourteen submissions prepared on 2026-09-02 turned out to duplicate
onnxruntime#29741 — an open PR from a Microsoft contributor whose hunks are
byte-identical to ours. It was found by searching for a symbol
(AbstractOperatorDesc), not for the file path. Search for the identifier the
fix touches.
If it turns out to be fixed already, the finding is “our pin predates the fix” — a row in the ✔ table above and a version bump, not an issue.
windows/scripts/tests/Test-PatchesApplyClean.ps1 runs step 3 for the whole
static-patch catalogue without a container rebuild.