Repository navigation
tests: batch vertex-fetch references and check exact mismatch values - #2690
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
startup_vertex_fetch_formats_{hardware,warp}starts one renderer for the matching and deliberately wrong TBUFFER references of each format. The 14 formats have 14 matching references and 36 different wrong references. They now take 14 renderer launches. The 15 TBUFFER shader mutations and the later MUBUF descriptor cases still compile and dispatch through their existing paths. Across the fixture this reduces 129 launches to 93.Each readback still compares all 320 words. For each wrong reference, the batch must report the predicted first differing word and its exact expected and actual values. The batch reports the format and label on failure. This fixture keeps its original exit-77 handling on both hardware and WARP. The heap-store fixture still opts in for hardware only.
Verification
I compared
f4c6998aand95ff5919on Windows 11 with DXC 1.9.2609 and the same compute-batch renderer. On each of WARP, NVIDIA RTX 4060, and Intel UHD 770, both versions produced the same multiset of 186 HLSL/DXIL hash pairs. All 129 shader/case hashes, 54 passes and 75 expected mismatches, 320-word counts, mismatch totals, and first differing indices and values matched on each backend.Three WARP controls corrupted a middle negative to make it pass, changed its expected first word while it still failed, or corrupted guard word 319 of the positive. Each named the affected case while later submissions still completed. Eighteen fixture-level exit-status checks covered 77, 4 and 1 on WARP and hardware for the vertex, heap-store and default policies. On a local integration with #2006, its added 2:10:10:10 format passed its correct reference and reported the first wrong word of all three negative references on all three adapters. Its existing
docs/experiments.mdmerge conflict was independent of these edits.Full-fixture timings
I ran the uninstrumented fixture through its normal Python entry point. Each adapter had one warm-up on each revision and three interleaved timed runs of each. All 24 invocations completed their positive and negative controls.
Desktop load varied. The first timed Intel pair overlapped a local compiler setup, and the later Intel samples were much faster on both revisions. The samples overlap on all three adapters. WARP's median rose and one candidate RTX invocation exceeded the registered 120-second limit. These desktop data establish the process-count reduction and preserved readback coverage. They leave hosted CI wall time to independent measurement.
Refs #448. AI-assisted contribution using Codex (GPT-6.2 Astra, xhigh).