Repository navigation
tests: reuse identical DXC inputs in the vertex-fetch format fixture - #2711
Merged
R0Y00 merged 1 commit intoNov 26, 2026
Merged
Conversation
This was referenced Nov 26, 2026
pigalot
pushed a commit
that referenced
this pull request
Nov 27, 2026
* tests: serve GPU draw cases from one offscreen_check device and cache compiled shaders offscreen_check --serve runs any operation case after case on one D3D12 device; tests/gpu_case_runner.py starts it once per test and falls back to the one-shot call on any problem. compile_hlsl gets a content-addressed object cache. Adopted by startup_flat_param_check (draw), f32_sdwa, f32_nan and image_sample_b. Builds on #2711 and #2690. * tests: reuse the DXC cache of #448 instead of a second compile cache in the case runner * tests: fix the case runner comment * test: patch the shared case runner in the draw skip check The adopted draw checks now go through gpu_case_runner.run, so the late-skip check patches that instead of subprocess.run. * test: close every pipe and reap the process on each server exit A failed handshake, a dead server and the restart now wait for the process, join the pump threads and close all three pipes; a runner test checks it before the one-shot fallback. * test: a served case keeps its debug status and a crash is a failed verdict Every served case now carries the adapter banner (debug_layer line) like a one-shot call; both reply markers must carry the case number; one deadline per case; a renderer that dies, hangs or answers the wrong case after the handshake fails that case and is never re-run. New runner controls fail on the previous runner. * test: a direct-child renderer and one shared deadline when a reply is missing The runner accepts the renderer as a command list; the runner tests launch the fake interpreter directly so a kill releases its pipes on Windows too. A missing reply waits for the process only up to the case deadline, so a crash reports its exit code instead of a timeout. * test: end the served renderer with an explicit line The Wine launcher on RunPod does not pass the end of stdin to the renderer, which stayed alive and held the pipes of the test. The client now writes --end before closing stdin and the service loop stops on it; an older renderer answers 2 and still ends at the end of stdin. * test: end the renderer's whole process group and never block closing a pipe A Wine launcher leaves the real renderer alive after its wrapper is killed, and it keeps the test's pipes open: closing the pipe then blocked the test for good (seen on RunPod as 1800 s timeouts). The renderer now runs in its own process group, which is killed with it; a pipe is closed only when its reader has ended. New runner test with a launcher child that holds the pipes. * test: keep renderer diagnostics in a lost case, make the runner check independent of X2W_FLAT_SERVER and zombies --------- Co-authored-by: c1 <c1@x.invalid>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change
Compile each complete vertex and compute input once per
startup_vertex_fetch_formatsinvocation. Several descriptor cases use different data with an identical vertex program. Some of them use different readback wrappers, so the compute cache key includes the wrapper. Each entry is specific to its shader profile and private temporary directory. The binary is published after DXC exits successfully.Readback and compiler equivalence
I compared main at
a3b923e1withb8468aaf, independently for WARP, RTX 4060 and Intel UHD 770. Each fixture run issued 93 renderer launches and 129 readbacks of 320 words. The 54 successful and 75 deliberately mismatched records matched the baseline, including the shader and input hashes, mismatch counts, and first differing word, expected value and actual value.Each baseline invoked DXC 186 times. The candidate invoked it 136 times and produced exactly the same 136 unique pairs of complete HLSL input and DXIL output hashes. The shader mutation cases still run individually. Independent controls changed just the wrapper, changed the vertex source, and made DXC leave a partial output and fail on the compute stage before a retry. The completed shader remained available and the retry compiled the missing stage. All 18 fixture-level skip/error controls passed.
Wall time
I ran eight full fixtures per adapter, sequentially. The first baseline and candidate runs warmed each path. The next three pairs alternated order (base/candidate, candidate/base, base/candidate). Times below are seconds.
The GPU workload was reserved for this series. Some small host checks and a local C++ build ran during this time. Use the individual samples when comparing with other hosts.
Times use the full fixture's normal entry point on Windows 11 build 26100.9711 with DXC 1.9.2609.5, renderer
76dd27e1, debug layer unavailable. WARP 10.0.26100.9711, RTX 4060 driver 32.0.15.9579, UHD 770 driver 32.0.101.5973. The expectation is a reduction in repeated compiler work. Individual wall times include driver startup and vary between runs.Refs #448. Follow-up to #2690. AI-assisted contribution using Codex (GPT-6.2 Astra, xhigh).