Skip to content

tests: batch vertex-fetch references and check exact mismatch values - #2690

Merged
R0Y00 merged 1 commit into
R0Y00:mainfrom
RavenCurseBurg:tests/batch-vertex-fetch-format-references
Nov 26, 2026
Merged

R0Y00 merged 1 commit into
R0Y00:mainfrom
RavenCurseBurg:tests/batch-vertex-fetch-format-references

Conversation

@RavenCurseBurg

Copy link
Copy Markdown
Contributor

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 f4c6998a and 95ff5919 on 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.md merge conflict was independent of these edits.

python -B tests/startup_vertex_fetch_formats_check.py controls
python -B tests/startup_vertex_fetch_formats_check.py $dxc $renderer warp
python -B tests/startup_vertex_fetch_formats_check.py $dxc $renderer hardware

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.

Adapter Before, seconds After, seconds Before → after median
WARP 62.255, 59.318, 56.561 58.490, 68.617, 61.079 59.318 → 61.079 (+3.0%)
RTX 4060 108.860, 113.903, 117.875 105.018, 97.360, 124.208 113.903 → 105.018 (−7.8%)
Intel UHD 770 131.643, 51.325, 64.731 59.837, 48.626, 69.758 64.731 → 59.837 (−7.6%)

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).

@R0Y00
R0Y00 merged commit d41a9a8 into R0Y00:main Nov 26, 2026
5 checks passed
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants