Windows build resources — CPU, memory, cache and GPU#
How much of the host a Windows container build may take, the measured ceilings, and how the compile cache is wired. Measurements belong to the host and software used for that run. Re-measure after a host, GPU or driver change; the dated goal probe below does not replace the earlier reference-host measurements.
Neighbours: the lanes themselves are
windows-build-lanes.md; consumer-project build
performance (container reuse, transports, Dev Drive) is
windows-container-build-performance.md;
Linux-side job counts are
build-parallelism-memory-tuning.md.
Vendor-specific DirectML adapters#
Native Windows consumers can compile dxgi_adapter.c
and link dxgi.lib to choose a physical DXGI adapter for a PCI vendor. The selector
prefers the largest dedicated video memory, keeps the first index on ties, and fails
if enumeration is incomplete. Use it only for a vendor-specific default; preserve
explicit user indices and vendor-neutral selection. Enumeration does not demonstrate
DirectML inference, and device changes can invalidate an index after enumeration.
The linked README gives the C ABI, test command and 32-adapter limit.
GPU acceleration in containers (DirectML on the host GPU)#
On Windows, Microsoft documents GPU acceleration in containers as DirectX-only — Direct3D 12 and
everything layered on it, which includes DirectML (the ONNX DmlExecutionProvider
and onnxruntime-genai’s DML path). CUDA/TensorRT cannot be GPU-accelerated in a
Windows container through that device interface. The earlier reference-host
measurements below used an AMD Radeon RX 9070 XT and its iGPU.
Goal-host probe, 2026-11-08: native CUDA driver initialization succeeds on one NVIDIA GeForce RTX 2080, SM 7.5, driver API 13.5. Display enumeration reports no AMD adapter. This proves driver initialization and discovery only. CUDA/TensorRT plugin registration and inference still need native Windows checks against the built payload; ROCm hardware execution still needs a suitable AMD host. A container file-contract smoke does not supply those runtime proofs.
Running DirectML on the physical GPU inside a container requires all of:
Process isolation — Hyper-V-isolated containers get no GPU. (The default isolation on this host is
hyperv, so you must pass--isolation process.)The DirectX GPU device, attached with the exact device interface class GUID:
--device class/5B45201D-F2F2-4F3B-85BB-30FF1F953599. A wrong variant is silently accepted bydocker runbut matches no device, so the container falls back to the WARP software renderer with no error.A supported base image and compatible host/image builds. Microsoft’s linked prerequisites require
mcr.microsoft.com/windows:1809or newer and exclude Server Core and Nano Server. Matching build numbers alone do not establish GPU support. In the earlier26200host /26100Server Core experiment, basic process isolation worked, but GPU driver-store injection failed athcs::CreateComputeSystemwith “The system cannot find the path specified”.
Earlier AMD reference-host result: BLOCKED by the build skew. The GPUs were GPU-PV
partitionable (Get-VMHostPartitionableGpu lists both AMD adapters), process
isolation worked, and the DirectML runtime was built — but GPU device assignment
failed at CreateComputeSystem because the ltsc2025 (26100) base did not match
the host (26200). The probe found no matching public client base at the time.
DXGI enumeration inside the container saw only Microsoft Basic Render Driver
(WARP), zero hardware adapters. This historical result is not a current passthrough
test on the RTX host.
To investigate the block, use a supported Windows base and a compatible host/image pair, then repeat the actual device-assignment and adapter probe. A custom-base experiment still needs those observations and inference on the selected hardware provider; an OS-build match alone proves neither support nor GPU execution. Native Windows execution is the separate path for checking the source-built ORT / GenAI binaries on the physical adapter; require actual inference on the selected provider before claiming hardware use.
Re-check after any Docker / containerd / hcsshim / Windows / base-image / GPU-driver
upgrade with the self-contained probe under windows/scripts/diagnostics/:
.\windows\scripts\diagnostics\Test-GpuPassthrough.ps1
It prints host/image builds and partitionable GPUs, runs a process-isolation control,
attaches the GPU device, compiles + runs a DXGI adapter enumerator inside the
container, and gives a verdict: PASSTHROUGH WORKS (a HARDWARE adapter is visible),
BLOCKED (build-skew CreateComputeSystem failure), or DEVICE-NOT-INJECTED
(started but only WARP). Note the DML probes in Test-Container.ps1 validate
that the provider is built and registered (GetAvailableProviders → dml=1 natively,
get_available_providers() / onnxruntime_genai.is_dml_available() in the base
interpreter and the app venv, plus the x64 D3D12Core.dll PE-machine check); they do
not create a device, so they
pass under either isolation regardless of whether a hardware adapter is present.
Media fan-out and memory budgeting#
Media scheduling is sequential (one log per solve —
logs\windows-build-logs\bk-<runid>-<stage>.log, one per media-core library, one
per aux branch, one for the merge). Sequential gives media-core the whole host
RAM budget — and since its parallelism is memory-bound, more RAM = more ONNX jobs,
which matters more than overlapping the small aux branches (a former
-ConcurrentMedia overlap mode was removed for exactly that reason).
-MediaMemoryGb auto-detects from host RAM (default 0 = auto). It resolves
to usable_physical_GB − HostReserveGb. -HostReserveGb (default 22 — see the
learned-the-hard-way note below) is the RAM left for Windows + dockerd + Defender;
lower it to push closer to the metal (riskier — under memory pressure the hcsshim
ttrpc wedge is more likely). Pass an explicit -MediaMemoryGb N to override
auto-detection. The budget is published to the sccache WebDAV endpoint
(preseed/memory-limit-gb.txt; as an ARG or ENV it would be a cache key, #51), and
Get-BuildJobCount scales each build’s job count to it (a MEMORY_LIMIT_GB in the
environment wins, host RAM is the fallback, and BUILD_JOBS overrides the heuristic
outright).
Worked example (this 64 GB host, Windows reports 61.4 GB usable → floor 61,
default -HostReserveGb 22): auto -MediaMemoryGb = 61 − 22 = 39 g →
ONNX runs ~j10 (mem/4, cores=32).
media-core, toolchain and the merge/GStreamer stage all solve process-isolated
with every host CPU (see windows-build-lanes.md § Build isolation and CPU parallelism); the run+commit
path and its -MediaCoreCpus flag went with build.ps1 on 2026-08-31. The
litert/tvm aux branches get the whole budget once media-core is done — halved per
child under -ConcurrentAux, which overlaps only those two.
The 20 GB RUN scratch#
Each RUN writes to a sandbox of about 20 GB, however much the host has free
(measured 2026-11-06 on bk-windows-toolchain: 19.8 GB free, a 25 GB file fails
with There is not enough space on the disk). A BuildKit cache mount is a separate
snapshot without that cap: the same probe wrote 25 GB into one.
A step that outgrows the sandbox fails with No space left on device while the
host still has tens of GB. IREE did, with LLVM in its tree: after the ninja build
and install the compiler wheel found 0.3 GB. Its build tree therefore lives on the
media-tvm RUN’s iree-build-winamd64 cache mount at C:\iree-build, which
Build-IreeFromSource.ps1 uses whenever it exists; a checkout run without it keeps
the tree under the source directory. The script empties the mount before configure,
so no earlier run’s tree reaches CMake, and again after the wheels, so the host gets
the space back. SourceBuild.IreeScratch.Tests.ps1 holds the path on both sides and
both resets.
Extracted QNN SDK scratch#
Resolve-QnnSdk verifies the SDK archive, extracts it under
TEMP_DIR/qnn-sdk-extract and stages selected backend DLLs and Hexagon payloads
into each component’s runtime tree. The default extraction also contains other
platforms, including Android libraries. It is not an exported SDK contract.
Clear-BuildScratch, called by the source-chain epilogue with -ScrubAfter,
removes that one extraction tree after the selected components finish. The SDK
archive cache, compiler-cache mounts, copied runtime and TEMP_DIR/cpython remain.
A relative temporary root, reparse metadata on the parent or leaf, removal error
or remaining tree stops the build before export; ordinary profile-cache cleanup
retains its best-effort policy. The host disk-reclaim tool does not perform this
in-container cleanup.
On 2026-11-13 the 0a822337 ROCm producer completed TVM, IREE, native/Python
smokes and both IREE free-threaded imports, then exhausted host storage while
the Windows importer copied an unused lib-safe/aarch64-android member from
this extraction. Its first import failed with 0x5; the retries also recorded
disk-full and 0x20. This proves an unwanted export payload, not that every
import error has the same cause. SourceBuild.Scratch.Tests.ps1 uses private
file trees and failure fixtures; the reduced real image export must still pass.
Building a project inside the image, as AGENTS.md carried it#
Moved out of AGENTS.md on 2026-09-15 (owner decision D10), unedited except for this heading and the relative links. The RULES stayed there; this is the reference behind them.
Consumers building large projects in this image should read
docs/windows-container-build-performance.md
before hand-rolling anything. The number that motivates it, measured on a
~690-object C++23 modules project: 9.6 s ninja / 44 s wall for a no-change
incremental build against a reused container, versus 352-484 s when every
build got a fresh one.
The rule that follows: reuse ONE container, recreating it only when the image ID changes; stream sources in and executables/logs out, never the intermediate build tree. Transport choice, the Dev Drive filter setup, and the four traps that cost measurable time (bind mount slower behind a filesystem filter, sccache unsafe on clang-cl C++20/23 modules before 0.19.0 (mozilla/sccache#2876), a named volume unusable as a CMake build dir, deep paths aborting tar transfers) are all in that page.
Maximum resource envelope (verified 2026-07-12)#
The defaults ARE the maximum for this 64 GB / 32-thread host — there is no faster configuration to unlock, and the full-chain rebuild of 2026-07-12 (base → sdk → toolchain → media → final, phase-tagged resource CSV) is the proof:
Phase |
Minutes |
AvgCpuPct |
MaxCpuPct |
MinFreeGB |
|---|---|---|---|---|
media-core |
111 |
37 |
100 |
0.2 |
media-litert |
18 |
38 |
100 |
24.9 |
media-tvm |
~25 |
42 |
100 |
41.8 |
CPUs: 32/32 on every heavy stage. That chain took them from the classic lane’s
docker run --cpu-count 32+ commit, the only >2-CPU path there (docker buildwas pinned at 2 CPUs by the host defect — hence its cheap COPY/clone-only layers); the BK lane gets all CPUs from process isolation.RAM: 39 GB is the measured optimum, not a conservative default. During media-core the host bottomed out at 0.2 GB free — the 22 GB reserve was consumed almost exactly. Raising
-MediaMemoryGb(or cutting-HostReserveGb) does not add jobs fast enough to beat the starvation cliff: the 53 GB experiment deadlocked media-core at 0 % CPU (see the hard-way note below).Average CPU of ~35–45 % during compiles is CORRECT and expected — it is the memory-bound signature (
jobs = min(32, 39 GB / ~4 GB-per-ONNX-job) ≈ 10), not a tuning failure. Do not chase 100 % average CPU on this host.The only real “go faster” levers are infrastructural: ~128 GB RAM (true
j32on ONNX), or a populated sccache remote (-SccacheEndpoint/SCCACHE_WEBDAV_ENDPOINT) to make rebuilds warm — cold full-chain is ~5–6 h with ~2.5 h of that in the media fan-out.
Per-run resource log. Every Build-Buildkit.ps1 run samples host CPU / free
RAM / commit charge / container-VM (vmmem) size every 20 s into
logs\windows-build-logs\resources-<timestamp>.csv, tagged with the current build
phase — the BK stage label (Dockerfile.media-builder:media-core-built-onnx),
plus init and done — and prints a per-phase exhaustion summary at the end,
including on failure. The sampler starts only after every preflight gate has
passed, so a rejected launch leaves nothing orphaned, and -ConcurrentAux
children run without one (the parent’s already covers the machine). Re-analyze any
run later with
pwsh -File windows/scripts/build/Build-ResourceSampler.ps1 -Summarize -CsvPath <csv>;
MinFreeGB per phase shows which step pushed the host hardest, and an
AvgCpuPct far below 100 during a compile phase means the step was memory-bound
(jobs = min(cores, MEMORY_LIMIT_GB/perJob)), not CPU-bound. Disable with
-NoResourceLog. Since 2026-10-12 each row also carries diskFreeGB for the build drive, and
the summary its per-phase minimum (MinDiskFreeGB): export and unpack slow down as it nears a
stage’s disk floor.
Per-run record. In logs\windows-build-logs\ beside the stage logs, every run
writes bk-<run>-driver.log: the run, each
stage’s start, end and failure, every retry verdict with the line that made it transient, and
every disk-gate verdict, none of which a stage log holds. bk-<run>-manifest.txt carries
status=ok, or status=failed:<stage> with every stage that finished, so a stopped run keeps its
stage seconds too (hub #184).
Why the reserve is 22 GB, not ~8 (learned the hard way). An earlier default of
-HostReserveGb 8auto-sized media-core to 53 GB, which hung the build: during a GPU build dockerd + containerd juggling the ~50 GB CUDA image layers, plussvchost/Defender, hold ~16–18 GB steady — so 53 GB container + ~17 GB host exceeded the 61 GB physical, the Hyper-V VM starved at ~43 GB, and media-core deadlocked at 0 % CPU with the host at 0.3 GB free (log frozen mid-ONNX for 2 h). The--memorycap is real RAM committed to the utility VM, socontainer_cap + host_footprintmust fit physical RAM with margin. 22 GB reserve (→ ~39 GB container, ~56 GB peak) is the verified-safe budget here. The heavy CUDA TUs (FlashAttention, MoE kernels) use more than the ~4 GB/job estimate, so do not shrink the reserve without watchingdocker stats+ host free RAM.
TVM-FFI wheel versions in tagless checkouts#
The Windows TVM source builder uses Get-TvmFfiSourceVersion for native and
cross wheels: normalize the vendored submodule’s nearest release tag, or use
TVM’s apache-tvm-ffi>= bound when tags are unavailable. The native GIL install
and free-threaded build each set only
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_APACHE_TVM_FFI for that call. The shared
process-environment helper restores a previous value, including after failure;
TVM’s separate SCM version remains untouched.
The 6235d8b4 ROCm producer exposed the defect on 2026-11-13: the exact pinned
FFI commit daf594da8e6950fdc02ae35fcf4e0ab2e59a4979, which upstream tags
v0.1.14-post0, built as
0.1.dev1+gdaf594da8 without local tags. TVM imported, but pip still reported
that version below apache-tvm-ffi>=0.1.14.post0. This correction changes the
metadata version, not the source pin or ABI. The actual pinned SCM provider in
an isolated tagless checkout reproduces both the bad default and the scoped
0.1.14.post0 result.
After each native build, Assert-TvmFfiPackageVersion reads the real installed
GIL distribution or the saved twin archive with importlib.metadata. Missing,
multiple, foreign or differently versioned metadata fails. A legitimately
unselected twin retains the existing skip policy. The gate proves the selected
metadata version; it does not resolve all dependencies, prove ABI compatibility,
run the module or demonstrate GPU inference. Existing import, architecture and
hardware gates remain separate. Regression and mutation checks use real
installed metadata and ZIPs without compiling TVM. The suite uses the shared
harness and case-scoped temporary directories: Linux mutation shards do not
install Pester, so Pester-only setup/teardown would invalidate those recipes.
Corrected product images still require their own build receipts.
The Windows cache, tier by tier#
Moved out of AGENTS.md on 2026-09-15 with only this heading and the list marker
changed; corrected since where the code moved (2026-09-18, 2026-09-25). The
rule – assume nothing from the Linux chain, preserve the layer ordering and the
per-file module closures, check the reserve before blaming a cache key – stays
there; the tiers, the numbers and the two incidents are here.
The WINDOWS chain caches differently — do not assume rules 1-4 apply.
It relies on (a) deliberate layer ORDERING — Install-Vs.ps1 sits ABOVE the
versions.env COPY in Dockerfile.base so a pin bump cannot re-pay VS
Build Tools (confirmed live 2026-08-08: 4 of 16 base steps CACHED through a
PYTHON_VERSION bump, and they were the expensive ones), (b) TIERED, PER-FILE
in-container module closures so a host-only module edit re-keys only the RUNs
that import it, (c) sccache, and (d) buildkitd’s GC reserve. Preserve
(a) and (b) in any Dockerfile edit — moving a COPY above the VS layer, or
widening a module stage, costs hours per bump.
(b) has only actually been true since 2026-08-31.
Dockerfile.toolchain-builder’s patched-llvm RUN bind-mounted the WHOLE
windows/scripts/modules directory, and patched-llvm is the DEFAULT
toolchain target (-StockLlvm is the opt-out), so any .psm1 edit re-keyed
the LLVM 23.1.0 compile and every media lane derived from that image. It is a
six-file mount now, and BuildKit.ModuleClosure.Tests.ps1 fails a whole-dir
modules mount in any windows Dockerfile except Dockerfile.probe (exempt by
design — PROBE_NONCE busts its layer anyway).
(d) is the one that fails SILENTLY and looks like a Dockerfile problem.
reservedSpace in windows/buildkitd.toml is the only floor GC will not
prune below, and it must exceed the fresh chain spine (~120–150 GB: base
incl. VS + sdk + toolchain + branch images). Set below that, the ~37 GB
VS-class layer is evicted between driver runs and every run re-solves the
prefix — #9 RUN Install-Vs.ps1 re-executing for 4–7 min while #8, the COPY
of that very script, reports CACHED. It has happened twice (2026-08-11,
2026-08-26). Before blaming a cache key, check the reserve against
buildctl du’s Total and against the store size: Reclaimable: 0B is not
“nothing to clean”, it is what a store already pruned to its floor looks
like. maxUsedSpace below the working-set size has the same effect, because
it forces eviction regardless of what the reserve says.
The module tiers (#134, 2026-08-26; toolchain narrowed 2026-08-31) — check which one a module is in before editing it, because the cost differs by hours:
Dockerfile.media-builder’sbuildmodssix (SourceBuild.Common + Shared, Patches, Cuda, Native.Common, TargetArch.Common). They ARE the import closure — SourceBuild.Common imports the other five and every mounted build script imports it — so the set cannot be shrunk and every media/merge RUN keys on all six. A one-line edit costs a full media rebuild on both lanes.tvmmods(FROM buildmods AS tvmmods+WindowsTvm.Common.psm1), mounted bymedia-tvm-builtalone. That branch runs parallel to media-core, so an edit costs nothing on the long pole.Write-AssembledWheelDistInfoandGet-PyprojectDependenciesmoved off the tier-1 facade into this leaf on 2026-08-31 —Build-TvmFromSource.ps1is their only caller.The merge leaves in
Dockerfile.media-merge-builder’sbuildmods:WindowsGstPlugins.Common,WindowsMeson.Common(which imports the already-copiedWindowsTargetArch.CommonPE layout reader),WindowsRustToolchain.Common,WindowsInstaller.Common. An edit costs the GStreamer layer.Dockerfile.toolchain-builder’spatched-llvmRUN mounts the same six as tier 1, per-file. It is the DEFAULT toolchain target, so an edit re-pays the patched-LLVM compile AND every media lane below it — the most expensive tier in the chain.WindowsOrtProvenance.Build.psm1(the ORT gate G2, 2026-09-23) is a per-file mount atC:\bkmnt\ortmods\in the five ORT-consumer RUNs: FFmpeg, OpenCV and the GenAI tail inDockerfile.media-builder, GStreamer in the merge, and the AMD GPU EP inDockerfile.rocm-migraphx. An edit re-runs media-core from FFmpeg on (each stage builds FROM the one before), the merge and the AMD GPU EP, never ONNX.SourceBuild.OrtChainOnly.Tests.ps1holds the mount shape.
Do NOT move a helper into WindowsSourceBuild.Common because “that is where
helpers go” — if one branch is its only consumer, it belongs in a leaf.
BuildKit.ModuleClosure.Tests.ps1 enforces both directions (a mounted
script’s transitive closure must be mounted; leaves must stay out of
buildmods, and tvmmods must keep exactly one consumer). It is
mutation-proven — trust it over reading the Dockerfile.
Wired, with the rules an agent must not break. Full rationale,
measurements and decision history:
docs/windows-build-resources.md
§ Persistent compile cache (sccache).
sccache runs WebDAV-remote-only since 2026-08-16.
SCCACHE_MULTILEVEL_CHAINis an ARG with no default in every compiling stage, never an ENV (§ What the published image carries); unset means WebDAV only. Restoredisk,webdavper run with-BuildArg SCCACHE_MULTILEVEL_CHAIN=disk,webdav, and only after re-verifying against a newer buildkit.SCCACHE_DIRalone does nothing without the chain variable.sccache is the pinned hub build
0.19.0+965c019.pr2809, installed intoCARGO_BINfrom the checksum-verified zip.SCCACHE_SOURCE_REVand the shared patch series select its source; the Windows stage does not compile sccache itself. History and the CUDA canary bar: § Persistent compile cache (sccache).CMAKE_CUDA_COMPILER_LAUNCHERis ON BY DEFAULT since 2026-08-18. Never flip that default off silently, and never export the launcher onto a new sccache without all THREE canaries — the miscompile it once caused is invisible until the DLL link.uv/pip wheel cache in
Dockerfile.torch, set INSIDE the RUN (anENVwould bake a build-only mount path into the shipped image).
Still NOT wired, with a measured reason: source-fetch mounts. The clones
are shallow (Invoke-GitClone passes --depth), so they cost minutes
against compiles that cost hours. If you do it, cache the ARCHIVES/CLONES
only, never the working tree — directory RENAMES fail on cache mounts and
Build-GstreamerFromSource.ps1 moves the extracted tree. Also raise the
tier-0 type==exec.cachemount cap in windows/buildkitd.toml — it is
shared by every cache mount plus local sources and git checkouts, and
the sccache L0 (15G) and uv cache (10G) already claim 25 GB of its 30 GB
reserve (the cap is 60 GB). Cache sizes and that cap are ONE decision, not
two. (Since 2026-08-16 the L0 mount
is attached but DORMANT — the chain defaults to WebDAV-only — so its 15G is
reserved rather than consumed. Do not repurpose that headroom: the tier is
meant to return, see #99.)
Persistent compile cache (sccache)#
The standalone OpenCV GStreamer plugin reports
Write-SccacheStats -Label 'opencv-gstreamer-plugin', then completes the server
before source cleanup. It preserves the preceding GStreamer log by leaving
session startup to the launcher. SourceBuild.OpencvPluginCache.Tests.ps1
checks unconditional wiring and order; fresh producer counters and retained
bytes are separate evidence.
Retained log transport: never use --no-cache to force a cache-log copy,
even when the mount is read-only. BuildKit 0.33’s
IgnoreCache handling
collects cache IDs and the worker resets their associations before execution.
Consume a unique per-run ARG in the copy command instead. On 2026-11-13 the
incorrect diagnostic export lost the original full server trace; the recovered
image build log and transcript do not replace that trace.
Current prefix evidence (ee49f2dd, 2026-11-13): all 11 ROCm images through
media merge passed. TVM reports 9,995 cumulative C/C++ hits with zero misses,
cache errors or compilation failures. GStreamer reports 4,892 C/C++ hits,
18 misses, 103 cache errors and 32 compilation failures; the latter causes
remain unclassified. Do not sum duplicate stats renderings or infer CUDA/Rust
hits from C/C++ counters. The new standalone-plugin instrumentation still needs
a producer run; the ordinary ROCm tail, final-source lanes and device checks
remain open.
Without BuildKit cache mounts a container-local sccache cache dies with the
layer, so the WebDAV remote is the only compile cache that survives a
container. sccache is therefore REQUIRED by default for the media stages:
Build-Buildkit.ps1 fails fast when a media stage is requested and no reachable
endpoint is configured (-NoSccache opts into a deliberate cache-less build). The
gate is media-only (Assert-SccacheEndpoint, $compileStages = @('media') in
WindowsBuildDriver.Common.psm1): the toolchain’s CPython build (MSBuild/ClangCL)
has no sccache wiring, and its default patched-llvm target uses the endpoint when
one is passed (#164) but compiles LLVM cold without it, so toolchain-only builds are
never blocked on an endpoint. One-time
host setup:
# one-time host setup (any WebDAV-capable server works; dufs is a single binary)
scoop install dufs
mkdir C:\sccache-cache
dufs C:\sccache-cache -A -p 5000
# then build with the endpoint (use an IP reachable from inside containers,
# e.g. the host's LAN IP — not localhost)
.\windows\Build-Buildkit.ps1 -Gpu -SccacheEndpoint http://192.168.1.10:5000
CMake-based builds (every configure through Invoke-CmakeConfigure: ONNX, GenAI,
OpenCV, LiteRT, LiteRT-LM, TVM, IREE, HailoRT, and on the rocm lane MIGraphX and
the AMD GPU EP) then route clang-cl through sccache. GStreamer (Meson) is cached since
2026-10-12 (#182): meson drops an sccache prefix in front of clang-cl, so the
'sccache clang-cl' of 2026-08-04 never reached a compile (16 requests for 5,143 ninja
steps). Build-GstreamerFromSource.ps1 now builds a clang-cl.exe shim that runs sccache on
the patched clang-cl, hands it to meson as CC/CXX, and fails the stage when sccache counted
fewer than 100 compile requests. FFmpeg (clang-cl +
make) is cached since 2026-08-20 (#100): the launcher goes in at make time
(make CC='sccache clang-cl'), never into configure’s --cc, and
FFMPEG_SCCACHE=0 opts out. gst-plugins-rs (cargo, phase 8b of the GStreamer build) does not
go through sccache. Measured 2026-10-16: 99 % Rust hits left the step at 131 s against 125 s
bare, because its two plugin crates are cdylibs
(windows-builds.md § gst-plugins-rs on Windows).
The first build populates the cache; subsequent --no-cache rebuilds and
version bumps reuse unchanged object files.
The host cache initializer and CMake build setup share one SCCACHE_MAX_JOBS
defaulting helper. Each caller keeps its own activation point and log message;
both preserve an explicit limit and fill an absent or empty value from the CPU count.
The standalone HailoRT stage starts the shared cache session before CMake, so
its nested protobuf compiles belong to the same session. After Ninja it asks
for advanced sccache-stats| counters on stderr and drains/stops the server
before success cleanup. This direct RUN has no media-chain epilogue. The
a7ba976b pass exported HailoRT without an aggregate snapshot; those missing
counters remain unknown. Regression and mutation wiring checks do not replace
a new producer receipt or establish Hailo device execution. CON229 stays open.
The pin is the hub build 0.19.0+965c019.pr2809. Its source is
SCCACHE_SOURCE_REV=965c01943a40c9df96264474bbe28ba98f2e1487 plus the shared
patch series. Install-RustToolchain.ps1 downloads the hub asset
sccache-v0.19.0-965c019-pr2809-x86_64-pc-windows-msvc.zip, verifies
SCCACHE_WINDOWS_ZIP_SHA256, and installs sccache.exe into CARGO_BIN ahead of
the scoop shims. The Windows image installs that binary rather than building it.
The shared source-build record owns the
patches, canary evidence and conditions for returning to upstream release assets.
Source-bound measurement, 2026-11-22: the private
79e41b6b814c5bab0e1e225bc3c754c2d804f8a3 canonical CUDA repeat completed
with raw exit zero, all six phases, five exports and full parent layer/diff-ID
prefixes. All 2,592 source files/modes and six compiler-cache identities were
unchanged afterward. Its ONNX primary point has 6,304 typed hits, including
605 NVCC hits, zero misses/cache/compiler failures, and 173 named CUDA-plugin
object lines. Keep its 605 non-cacheable internal compilations separate from
zero non-cacheable calls; their causes remain unclassified.
Other repeat points are separate: FFmpeg 2,361 C/C++ hits; OpenCV 3,665 hits, including 155 NVCC hits and one C++ miss; Hailo 246 C/C++ hits; GenAI 207 C/C++ hits. GenAI’s direct CUDA path, PyAV/NASM and unmeasured paths gain no coverage. Do not add primary points, typed subsets, L0/L1 figures or mirror rows. The original NVIDIA Media-Merge point has 4,896 hits, 18 misses, 102 cache errors and 32 failed compiler requests; those errors remain unclassified despite its successful export. The separate OpenCV GStreamer plugin point has one hit and zero misses/errors. Torch has no observed primary compiler counter.
The independent whole-repeat audit SHA256 is
d17b06b3db4f64c2f652f82681194382a65567f90fb72b1c007aab1d942f1b3b.
The later CPU retry independently records TVM 617 hits/zero misses and IREE
6,912 hits/30 successful misses, with zero cache/compiler errors at those
points. Its normal/FT wheels and imports, including 13 compiler and one runtime
FT extension with the GIL off, were checked before the successful TVM/IREE
export. The run then stopped before Media-Merge, so whole CPU acceptance is
still missing. Full stage/source receipts are indexed in
logs/g2-stage-coverage-current.md and logs/g5-results.md.
The primary upstream check on 2026-11-22 still reports issue 2862 open and
v0.19.0 as the latest stable release; the pin remains 0.19.0+965c019.pr2809.
These observations qualify their exact source and measured paths only. They
do not qualify the integration successor, other lanes, hosted CI, AMD/ARM64
hardware or registry promotion. The earlier d9 table retains its own source.
Upstream checked 2026-11-15: sccache#2862
is still open; its fix #2809 merged
on 2026-11-02. The pin carries that fix. The older bare-nvcc exemption for
onnxruntime_providers_cuda_llm is removed; reintroducing it would lose the cache
coverage already proved by the earlier NVIDIA chain. The sole upstream
comment explicitly lacks Windows verification; the local repeat below remains
a separate measurement, without inferring an upstream resolution.
Earlier ARM64 evidence boundary: CON229 in BACKLOG.md owns the dated
per-stage coverage gaps. The ARM64 goal run bk-20261108-231320 at 7c575e34
actually rebuilt GStreamer: one reported block contains 5,198 compiler-cache hits,
12 misses, 99 cache errors and 80 compilation failures. The RUN includes configure
probes; its aggregate counters do not identify every error’s cause and must not be
summed with their duplicate log rendering. GStreamer and the 1,508-binary media
architecture gate passed, then the final-stage disk guard refused 24.6 GiB versus
40 GiB. After selected host cleanup, full retry bk-20261109-081421 at the same
source passed in 3:08 with 152 smoke assertions, zero failures and 17 cross-lane
skips; its publish gate also passed. This reuse does not add compiler-cache
measurements or prove native ARM64 device acceptance. A CUDA-plugin repeat
requires actual compiler requests and hits; reused image layers provide neither.
The later d9 repeat is recorded below. Subsequent candidate device run 42579941215
passed 22/22, and its exact ARM64 image was promoted to :winarm64; the
cross-build guide records that digest and receipt.
This native ARM64 result does not supply the missing GPU-provider measurement.
In the subsequent local NVIDIA chain at the same source, the patched LLVM 23.1.5
RUN reported 4,233 compiler requests served by 4,233 WebDAV hits, zero misses,
zero cache errors and zero compilation failures. That is one observed stats
block, recorded separately from the later CUDA-plugin repeat proof below.
Measured NVIDIA attempt at 6737933a, 2026-11-09. The ONNX CUDA-plugin
compile/install and both wheels complete, then QNN builds and stages. TensorRT
stops before configuration because the old protobuf patch truncates a warning
block at a comment parenthesis. The required scope gate refuses the result.
The later text repair and native RC control do not turn that product attempt
into a pass; the complete chain, forced CUDA repeat and native GPU checks keep
their separate acceptance requirements.
Stage |
Cache evidence in this attempt |
Coverage limit |
|---|---|---|
base |
Reused layer; no fresh compiler counters |
Cargo/tool acquisition gaps stay in CON229 |
NVIDIA SDK |
Reused installer/runtime layers |
Acquisition is not compiler-cache proof |
toolchain CPython |
GIL 143 s, free-threaded 102 s; whole step 257 s |
No direct sccache mounts or measured hit rate |
patched LLVM |
One block: 4,233 C/C++ hits, 0 misses/errors |
This does not prove CUDA coverage |
media-core ONNX |
One block: 1,656 C/C++, 299 CUDA/nvcc and 616 CUBIN/ptxas hits; 3,733 misses |
Initial PTX/cudafe++ hits are not reported |
media-core QNN |
Build and staging pass |
Later RUN counters are cumulative, not independent QNN totals |
media-core TensorRT |
Refused before configuration |
No full plugin compile or cache result |
media-core FFmpeg/PyAV |
Not reached |
Codec/PyAV bypasses remain dated CON229 gaps |
media-core OpenCV |
Not reached |
CUDA launcher wiring alone is not a measurement |
media-core HailoRT |
Not reached |
No fresh compiler counters |
media-core GenAI |
Not reached |
Its CUDA/Rust coverage gaps remain open |
media-litert |
Not reached |
No fresh Bazel/sccache result |
media-tvm |
Not reached |
No fresh TVM/IREE/wheel measurement |
merge |
Not reached |
Configure probes and Rust cdylibs keep their own limits |
torch |
Not reached |
App/sdist and ROCm source builds need separate accounting |
final/smoke |
Not reached |
No final image or runtime acceptance |
ROCm SDK/MIGraphX/llama |
Outside this NVIDIA attempt |
No ROCm compiler or hardware result is inferred |
The ONNX block reports 2,261 top-level requests and 6,909 executed inner requests; these are different counters and must not be added. It contains 2,571 hits, 3,733 misses, 605 non-cacheable compilations and 0 non-cacheable calls, compilation failures, forced recaches or cache/read/write errors. Retain the 605 raw compilations without assigning a cause. L0 supplies the 2,571 hits; L0 and L1 each report 3,733 writes with 0 write failures. A configured second level or a successful write is not an independently observed second-level read hit. The free-threaded wheel loads with GIL disabled and carries the GIL wheel’s DLL bytes; neither import nor byte equality is GPU inference.
Complete private NVIDIA evidence at a4d31ea5, 2026-11-11. The normal full
producer passes all stages and publish gates, with 319 smoke assertions and no
failures. The two container hardware skips have separate image-bound host
receipts: five correct CPU, CUDA, TensorRT-plugin and DirectML runs, provider
operators in the profiles, CPU fallback disabled for strict GPU checks and
native provenance checked before and after. The final private manifest is
sha256:d66fe94e923422d2cf52da458f26f01276eb010c03e1368677e31a84174d87ef;
no NVIDIA tag moved. These numerical fixtures do not prove arbitrary models.
The dated 17-solve cache observations in logs/g5-results.md distinguish reused
layers from executed Torch, final and gate steps. No fresh compiler-counter
block appears in those solves; complete producer success supplies no new CUDA
hit rate or whole-repeat result. Retain the failed repeat’s separate status.
Completed d9 CUDA repeat and stage coverage#
Measured 2026-11-15 (Europe/Berlin) at exact private source
d9f129afee5fd39f87ec68daea24122b344121c0. The separate canonical request used
-Gpu -Stages media -MediaBranches media-core with diagnostic SCCACHE_LOG;
it ended naturally with raw exit zero. No no-cache option, nonce or source edit
was used. All five ONNX/FFmpeg/OpenCV/Hailo/GenAI images exported; the audit
checks every manifest/config content hash and complete successive parent chain,
all 2,492 source files before and after, and the same six compiler-cache IDs.
The ONNX compiler RUN’s one primary snapshot contains 2,261 parent requests, 6,909 executed inner requests and 6,304 hits: C 78, C++ 1,578, NVCC 605, cudafe++ 605, PTX 1,738 and CUBIN 1,700. Misses, cache errors and compilation failures are zero. Retain 605 non-cacheable compilations without assigning a cause. These typed counters are parts of the primary total, never extra hits; mirrors, later checkpoints and backend counters are not added. CUDA-plugin ABI and TensorRT-plugin build checks pass in the actual exported ONNX stage.
ONNX manifest: sha256:707db5c2c9ba9818dbfc137cf169c29533abc12d9136060917c2cc117d9d2ec0.
Its config is sha256:86c859387a79f84a1de2eee2a0ff6954b9d6b8b2b4fab080af594511f49c9b11;
all 26 toolchain parent descriptors and diff-IDs remain identical in 27 layers.
The whole-repeat audit SHA256 is
955e332773ba261b220f1432082c820ca48576f48e30bea9c4a590e424073a88.
Its new terminal checks pass ten refusal controls and eight valid guard mutants.
The coordination receipt
records the same result. Local raw logs, exact checkpoints and independent audits
are indexed by logs/g2-stage-coverage-current.md and logs/g5-results.md.
This ledger covers all 17 logical stages of the same-source full NVIDIA producer; the dedicated repeat is identified separately in the ONNX row. Each value is one primary measurement. A successful export or reused image supplies no new compiler-counter sample.
Logical stage |
Actual cache evidence and coverage limit |
|---|---|
base |
Image reuse; no new compiler-counter sample. |
NVIDIA SDK |
SDK image reuse; acquisition is not compiler-cache proof. |
TensorRT SDK extraction |
Verified extraction/export; no compiler sample. |
patched LLVM toolchain |
Image reuse; older LLVM hits retain their own source. |
toolchain publish gate |
Metadata check; no compiler sample. |
media-core ONNX/QNN/TensorRT |
Baseline reuses its image; dedicated repeat proves the primary 6,304 typed hits above. Later QNN/TensorRT displays are not independent totals. |
media-core FFmpeg/PyAV |
Baseline image reuse; no new baseline compiler sample or dedicated PyAV/NASM accounting. |
media-core OpenCV |
Baseline image reuse; no new baseline CUDA-counter sample. |
media-core HailoRT |
246 C/C++ hits, zero misses/cache errors/compiler failures. |
media-core GenAI |
207 C/C++ hits, zero misses/cache errors/compiler failures; CUDA retains its direct-compiler policy. |
media LiteRT |
CMake: 5,350 hits, zero misses/cache errors/compiler failures; Bazel and wheel compilation have separate coverage limits. |
media TVM/IREE |
Separate primary samples: TVM 630 and IREE 7,018 hits, each zero misses/cache errors/compiler failures. |
media merge |
GStreamer 4,892 hits, 18 misses, 103 cache errors and 32 compilation failures; causes unclassified. Separate OpenCV-plugin sample: one hit, zero misses/errors/failures. |
Torch |
App environment updated; no primary sccache-counter block. |
final |
Image assembly/export; no compiler sample. |
smoke gate |
319 passed, zero failed, two retained skips; separate image-bound host receipts cover those hardware checks. |
publish gate |
Local publishability check; no image push or compiler sample. |
The complete diagnostic repeat proves G2 at d9. It does not prove a later commit’s full lane, hosted CI, ARM device acceptance, Windows AMD inference or image publication. CON229 stays open for the uncached paths; unexplained GStreamer failures remain visible rather than classified as expected probes.
Frozen source 5bd443ea evidence, 2026-11-12. These private image manifests are
dated producer evidence, not public tags or acceptance of a later source commit:
Lane |
Manifest SHA256 |
Actual producer/smoke scope |
|---|---|---|
CPU amd64 |
|
full raw0, 289 pass / 0 fail / 2 skip |
ARM64 payload |
|
full raw0, 152 pass / 0 fail / 17 skip; device execution open |
NVIDIA amd64 |
|
audited full raw1 disk stop + documented Torch/final raw0; 319 pass / 0 fail / 2 hardware skips with separate host proof |
ROCm amd64 |
|
audited full/media/final raw1/1/0; 286 pass / 0 fail / 2 skip, plus a separate HIP-load skip; AMD device execution open |
The full NVIDIA driver explicitly forced media-core-built-onnx. Its bounded
executed ONNX block reports 6,304 typed hits: C 78, C++ 1,578, CUBIN 1,700,
cudafe++ 605, nvcc 605 and PTX 1,738. Misses, cache errors and compilation failures
are zero; retain 605 non-cacheable compilations and zero non-cacheable calls.
The 2,261 top-level requests and 6,909 inner requests are distinct counters.
L0 supplies the 6,304 hits; neither L1’s zero hits nor its 605 misses prove an S3
read hit. Do not add later QNN/TensorRT snapshots or duplicate console output.
The original partial counter receipt does not prove a whole product; the later
full-lane audit binds its source, forced driver, final image and continuation.
Per-stage uncached gaps in CON229 remain open.
The completed ROCm MIGraphX RUN8 reports 509 C++ hits, 17 misses and no cache or
compile errors. GStreamer RUN27 reports 4,894 C++ hits, 16 misses, 103 cache errors
and 32 compilation failures; repeated displays are not summed. Their original
causes remain unclassified. An isolated real Linux GCC probe with the Linux binary
of the same pinned 0.19.0+965c019.pr2809 build shows that a missing-header preprocessing failure
increments Cache errors, while an undeclared identifier after preprocessing
increments Compilation failures. Valid cold/warm controls still miss/hit correctly.
This explains the counter categories, not the Windows requests: do not classify
the 103 events as expected Meson checks or backend failures without request logs.
The same NVIDIA bytes additionally pass five correct negative-input explicit
zero-Pad/MaxPool runs through CPU, CUDA and TensorRTPlugin, with both outputs
checked for shape/type/count/finite values and provider work in every complete
run. CUDA has 10 GPU operator events and TensorRTPlugin 5. The image-bound C++
probe has 15 actual CPU controls and 8 actually compiled semantic mutants. Forty-five
runtime DLLs and the earlier accepted probe/model remain unchanged. This small
graph does not establish MIGraphX, arbitrary models or Windows AMD execution.
The native evidence receipt is negative-pool-native-evidence-20261112.json;
coordination and remaining scope.
Historical fixes and the canary bar before changing the pin:
CUDA 13.3’s
--simt-onlydryrun mis-parse. Released sccache decomposes nvcc by parsingnvcc --dryrun; 13.3.33 emits--simt-onlyAFTER the input file, so the positional parser took the flag as the input, mis-grouped the cicc/ptxas device steps, and the per-arch.cubinfiles were never produced. The build died at the combine step withfatbinary fatal : Could not open input file '<tu>.compute_80.cubin'(measured here 2026-08-08 on ONNX’s CUDA provider). Fixed by mozilla/sccache#2722, merged 2026-08-04 — five days AFTER v0.17.0 shipped.#2811 (dryrun quote collapse).
\"escapes flattened before tokenization packed ~30-Dpairs into one 493-char token, so the cpp4 preprocess lostUSE_CUDA& friends; that was the 2026-08-10 miscompile (dropped instantiations,lld-link: undefined symbol). Merged 2026-08-19.#2816 (
--diag-suppressseparated form). The OpenCV #115 blocker; merged 2026-08-26.All three ship in 0.18.0 (released 2026-09-14), which is why the git-rev pin, the
windows/upstream/sccache-nvcc-quote-fix/series and thecargo install --git --revpath are gone.The cuda_llm scope (patch 006). While the fix was in flight, ONNX’s
onnxruntime_providers_cuda_llmtarget was scoped to BARE nvcc, because sccache’s server died deterministically on the cutlass-generated fused_moe GEMM launchers (~4910 s in, clients gotos error 10054; #2808). Patch 006 was retired 2026-08-18 with the #114 series: fused_moe compiles through the launcher and links green. If undefined fused_moe/QkvToContext symbols return, check the series still applies before resurrecting a bare-nvcc exception.The canary bar. Never point
CMAKE_CUDA_COMPILER_LAUNCHERat a new sccache on the strength of a green compile: the miscompile class is invisible until the DLL link. A candidate must passwindows/scripts/diagnostics/Test-CudaCache.ps1(its in-container payloadverify-cuda-cache/Test-Cache.ps1compiles the same.cutwice and asserts a miss on a per-run nonce in code, then a hit only a backend write can serve) plus an ONNX canary through the fused_moe launchers before cuda_llm is re-wrapped.
The CUDA launcher (CMAKE_CUDA_COMPILER_LAUNCHER) is ON BY DEFAULT since
2026-08-18 (SCCACHE_CUDA_LAUNCHER="1" in the media-core-built-onnx stage),
after a decision history worth keeping:
The 2026-08-10 miscompile (dropped instantiations,
lld-link: undefined symbol) was root-caused to sccache’s Windows dryrun quote-collapse —\"escapes flattened before tokenization packed ~30-Dpairs into one 493-char token, so the cpp4 preprocess lostUSE_CUDA& friends. Fixed upstream (mozilla/sccache#2811, MERGED 2026-08-19). The--diag-suppressseparated form (mozilla/sccache#2816) also merged upstream 2026-08-26; both ship in the released 0.18.0 the lane now installs.The three-canary bar passed on the evening of 2026-08-18: fused_moe compile green, providers_cuda link green COLD (153 CUDA device writes), link green on the HIT run at 100.00% CUDA/PTX/CUBIN hit rate (207/816 hits) — onnx’s CUDA portion drops from ~60 to ~33 min warm. The canaries are
Test-CudaCache.ps1+ a fused_moe compile + a full providers_cuda LINK — the miscompile class is invisible until link, which is why all three are required before trusting any new sccache with the launcher.The #2808 DEADLOCK separately proved to be #99 collateral (gone under a healthy backend). Patch 006 (bare fused_moe) was RETIRED 2026-08-18 (moe compiles through the launcher, link green).
Opt out per run with
-BuildArg SCCACHE_CUDA_LAUNCHER=; never flip the default off silently.ORT’s PTX-only targets keep the launcher too, since 2026-11-06 (CON229). Before, from 2026-09-26, they went bare: sccache 0.18.0 aborts an nvcc compile whose output for one arch is PTX only (
Missing "cubin" file output, mozilla/sccache#2862). The first chain with120died at [2323/2383] onfpA_intB_gemm. The hub’s sccache carries the fix (mozilla/sccache#2809,shared/upstream/sccache/README.md, proven on Windows 2026-11-06), soGet-OrtPtxLauncherExemptArgandsccache-ptx-exempt.cmakeare gone;SourceBuild.OrtCudaLauncher.Tests.ps1refuses their return. The history:Which targets. ORT turns
75;86;87;89;120into75-real;86-real;87-real;89-real;120a-real(cmake/external/cuda_configuration.cmake). Onlyonnxruntime_providers_cuda_llm(and the CUDA plugin’s_llmtwin) gets120-virtualinstead, on MSVC alone (REPLACE_SM120_REAL_WITH_VIRTUAL: nativesm_120apulls tcgen05 headers MSVC cannot host). Every other target compiles cubins only, which sccache caches.Until 2026-10-15
Disable-OrtCudaLauncherForPtxkept nvcc bare for all of ORT, and the nvidia ORT stage took 83 min (4956 s in the chain of 2026-10-14, the longest step of any chain).2026-10-15 to 2026-11-06
Get-OrtPtxLauncherExemptArgkept the launcher and passed-DCMAKE_PROJECT_onnxruntime_INCLUDE=…/patches/onnxruntime/sccache-ptx-exempt.cmake. That file, deferred to the end of ORT’s configure, clearsCUDA_COMPILER_LAUNCHERon every target with a-virtualarch and prints them (sccache-ptx-exempt: nvcc stays bare for onnxruntime_providers_cuda_llm; …).Measured on the nvidia stage, 2026-10-16:
Run
Stage
CUDA through sccache
2026-10-14, nvcc bare
4956 s
none
First fill (hub
ad4cad96)4746 s
292 hits, 277 misses
Warm, chain from an empty BuildKit store (
15bc7d6c)about 30 min
569 of 569
Warm rerun,
-NoCacheStage media-core-built-onnx(62973b48)1332 s (ninja 1149 s)
569 of 569; 6134 requests, 0 misses
Configure printed
nvcc stays bare for onnxruntime_providers_cuda_llmevery time. Both warm builds linkedonnxruntime_providers_cudafrom hits, and the chain’s smoke gate passed 301 assertions with none skipped.Test-CudaCache.ps1, the third canary, did not run.The first chain without the exemption, 2026-11-06 (nvidia, after a toolchain rebuild): ORT’s CUDA RUN compiled 4937 times through sccache,
moe_gemmkernels included, with 0 failures and 4330 WebDAV writes; 1663 hits (25 %), because the rebuilt toolchain re-keyed most objects.Test-CudaCache.ps1passed the same night (4 misses, then 4 hits).OpenCV passes
-realarchs only and was never affected.
The disk level is off: Windows BuildKit cache mounts lose writes into a directory
an earlier RUN populated, so no chain names disk, and the host’s WebDAV is level 0 (§ Two
cache levels below). Re-tested 2026-10-15 with Invoke-SccacheWriteProbe.ps1, run twice: the
first run wrote without an error, the second lost 165 of 250 writes on the mount and none
in a plain directory. Re-enable it with -BuildArg SCCACHE_MULTILEVEL_CHAIN=disk,webdav only after
Test-SccacheWrite.ps1 and a media build with zero genai write errors say so. The C:\sccache mounts use
sharing=shared because locked made the concurrent litert and tvm solves take turns;
with L0 on, that means two sccache servers on one directory, which has never been measured
here. A damaged L0 tree fails path-dependently with os error 3: point SCCACHE_DIR at a
fresh subdirectory (C:\sccache\v3) instead of debugging it.
Two cache levels#
Since 2026-10-15 a build can use two levels: the host’s own WebDAV (level 0) and an S3 bucket that every host shares (level 1). A second machine then gets hits for what this one compiled, without each compile waiting on the slower link.
SCCACHE_MULTILEVEL_CHAIN = webdav,s3
level 0: this host's dufs, http://<host-lan-ip>:5000 (~1 ms, one per host)
level 1: the shared bucket, http://<s3-server-lan-ip>:3900 (Garage on a VPS, WireGuard only)
Why these two backends. sccache allows each backend type once per chain, so two WebDAV
servers cannot be chained. A disk level would be the natural level 0, but it loses writes on
the cache mounts (above). The host’s dufs is already set up by Install-NewHost.ps1 on every
build host, so the shared level speaks S3 instead.
How sccache 0.18 runs a chain (src/cache/multilevel.rs, checked 2026-10-15):
Reads try level 0 first. A hit on level 1 is copied back to level 0 in a background task.
Writes go to level 0 inside the compile (
SCCACHE_MULTILEVEL_WRITE_ERROR_POLICYdefaultl0). Every slower level gets its write in a background task, so no compile waits on the upload.A stopping server drops the background tasks that have not finished.
Complete-SccacheServerSessiontherefore callsWait-SccacheUploadDrainbefore--stop-server. It polls--show-stats --stats-format jsonuntil level 1’s writes plus write failures reach level 0’s writes, and gives up after 600 s with a warning. Each level-0 write starts exactly one write per slower level; backfills count apart (backfills_to), and preprocessor entries count in neither. A cold stage over a slow upload therefore ends with a wait, not with lost objects; whatever is left after 600 s, a later build uploads again.Each RUN names which level served it. When the drain ends it writes one line to stderr, which a clipped step log keeps:
sccache-levels| L0 (webdav): H hit(s), M miss(es), backfills_from …; L1 (s3): …. Hits on L1 are compiles another host paid for, so a fresh host’s first chain proves the shared level bygrep 'sccache-levels|'over its logs: L1 hits well above 0, and its misses close to the RUN’s real misses.
Measured end to end on 2026-10-15 (BuildKit probe on bk-windows-toolchain, sccache 0.18.0,
clang-cl, 20 fresh one-function C files, the real key as env secrets):
Phase |
Result |
|---|---|
|
20 misses; level 0 and level 1 each 20 writes, 0 write failures |
|
|
A fresh server on |
20 hits, 0 misses: the objects came from the bucket |
The next RUN |
neither |
The JSON counters the drain reads look like this, one object per level:
{"name":"L1 (s3)","writes":20,"write_failures":0,"hits":0,"misses":20,"backfills_from":0,"backfills_to":0,…}.
A wrong secret does not fail quietly: the server does not start at all
(Server startup failed: … S3Error { code: "AccessDenied", message: "Forbidden: Invalid signature", resource: "/sccache/.sccache_check" }),
so the compiles of that RUN run uncached. That is how the first probe found a command line
stored as the secret.
No setting enters an argument, a layer, a build record or the image history (2026-10-20).
Get-BkSccacheConfig turns each setting into an env-sourced BuildKit secret: the driver sets
KATAGLYPHIS_BK_<NAME> in its own process and passes --secret id=<name in lower case>,env=KATAGLYPHIS_BK_<NAME>,
the key as id=sccache_s3_key_id and id=sccache_s3_secret. Every sccache RUN mounts all eight
as their sccache names (--mount=type=secret,id=sccache_endpoint,env=SCCACHE_ENDPOINT, …,
env=AWS_ACCESS_KEY_ID); Get-BkSccacheSecretMount is the list. A setting this run leaves out
is not passed, and its mount is skipped. Probed on this host:
The variable is set inside the RUN, and is gone in the next RUN (2026-10-15, 2026-10-20).
A build without the secret runs, with the variable unset.
A file-target secret also works, but needs a forward-slash target (
target=C:/…), and it leaves a 0-byte placeholder in the layer. The env form leaves nothing.A secret is not part of any cache key, so a host with another endpoint, or a run without the S3 level, hits the same layers.
The publish gate fails an image whose environment carries AWS_ACCESS_KEY_ID,
AWS_SECRET_ACCESS_KEY or AWS_SESSION_TOKEN (WindowsImageEnv.Common, and
verify_image_env.py with the shared fixture); the history gate fails one whose history names
an endpoint, the bucket or the region (§ What the published image carries).
Setting up a client host (once per host, after Install-NewHost.ps1):
# asks for the secret without echo, tries it against the bucket, writes the five KATAGLYPHIS_SCCACHE_S3_* user variables
pwsh -File windows\scripts\host\Set-SccacheS3Level.ps1 -Endpoint http://<s3-server-lan-ip>:3900 -AccessKeyId <key id>
pwsh -File windows\scripts\host\Set-SccacheS3Level.ps1 -ReportOnly # what is set (the secret as set/missing)
pwsh -File windows\scripts\host\Test-HostSetup.ps1 # "sccache S3 level reachable"
pwsh -File windows\scripts\host\Copy-SccacheCacheToS3.ps1 -DryRun # optional: seed the bucket from this host
Variables.
Build-Buildkit.ps1reads them from the process, the user and the machine environment, in that order, so a shell that started before them still finds them. The parameters-SccacheS3Endpoint,-SccacheS3Bucketand-SccacheS3Regionoverride them. The run then printssccache levels: webdav -> s3, without the endpoints.Defaults. Bucket
sccache, regiongarage.The secret is checked before it is stored. One with whitespace is refused (a pasted command line was stored once, 2026-10-15). With s5cmd on PATH the script lists the bucket with the key first:
AccessDeniedorInvalid signaturestores nothing, an unreachable server only warns.Copy the command before the key, or take it from the history. Copying the command after the key replaces the key in the clipboard, and the paste at the prompt is the command.
Server side.
linux/sccache-s3/README.mdhas the VPS: WireGuard through the FritzBox, Garage, the firewall rule and the size cap.Seeding.
Copy-SccacheCacheToS3.ps1copies the dufs tree into the bucket 1:1. Both backends store an object under the same key,a/b/c/<hash>(normalize_key), with no key prefix.preseed\and.sccache_checkstay out.
The app builds in a reused container get the level too (2026-10-15). Invoke-ContainerBuild,
which the Windows lanes of OmniAccelerANT, AccelerANTgine and Ballett call through
Invoke-RepoContainerBuild.ps1, hands it to the build’s docker exec:
By name only.
Get-HostSccacheS3ExecEnv(WindowsContainerBuild.Reuse) reads the fiveKATAGLYPHIS_SCCACHE_S3_*settings and returnsSCCACHE_ENDPOINT,SCCACHE_BUCKET,SCCACHE_REGION,SCCACHE_S3_USE_SSL, the chain and bothAWS_*key halves.Invoke-WithProcessEnvironmentsets them for the docker CLI alone, and the exec gets a value-less-e NAMEfor each, which docker resolves from its own environment. The key is on no command line, and the reused container’s config never holds it.Per exec, never on the
docker run. A reused container keeps whatever its run was given, so a setting added later would never reach it.Left out when incomplete or unreachable, with a warning. A sccache server whose S3 level fails its startup check (403, or no answer) caches nothing at all, which the image chain saw once as
Server startup failed … AccessDenied.The bind-mount transport does not get it. That container is kept after a failure for inspection, and its config would then hold the key. CI has no route to the bucket anyway.
A server outlives the exec in a reused container. Background uploads therefore finish without a drain. A server started before the level was set keeps its old configuration until its idle timeout (600 s) or
sccache --stop-serverin the container.Not yet run against a live Stevedore engine (dockerd was stopped on 2026-10-15); the suite is
ContainerBuild.SccacheS3.Tests.ps1.
The Linux image chain uses the same bucket since 2026-10-17, as one BuildKit secret that
carries the endpoint too (build-cache-tiers.md § The shared S3 level).
A consumer’s local Linux lane can join it too: OmniAccelerANT’s Invoke-LinuxLane.ps1 binds the
host’s key at /run/secrets/sccache_s3, where the same sccache_start_server reads it (2026-10-17).
In CI the Linux lanes have no route to the bucket and carry their cache through actions/cache.
What happens when a level is missing, so neither level can stop a build:
Situation |
Effect |
|---|---|
No |
WebDAV alone, as before 2026-10-15 |
Half of them set |
The driver warns, names what is missing and leaves the S3 level out |
The bucket’s port does not answer the host |
The driver warns and builds on WebDAV alone |
Inside a RUN: no key, or the endpoint unreachable |
|
A wrong key |
The server refuses to start ( |
The bucket stalls the server’s startup check |
One level that fails its check stops the whole sccache server ( |
The bucket dies in the middle of a RUN |
Writes fail and are counted; reads wait for the TCP connect on each level-0 miss. The RUN finishes slower, it does not fail |
Measured on 2026-10-16: a flaky bucket stopped a chain, which the startup fallback above now
prevents. The VPS stopped answering through the tunnel at about 00:49 (no TCP connect, no ping).
The nvidia ORT stage, which was still compiling, finished: 608 of 2364 level-1 writes failed, and
level 0 lost none. The next stage, FFmpeg, passed the 2 s TCP probe. Its server still timed out
in the startup check (Timed out waiting for server startup. Maybe the remote service is unreachable?), and every compile failed. Before the fallback, the bucket was a hard dependency
of every RUN that named it. The cause was on the network side: the FritzBox’s IPv6 prefix
changed, and wg had resolved the endpoint’s name once, so the VPS kept sending to the old
address for about 8 hours. wg-reresolve-dns@wg0.timer now follows such a change in about 20 s
(the runbook’s WireGuard section).
The level in a full chain, 2026-10-16 (nvidia from an empty BuildKit store, webdav,s3): the
patched LLVM hit 4233 of 4233 from level 0 and started its server with both levels. The
GStreamer merge wrote 179 objects to the bucket with none failed, and the next run 36. Every
drain ended after 0 s. The smoke gate passed 301 assertions.
Adding the secret mounts changed the RUN instructions, so the chain after 2026-10-15 re-keyed every sccache stage once, and the chain after 2026-10-20 re-keys them again, from the base’s scoop layer on. Those stages compile warm from level 0.
Tests: BuildDriver.SccacheLevels.Tests.ps1 (the config, the secrets, and every one of the
16 sccache RUNs carrying all eight mounts and no ARG of them), Build.SccacheEndpointProbe.Tests.ps1
(§ the S3 level), SourceBuild.SccacheUploadDrain.Tests.ps1, and the publish gate’s
credential cases.
Bazel’s cache#
The two LiteRT bazel builds keep their actions on the host’s dufs too (2026-10-15). sccache never sees Bazel’s compiles, and each build starts from an empty output base. Until now the LiteRT-LM build (5244 actions, ~400 s) and the ai-edge-litert wheel (5655 actions, ~226 s) therefore ran in full in every variant: cpu, nvidia and rocm alike in the chain of 2026-10-14.
The option.
Get-BazelRemoteCacheArg(WindowsBazel.Common) adds--remote_cache=<SCCACHE_WEBDAV_ENDPOINT>/bazeland--remote_download_outputs=allto the option list each build shares with its aquery. With no endpoint in the RUN it adds nothing. With one that does not answer a HEAD within 3 s it adds nothing and warns. The build then runs as before.dufs as the cache. dufs speaks Bazel’s HTTP cache protocol as it is (checked 2026-10-15): a PUT to
bazel/cas/<sha256>creates the directories (201), a GET returns the object, HEAD answers 200, and a missing key is a 404.Every output is downloaded, not Bazel 7’s
topleveldefault, because the install steps copy files frombazel-binthat are not top-level outputs.The variants share it. cpu, nvidia and rocm run the same actions, so the second and third variant of a cold chain hit on the first.
Where it lives. Bazel’s objects sit under
bazel\in the dufs directory, beside sccache’s. Nothing evicts them; deletebazel\to reset.Copy-SccacheCacheToS3.ps1leaves the directory out of the bucket, which only sccache reads. Bazel cannot speak S3, so this cache stays on each host.Tests.
Bazel.RemoteCache.Tests.ps1: no endpoint, a dead one, a live HTTP stub that answers 404, and both scripts and the seed wired.Measured 2026-10-16 (nvidia; the first run filled 32,365 objects, 1.22 GB, into
bazel\):Build
Cold
Warm
From the cache
LiteRT-LM (
litert_lm_main)429 s
204 s
3618 of 3619 actions
ai-edge-litert wheel
238 s
23.5 s
3925 of 3925 actions
The stage’s two RUNs together
1379 s
927 s
LiteRT-LM’s remaining 204 s are mostly the download of every output (
--remote_download_outputs=all), which its install step needs.
What the published image carries#
The build host’s sccache settings are ARGs, never ENV (2026-09-23). Until then
four Dockerfiles ENV’d them: the patched-llvm stage (#164), media-builder’s
common stage, the merge stage and Dockerfile.rocm-migraphx. :winamd64
(digest 3137eebe…, built 2026-09-22 from hub 4dfeaafe) shipped
SCCACHE_WEBDAV_ENDPOINT=http://<webdav-lan-ip>:5000, the owner’s LAN WebDAV. On
a GitHub runner that address is unreachable. sccache 0.18.0 checks its storage
when the server starts and exits when the check fails (tcp connect error).
Every client then times out after 10-12 s with exit 2, CMake reports clang-cl as
“not able to compile a simple test program”, and the AccelerANTgine and
OmniAccelerANT Windows lanes went red (runs 35921977157, 35912798986).
Since 2026-10-20 they are secrets, never ARGs either (owner: no endpoint, bucket,
region or LAN address in a Windows image’s history or config). BuildKit writes an ARG’s
value into its own history entry (ARG SCCACHE_ENDPOINT=http://…) and every build arg
of a RUN into the RUN’s (RUN |9 … SCCACHE_BUCKET=… pwsh …), and the final image
inherits every entry: the four images of 2026-10-17 named the WebDAV and S3 endpoints,
the bucket and the region, :winamd64 30 times an RFC1918 address. A secret mount
appears in neither the history nor the build record.
Variable |
Where it lives |
Why |
|---|---|---|
|
env secret mounts on every compiling RUN |
LAN addresses, the bucket, its region and key; nothing outside the build host reaches them |
|
the WebDAV secret, mounted on the base’s |
the installers’ LAN source; until 2026-10-20 an ARG in every later base RUN’s history |
|
ARG, no default |
the hub’s own disk-only diagnostic switch, read only by |
|
ENV, the runtime defaults |
container-local: a path, a size, a log file and level, a timeout. None names a host, so they behave the same on the build host, a runner and a laptop, and the Linux image ships the same set ( |
The runtime defaults keep their values. Initialize-BuildCacheEnvironment and
Get-SccacheContainerEnv already override SCCACHE_DIR for consumer builds.
SCCACHE_LOG=warn stays beside SCCACHE_ERROR_LOG because without a level the error
log is never written (#90). What a consumer build on the build host does lose is the
remote tier, which it only ever reached through the leaked ENV; Invoke-ContainerBuild
now forwards it at run time:
§ The build host’s remote tier, at run time.
Why each RUN mounts them. A secret mount belongs to one RUN, so each of the 16
compiling RUNs (the seven of Dockerfile.media-builder, the three of the merge stage,
patched-llvm, two each in rocm-migraphx and torch-rocm-wheels, one in rocm-llama)
mounts all eight; the litert wheel RUN, which compiles nothing, mounts the WebDAV one for
Bazel’s remote cache. A setting the driver does not pass is simply absent in the RUN,
which is what the ARG without a default meant (sccache 0.18 ignores an empty value, and
Test-SccacheRemoteConfigured treats one as unset). A missed RUN would compile uncached
without a word, so the static lint refuses it: a RUN that mounts both C:\sccache and
C:\sccache-logs must mount id=sccache_webdav_endpoint,env=SCCACHE_WEBDAV_ENDPOINT.
Four gates hold it:
Static, in preflight:
linux/scripts/verify_image_env.py --dockerfile, run bylint-dockerfiles.shover both lanes’ Dockerfiles. It refuses an ENV of a build-host sccache name, an ENV that expands one, a LAN literal in an ENV or ARG default, an ARG of an endpoint, bucket, region or key name, and a compiling RUN without the endpoint secret.History, Windows (2026-10-20): every solve
Invoke-BkStageexports as an image passes--metadata-file.Invoke-BkHistoryGatereads the config digest from it, fetches the config withbuildctl debug get <digest>(buildkitd’s pipe; containerd’s is admin-only) and runsAssert-ImageConfigPublishableover every history entry, the ENV, the labels and the entrypoint. It fails on a host-carrying sccache name or a key half with a value (SCCACHE_ENDPOINT=…,AWS_SECRET_ACCESS_KEY=…), an RFC1918 or link-local address in a host position, either endpoint’s host anywhere, and the bucket or region as the value of a*BUCKET*/*REGION*name (both are common words,sccacheandgarage, so nowhere else). A red gate prints the entry and the reason, never the value:The history reader checks each
NAME=valuetoken for settings, addresses, bucket and region, then reports each reason once per config entry. Repeated build arguments cannot inflate the count or hide another reason.LEAK history[62]: the build-host setting SCCACHE_ENDPOINT LEAK history[62]: RFC1918/link-local address in SCCACHE_ENDPOINT history gate FAILED: 144 finding(s) in the history and config of …:bk-winarm64 (history[28], …)
It grades the image right after its solve, so a leak stops the run at the stage that made it, and the final image before the smoke gate,
-FinalTarand-PushRef. A run withoutfinalin-Stagesstill grades what it exports. The-OutputSpecre-exports (final-tar,final-push) are not read again: they re-export the graded final solve. A missing digest or an unreadable config fails it.Publish, Windows:
Build-Buildkit.ps1solveswindows/Dockerfile.publish-gate(Invoke-BkPublishGate) at three points: on everyBASE_IMAGEa stage inherits that this run did not build, before that stage solves (§ An image this run did not build); on the toolchain right after its solve; and on the final tag after the smoke gate and before-FinalTar/-PushRef.-SkipSmokeGateskips none of them. Its one RUN mountsWindowsImageEnv.Common.psm1and runsAssert-ImageEnvPublishableover the Process, Machine and User scopes. The Process scope is the config’s ENV; a RUN that set a Machine variable publishes that too. No ARG follows its FROM, because an ARG would join the environment under test, and it does not run the entrypoint, because VsDevCmd adds variables the image does not carry.Publish, Linux:
_manifest_image_env_gate, the first thingcreate_manifestinbuild-runtime-manifest.shdoes. It reads each wrapper’s config ENV (nerdctl image inspect --platform linux/<arch>) and runs the same Python matcher. No switch waives it: notRUNTIME_IMAGE_SMOKE=0, not--force, and--manifest-only/--repairrun it too; seebuild-cache-tiers.md.
What counts as a leak, identically on both lanes (one case file,
linux/scripts/tests/image-env-cases.json, grades the PowerShell and the Python
matcher): any sccache remote-backend name or the two layout names above, whatever the
value; and an RFC1918 (10/8, 172.16/12, 192.168/16) or link-local (169.254/16,
fe80::/10) address in a host position — after scheme://, @ or \\, as a whole
value or list item, or followed by :port or /. A dotted quad inside a path
(C:\TensorRT-10.13.3.9\lib) is not a host, and a whole value under a *VERSION* name
is a version: the base bakes every versions.env key into the Machine environment,
CUDA_WINDOWS_ARM64_CURAND_VERSION=10.4.4.72 among them.
What the gates do not cover. Hostnames other than the two endpoints’ and loopback
(http://buildhost:5000, 127.0.0.1), and files inside the image. In-container scripts
print an endpoint only on a failure path (Clear-UnreachableSccacheEndpoint,
Remove-SccacheS3Level), into the stage log and the local build record, never into the
image. The Linux lane has no history gate; its S3 level was a secret from the start.
Proved on this host, 2026-10-20 (buildkitd v0.33.0, a throwaway stage on the bare
servercore base with the host’s real settings through Get-BkSccacheConfig and
Get-BkSccacheSecretMount): all eight variables set in the RUN, both endpoints answering
TCP from inside it, none in the next RUN, and the gate green. Neither host, the region,
the key id nor the key appeared in the config, the build record, its provenance or the
progress log (0 of each); the record’s FrontendAttrs held only filename,
image-resolve-mode and the nonce. The same stage with an ARG and build-arg: wrote
the value twice into the config and three times into the record and its provenance. A run
with no level passed no secret and built. On the configs of the four published images
(ghcr, 2026-10-20) the gate found 134 (:winamd64, 156 entries, 30 of them addresses),
134 (-nvidia, 191), 196 (-rocm, 248) and 144 (:winarm64, 146) findings, every one
on an sccache setting or VULKAN_PRESEED_ENDPOINT, none elsewhere.
An image this run did not build#
A stage inherits its parent’s config ENV: FROM an image or an earlier stage copies
it, and only ARGs stop at the boundary. So the Dockerfile fix protects only images
built from the fixed Dockerfiles. A bk-windows-toolchain (or -media, -torch) left
by a run from before 2026-09-23 still carries the endpoint, and every stage built on it
inherits it. The merge built stage used to overwrite the variable with its own ENV;
now it passes the parent’s value straight through to the published image. Two ways a
stale parent gets reused: a run whose -Stages leaves out the stage that produces it,
and a driver process that was already running when the checkout moved (PowerShell
parsed the old script, so that process has no gate at all).
Invoke-BkStage therefore grades every BASE_IMAGE this run did not build and has
not graded yet, before it solves the stage. A stale one stops the run in seconds, not
hours later at the final gate:
[bk:publish-gate:bk-windows-toolchain] buildctl failed (exit 1) — full log: ...
[bk:publish-gate:bk-windows-toolchain] docker.io/local/kataglyphis:bk-windows-toolchain was not built
by this run and failed the publish gate: a build-host setting in its ENV (built before 2026-09-23?)
or no such image. Rebuild it: put the stage that produces it in -Stages, from a fresh driver process.
The fresh toolchain is graded right after its solve as well: every later stage
inherits it, and a RUN can write the Machine or User scope, which no Dockerfile lint
sees. A parent this run built is not graded again; the final image always is. Each
gate solve takes seconds, and a repeat on an unchanged image is a cache hit. Tests:
ImageEnv.PublishGate.Tests.ps1 lifts Invoke-BkStage out of the driver and runs it
against a fake buildctl.
Restart a chain across this fix; never resume one. Start a fresh driver process
with toolchain in -Stages, so that no toolchain built from the old Dockerfile is
reused.
Cache impact of the change: the patched-llvm stage and every media stage re-key
(and, on the rocm lane, rocm-migraphx); the toolchain’s built (CPython) stage,
base and the sdk slot do not. The full re-key set is in CHANGELOG.md, 2026-09-23.
The 2026-09-24 follow-up (the parent gate, the probe, the forward) re-keys nothing
beyond that: its only image input is two modules that just the final
windows/Dockerfile copies. The 2026-10-20 secrets re-key every layer from the base’s
Install-ScoopTools.ps1 RUN on; an image built before them fails the history gate, so
start the next chain at base.
The consumer-side probe#
Images published before 2026-09-23 still carry the endpoint, so the consumer side
defends itself. Enable-SccacheCompilerWrapper (WindowsBuild.Common.psm1) is the
one place both consumer wiring sites go through — Initialize-BuildCacheEnvironment
and Invoke-CmakeConfigureAndBuild — and before it sets a launcher it calls
Clear-UnreachableSccacheEndpoint. That function resolves the endpoint’s host and
connects to every address it resolves to at once, within one 2 s budget
(-TimeoutMs) that includes the resolution; the first connection that succeeds
counts. One address at a time would lose a reachable host: Windows takes about 2 s
to refuse a closed IPv6 address, which localhost and a dual-stack name resolve to
first, so an IPv4-only
listener behind http://localhost:<port> was removed after 2049 ms and is now kept
in 37 ms (measured 2026-09-24). Reachable: nothing changes, so the build host keeps
its cache. Unreachable or not a URL: it removes SCCACHE_WEBDAV_ENDPOINT from the
process environment (and SCCACHE_MULTILEVEL_CHAIN when that names webdav), writes
one WARN naming the endpoint, and sccache caches on local disk instead of failing
every compile:
WARNING: sccache: SCCACHE_WEBDAV_ENDPOINT=http://<webdav-lan-ip>:5000 is unreachable
(TCP <webdav-lan-ip>:5000, no connection within 2000 ms) - removed for this process, ...
The image build does NOT use this path. Its compile stages wire sccache through
WindowsSourceBuild.Common, gated on Test-SccacheRemoteConfigured, where an
unreachable endpoint must stay a loud failure rather than quietly become an uncached
multi-hour build. Tests: windows/scripts/tests/Build.SccacheEndpointProbe.Tests.ps1
(a loopback port bound but never listening, a listening one, localhost against an
IPv4-only listener, a 200 ms bound against Windows’ ~2 s refusal, an unresolvable
name, and in-suite mutants for the removal, the bound and the localhost case,
each showing that case can fail on the host it runs on).
The build host’s remote tier, at run time#
Until 2026-09-23 a consumer build on the build host reached the WebDAV tier only
through the leaked ENV. Now Invoke-ContainerBuild (WindowsContainerBuild.Reuse)
forwards this host’s SCCACHE_WEBDAV_ENDPOINT and SCCACHE_MULTILEVEL_CHAIN into the
container as run-time -e entries (Add-HostSccacheRemoteEnv), on both transports
and for every caller: AccelerANTgine passes -CacheEnv (Get-SccacheContainerEnv),
and OmniAccelerANT’s agentic-loop driver passes no -CacheEnv at all. A host without
the variables, such as a GitHub runner, forwards nothing. A key the caller sets in
-CacheEnv wins, and SCCACHE_WEBDAV_ENDPOINT = '' opts out. The container’s probe
(above) still drops an endpoint it cannot reach, so a bad forward costs one WARN,
not a build.
Two limits. A reusable container keeps the environment it was created with, so it
picks the forward up when it is recreated: a new image does that, -FreshContainer
forces it. And a docker run by hand forwards nothing (OmniAccelerANT’s documented
parity run is one); add -e SCCACHE_WEBDAV_ENDPOINT=$env:SCCACHE_WEBDAV_ENDPOINT
yourself. Tests: WindowsContainerBuild.Reuse.Tests.ps1 (Add-HostSccacheRemoteEnv)
and Modules.Orchestrators.Tests.ps1 (the build run carries the -e).
Note (.dockerignore): The repo
.dockerignoremust NOT contain awindows/exclusion — the Windows Dockerfiles COPY from thewindows/scripts/directory within the build context. Ifwindows/is added to.dockerignore, the COPY steps will fail with “file not found in build context”. This exclusion is safe for Linux builds (they read onlylinux/from the same root context) but breaks Windows builds.
ONNX CUDA standard-option boundary — 2026-11-09#
The full NVIDIA run at 93019e36 reports 2,261 compiler requests: 1,656 C/C++
cache hits and 605 CUDA calls rejected as multiple input files. The retained
server trace identifies the separated --std c++20 option in each CUDA call.
Both selected generator branches now use the equivalent -std=c++20 form.
A replay of the captured argument policy with one kernel retains all warnings
and five real GPU targets (75, 86, 87, 89, 120a): the original form remains
uncacheable; the joined form records one CUDA, five PTX, five CUBIN and one
device-code hit on repetition, with no forced recache or cache errors.
This isolated local-cache result does not prove a full plugin or remote-cache
repeat, nor GPU inference. Those measurements remain open in CON229.