You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tests: pixel_aot draws spend most of their time creating a D3D12 device per case #448
AI-assisted (Claude Code). Measurements from my own machine.
Problem
pixel_aot_check.py draw launches offscreen_check.exe once per case, and each launch creates a new D3D12 device. That device creation dominates the test time, and new draws keep adding to it. pixel_aot_hardware has TIMEOUT 60.
At 3f02f4d, Windows 10 22H2 (19045.7846), RTX 3080 Ti (driver 32.0.16.1047), debug layer enabled, DXC 1.9.2609.5, idle machine:
pixel_aot_hardware
pixel_aot_warp
Total
46.5 s
11.1 s
offscreen_check.exe, 134 launches
44.0 s
8.4 s
dxc.exe, 56 calls
1.9 s
2.1 s
Python
0.6 s
0.6 s
A program that only creates a hardware device and a queue takes 300–360 ms per process; the debug layer adds about 10–30 ms. Under moderate background load the hardware test took 57–60 s and timed out in 4 of 5 runs.
Proposal
An opt-in offscreen_check <backend> --batch <file> that creates the device once and runs the listed cases on it, printing the same per-case output and status as today. The single-case command line stays unchanged.
This touches the same main() as #166 (operation table, explicit pass/77/fail). It could build on top of #166 once that lands: device setup once, then one table row per case.
At ba7d6b7: Windows 11 Pro build 26200, RTX 3080 (driver 32.0.16.1088), Ryzen 5 7600X, DXC from Windows SDK 10.0.26100.0. The D3D12 debug layer is unavailable (Graphics Tools not installed; offscreen_check prints debug_layer=unavailable). The machine was close to idle, at about 8% CPU.
ctest --preset dev --no-tests=error -R '^pixel_aot_(hardware|warp)$', 3 runs each:
pixel_aot_hardware
pixel_aot_warp
Total (ctest, min / median)
28.95 / 28.98 s
6.34 / 6.40 s
offscreen_check.exe, 139 launches
26.8 s
4.4 s
dxc.exe, 57 calls
1.4 s
1.4 s
Python (remainder)
0.7 s
0.6 s
I got the breakdown from a wrapper outside the repo that times every subprocess.run call and runs pixel_aot_check.py unchanged. The three runs agree within 0.2 s. The count is now 139 launches and 57 dxc calls; it was 134 and 56 at 3f02f4d.
Per offscreen_check launch: hardware median 189 ms (min 182, p90 203); WARP median 31 ms (min 28, p90 35).
I also built a program that only creates a device on the first high-performance adapter (or WARP) at feature level 11_0, plus a direct command queue, and then exits. Over 20 runs after one warm-up:
hardware: mean 188 ms, median 185, min 179, max 207, sd 8
WARP: mean 31 ms, median 28, min 27, max 40, sd 4
(An empty cmd /c exit 0 costs about 19 ms per process here.)
So on this machine the cost of a launch is almost all device creation: 139 × ~188 ms ≈ 26 s of the 26.8 s. That is the same pattern as the issue, but the absolute times are about 0.6× on hardware and 0.55× on WARP. Without a debug layer here I can't isolate its cost. The difference from the issue's 300–360 ms per hardware device mixes the debug layer, Windows 10 vs 11, the driver build and the hardware, and this data can't tell those apart.
Third measurement, aimed at the one variable the first two could not separate: the debug layer, on and off on the same machine.
Environment.main at 5a16ee9, dev preset (Debug, Ninja, MSVC Build Tools 2022, CMake/CTest 3.31.6). Windows 11 build 26200, RTX 3070 (driver 32.0.16.2101), Intel i7-10700, DXC from Windows SDK 10.0.26100.0, Python env from requirements-dev.txt. Graphics Tools (Tools.Graphics.DirectX~~~~0.0.1.0) installed for this run, no restart needed; offscreen_check then prints debug_layer=enabled. CPU load was about 7% before and after the runs.
How the layer was switched. To use one binary for every state, I built offscreen_check with a local two-line patch that is not meant for upstream: if the environment variable X2W_MEASURE_NO_DEBUG_LAYER is set, the ID3D12Debug pointer is released before EnableDebugLayer(), so the program takes the same path as a machine without Graphics Tools and prints debug_layer=unavailable. D3D12GetDebugInterface is still called in both states. I checked the state in each ctest -V log: "off" runs print only debug_layer=unavailable, "on" runs print only debug_layer=enabled. The order was A/B/A (off, on, off), three runs each:
ctest --preset dev --no-tests=error -V -R '^pixel_aot_(hardware|warp)$'
State
pixel_aot_hardware runs (s)
mean / min / max (s)
pixel_aot_warp mean / min / max (s)
A1, layer off
51.25, 47.74, 51.29
50.09 / 47.74 / 51.29
8.92 / 8.88 / 8.97
B, layer on
49.61, 49.80, 49.87
49.76 / 49.61 / 49.87
9.32 / 9.20 / 9.42
A2, layer off
47.63, 47.58, 60.05 (Timeout)
51.75 / 47.58 / 60.05
8.90 / 8.81 / 9.04
Device creation alone. A small program outside the repo, like the one in the previous comment: in the "on" state it requests the debug interface and calls EnableDebugLayer(), in the "off" state it does neither; device on the first high-performance adapter (or WARP) at feature level 11_0, one direct queue, exit. Timed per process from outside, 20 runs after one warm-up, in each state:
State
hardware mean / median / min / max (ms)
WARP mean / median / min / max (ms)
A1, layer off
249.5 / 247.8 / 243.2 / 263.6
25.2 / 25.1 / 24.4 / 27.1
B, layer on
260.2 / 259.9 / 251.9 / 276.2
29.6 / 28.8 / 27.9 / 33.0
A2, layer off
247.9 / 246.2 / 244.3 / 258.3
24.9 / 24.8 / 24.3 / 25.6
A later interleaved repeat (15 runs per state, alternating off/on) gave the same picture: hardware median 250.0 → 260.6 ms, WARP 25.6 → 27.7 ms.
What I read from this, cautiously:
On this machine the debug layer costs about 10–13 ms per hardware device (about 4–5%) and a few ms (2–5) per WARP device. That agrees with the 10–30 ms in the issue, and the two "off" blocks agree with each other, so drift is unlikely.
At the test level the layer is not visible above run-to-run noise on hardware: the passing "off" runs spread over 3.7 s (47.58–51.29), more than the expected effect of the layer (115 hardware launches per run × ~11 ms ≈ 1.3 s). On WARP it shows as about +0.4 s.
115 launches × ~250 ms is about 29 s of the ~50 s hardware test here, so on this machine other work also takes a large share. I did not break that down.
So the debug layer does not explain the gap between the issue's 300–360 ms and the 188 ms on the RTX 3080 in the previous comment. On this RTX 3070 the device itself costs about 250 ms with the layer off, between the two.
The hardware test is close to the limit here without the debug layer: 47.6–51.3 s in five of the six "off" runs, and one "off" run (A2, third) hit the 60 s timeout on a machine that was otherwise near idle. Its log shows results for 113 of the 115 hardware launches before the timeout. I can't say what slowed that run; it is a single occurrence.
Raw ctest -V logs and the probe source are available if useful.
AI-assisted: run and prepared with the support of Roan System; reviewed before posting.
I had the same change in progress locally and only now saw #556, which batches the floating-point predicate draws. I'm not opening an overlapping PR. The parts #556 leaves alone are the other three predicate suites in pixel_aot_predicate_rounding_*: 32-bit integer (33 single-case launches), 16-bit integer (45, plus three must_mismatch controls on mutated shaders that stay single-case) and SDWA (24). Batched per compiled group with the same references, they take 20 launches instead of 102. The signed/unsigned and inverted-unordered SDWA controls stay inside their batch as expected mismatches, each followed by a passing case.
Local check on 0f8e7fa: Windows 11 (26200), RTX 3070 (driver 32.0.16.2101) and WARP, debug layer on. All pass, and injected faults fail on both adapters with the case named (i32 emitted as u32, i16 as u16, SDWA nlt emitted as ordered ge, controls relabelled pass). Whole draw-predicate-rounding with the float suite batched as well: 185 → 83 renderer launches. My timings were taken on a loaded machine, so I'll only quote the launch counts.
I'd stack this after #556 and reuse its run_pixel_batch() as it lands, so the two don't conflict. Is that fine with the author of #556, or is a follow-up for these suites already planned? If so, I'll leave it.
AI-assisted: prepared with an AI coding agent and reviewed by a human before posting.
Please go ahead with the three remaining predicate suites. #556 has merged, and I have no overlapping follow-up in progress. Reusing run_pixel_batch() and preserving the signed/unsigned and unordered mismatch controls sounds like a good fit. I can verify the resulting PR on RTX 4070 and WARP when it is up.
RDNA 4 timing for the current draw-core registrations in pixel_aot_hardware and pixel_aot_warp. This was run locally from unmodified upstream main at edc2e54e7e75fcd7c0f13e98b47ba119d9a08268. AI-assisted report.
Ryzen 7 7800X3D, Windows 11 25H2 x64 build 26200.9974, MSVC 19.44.35230, SDK 10.0.26100, DXC 1.8.2502.8, CMake/CTest 3.31.12, Python 3.12.10. The renderer selected the RX 9070 XT (1002:7550, 32.0.32029.2010) and WARP (1414:008c, 10.0.26100.9818). Both reported debug_layer=unavailable. Normal background services were running.
With the local toolchain loaded, the dev CRT DLLs staged beside the renderer, and $intakePython pointing to the local virtual environment:
cmake --preset dev "-DINTAKE_PYTHON=$intakePython"
cmake --build --preset dev --target offscreen_check
$env:XBOX2WINDOWS_ADAPTER='RX 9070 XT'
ctest --preset dev --no-tests=error -R '^pixel_aot_(hardware|warp)$'--repeat until-fail:3-V
Backend
CTest runs
Separate profile, total
Renderer, 127 launches
DXC, 64 calls
Remaining wall time
RX 9070 XT
20.28 / 19.56 / 19.60 s, all passed
19.03 s
15.79 s (83%), 121.7 ms median per launch
2.37 s
0.87 s
WARP
9.09 / 8.89 / 9.14 s, all passed
8.77 s
5.58 s (64%), 42.6 ms median per launch
2.33 s
0.87 s
For the profile I ran the same pixel_aot_check.py draw-core entry point once per backend after the CTest runs, with matching arguments, working directory, and environment. A local wrapper measured wall time around each subprocess.run call. All 127 renderer launches per backend were single invocations (120 --check-pixel-case, 5 --check-pixel, 2 --check-pixel-quad-lod). The renderer timing includes process startup, device setup, drawing, and readback together. There were no timeouts or skips.
The batching follow-up #697 has merged. It cuts renderer launches from 494 to 263 per backend across eight modes while keeping per-case pass/mismatch checks. On RTX 4050 Laptop, the author measured draw-core at 24.11 s (dev) and 24.23 s (/O2). On WARP it was 9.74 s and 9.48 s. We still need a same-machine follow-up on an adapter that previously approached the 60 s cap and evidence for the debug-layer/device-removal cases in the original checklist. If you can retest, please run ctest --preset dev --no-tests=error -R '^pixel_aot_hardware$' -V on current main and report the commit, adapter, driver, Windows build, debug-layer status and elapsed time. #685 covers a separate runner follow-up.
So on this adapter, #697 takes pixel_aot_hardware from about 44 s to about 23.5 s, roughly a 47% reduction. Before #697, the current test content was at about three-quarters of the 60 s cap. My earlier ~20 s figure at edc2e54 is not comparable: tests/pixel_aot_check.py has grown since then, by 465 lines between 4c3b573 and 787ace7 alone, so the pre-#697 cost at fa52b37 is the relevant baseline. The time at current main matches 4c3b573 within noise.
My first three runs on 787ace7, before the cache was warm, took 29.40 / 26.48 / 24.30 s. The warm reruns are the ones in the table. There were no failures, timeouts or skips in any of the 12 runs (edc2e54 excluded).
Not covered: the debug-layer and device-removal cases from the original checklist. The D3D12 debug layer is unavailable here, so this report has no evidence for them.
Thanks for the same-machine comparison. The three warm RX 9070 XT runs before #697 were 42.63–44.55 s; at the merge they were 23.42–23.62 s, with all runs passing. #685 also merged the explicit pass/skip/fail runner. This issue stays open for the original checklist's case-local debug-layer messages and device-removal behavior. The timing evidence is complete for this adapter.
I added a local regression test for the pixel batch runner on fd2486f427c9d8a99b050bc77abc28c135d03a06 plus the test patch. The self-test injected a debug error and a device-removal status. Expected and observed case statuses were pass, error, pass, error, error, error. The runner attempted four draws and made no draw calls for the two cases after removal.
On Windows 10 22H2 build 19045.6466, the existing predicate-rounding pixel checks passed on both the RTX 3060 Ti (driver 621.24, DXGI 32.0.16.2124) and Microsoft WARP (10.0.19041.5794). The D3D12 debug layer was unavailable on both runs. CTest reported 3/3 passed, with zero skips. The self-test covers runner logic with injected errors. Live debug-layer and device-removal evidence is still outstanding.
ctest --preset dev --no-tests=error -V -R '^(offscreen_capability_table_self_test|pixel_aot_predicate_rounding_(hardware|warp))$'
Another data point for the timeout side of this issue, on the same class of machine but a different adapter/driver than the two above.
Environment: Windows 11 build 26300.9974, NVIDIA GeForce RTX 4060, driver 32.0.16.2124, debug layer unavailable, Windows SDK 10.0.26100.0, DXC 1.9.2609.5, Python 3.13.12. Machine otherwise idle, single ctest run (not parallel).
A local trial merge of #428 (which adds 4 DPP forms and their draw cases) onto 5a2c782:
pixel_aot_hardware
pixel_aot_warp
ctest result
Timeout (property TIMEOUT 60)
PASS
Wall time, pixel_aot_check.py draw ... hardware run directly
61.2 s
12.65 s
Draw result
exit 0, every case max_absolute_error=0
exit 0, max_absolute_error=0
On unmodified main at 5a2c782 the same test ran in 59.13 s here and passed, so this adapter sits right at the limit: 1.9 s of extra draw cases push it over. The work is not slow, the device creation is, exactly as measured above.
This is a case where the timeout now hides a passing result on supported hardware, so any of the proposed fixes (batch device, higher TIMEOUT, or splitting the test) would restore a useful signal. A per-case TIMEOUT that scales with the case count would also stop the limit from silently creeping back.
Timing data point at 37ed46d: on an RTX 3080 (driver 32.0.16.2124, Windows 11 26200.9974, debug layer enabled), pixel_aot_predicate_rounding_hardware passed in 56.4 s in one full run. In a second build from the same base it hit its 60 s timeout twice: once in a parallel run and once run on its own. Earlier on this machine it took about 41.8 s. That mode now runs at or past its timeout on this adapter. AI-assisted (Claude Code).
We'd like to take the pixel_aot_predicate_rounding_hardware timeout next: it is now at or past its 60 s limit in the RTX 3080/4060 reports above, and on our RTX 3070 under load. Its cases already go through run_pixel_batch per shader since #697, so the first step is to measure where the time actually goes (per-shader compiles, renderer start-up, draws) on RTX 3070 and WARP with the debug layer, then propose the smallest change that brings it back under the limit without touching any case's expected bytes or mismatch controls. I'll post the measurements and link the PR here.
Claiming speed item: startup_mrt_fxc_warp + startup_mrt_dxc_warp (tests/startup_mrt_check.py: run the 6 integer-format cases in parallel, private cache per format, test-only).
I’ll measure a follow-up to the merged #2568 using the same compute_store_aot_descriptor_load_format_warp fixture. Its six workers retain a separate renderer process and D3D12 device for each dispatch. Twenty-one of the 32 dispatches use the same compiled shader (seven matching references and fourteen intentionally wrong ones).
I’ll compare that version with a prototype that reuses one device for those 21 cases and leaves the eleven independently compiled shader mutations intact. I’ll check the same case order, individual mismatch diagnostics, and a device/error case. I can run WARP, RTX 4060 and UHD 770 on the same Windows machine and post the timings even if reusing the device loses to six parallel workers.
I measured the follow-up to #2568 on the full compute_store_aot_descriptor_load_format fixture. Sharing only the device slowed down all three desktop adapters. Sharing the fixed shader's root signature and compute pipeline as well reduced the median on all three and on hosted WARP.
Environment
Six-worker baseline → device only
Six-worker baseline → device + pipeline
Windows 11 WARP
26.806 → 59.095 s
22.736 → 14.859 s
RTX 4060
14.694 → 16.084 s
16.343 → 11.220 s
Intel UHD 770
20.968 → 34.832 s
22.720 → 15.311 s
Windows Server 2025 WARP, debug layer enabled
—
22.31 → 12.29 s
Each desktop column is a separate experiment with its own baseline. On Windows 11 build 26100.9711 I warmed both implementations, then ran three timed pairs on each adapter with the same renderer binary for both sides. Desktop driver versions were 32.0.15.9579 (NVIDIA), 32.0.101.5973 (Intel) and 10.0.26100.9711 (WARP). The desktop debug layer was unavailable. The hosted figures are medians of three interleaved runs per implementation on one runner. Windows build and raw CTest output
The fixture goes from 32 renderer launches to 12. All 21 fixed-shader references get fresh buffers, a separate dispatch and a fenced comparison of all 320 words. On each desktop adapter I compared the bytes of the 32 case inputs, the 12 HLSL and DXIL pairs, and the individual statuses, mismatch counts and first differing words. All matched. A one-byte reference between two passing inputs returned pass/error/pass and exit 1. In a separate hosted debug-layer control, an injected D3D12 error affected only the middle case and actual device removal failed that case and the next one. Debug-layer controls
The candidate retains the per-case labels and the renderer's debug output. Its Release checks and timings also exercise the other root signatures and image paths that use the compute helper.
I’ll take the heap-view load fixture as a follow-up to #2615. The Windows receipt on that PR puts compute_store_aot_heap_view_load_warp among the slower cases. Its matching references for one- and two-group dispatches reuse two shaders (XY and XYZW). I’ll measure batching references by shader, preserving the independently compiled mutations and per-slot failure diagnostics. I also noticed four zero-publication controls in the current source while the summary counts three. I’ll reconcile the summary with the actual case stream and compare the inputs and first wrong words on WARP and hardware before proposing the change.
The heap-view load follow-up #2635 is on main at 8ecaa8ec. It reduces this fixture from 77 renderer launches to 16 while retaining all 77 observed records, including 14 separately compiled mutations and the seven wrong-reference checks. The PR's paired Windows Server WARP median went from 11.51 s to 7.87 s. The latest Windows receipt also passed all four adjacent checks in Debug and Release. Please keep any next batching slice anchored to an identified fixture and its per-case mismatches.
I’ll measure compute_store_aot_heap_view_store_warp and its hardware counterpart next. The four-check run for #2635 recorded 12, 12, 16, 17 and 17 matching cases across UINT4 and four D16 stores, plus 52 independently compiled shader mutations. Each mode currently starts a process for every fixed-shader reference. I’ll compare one batch per mode, keeping each mutation and its required first-word diagnostic, the 320-word sentinels, and the hardware capability skip. I’ll report the full-fixture timings and compare the individual readbacks before proposing a change. Original run
The heap-view store result is in merged PR #2654. Its 126 readbacks and 52 shader mutations matched on WARP, an RTX 4060 and a UHD 770. Three-pair medians fell by 28.9%, 36.6% and 37.6% respectively.
I’ll measure the fixed-shader references in startup_vertex_fetch_formats_{warp,hardware} next. On current main the TBUFFER section starts 50 renderers for 14 matching references and 36 deliberately wrong references over the same 14 shaders. I’ll test one batch per format against the separate runs, retaining the predicted first wrong word, 320-word guard checks, and the fixture’s existing skip behavior. The 15 shader mutations and the later descriptor-driven cases have separate coverage. #2006 extends the format table and decoder. I’ll check that the batching handles its additional format and compare the full-fixture timings before proposing a change.
I will take the compiler reuse follow-up to merged #2690. The full vertex-fetch fixture calls DXC 186 times. I will compare every distinct stage and complete input, its DXIL hash, all 129 readbacks and first mismatches, and paired wall time on WARP, RTX 4060 and UHD 770. The cache lives in one fixture invocation.
Claiming a generic follow-up for the per-case process cost: an offscreen_check --serve mode that runs any operation case after case on one device, adopted first by the flat-param, pixel-words and image-sample draw checks (builds on #2635, #2654, #2690, #2711). Draft PR soon.
I will take the remaining compile cost in startup_gfx2hlsl_f16_alu_draw mentioned in #2766. I will measure which FXC/DXC inputs repeat, reuse or queue independent compilations within the fixture, and compare shader bytes, case order, wrong-word controls and paired elapsed times with the current suite. GPU draws will still execute in their original order.
Activity
grahamster2 commentedon Nov 22, 2026
Second measurement, from a different machine.
At
ba7d6b7: Windows 11 Pro build 26200, RTX 3080 (driver 32.0.16.1088), Ryzen 5 7600X, DXC from Windows SDK 10.0.26100.0. The D3D12 debug layer is unavailable (Graphics Tools not installed;offscreen_checkprintsdebug_layer=unavailable). The machine was close to idle, at about 8% CPU.ctest --preset dev --no-tests=error -R '^pixel_aot_(hardware|warp)$', 3 runs each:pixel_aot_hardwarepixel_aot_warpoffscreen_check.exe, 139 launchesdxc.exe, 57 callsI got the breakdown from a wrapper outside the repo that times every
subprocess.runcall and runspixel_aot_check.pyunchanged. The three runs agree within 0.2 s. The count is now 139 launches and 57 dxc calls; it was 134 and 56 at3f02f4d.Per
offscreen_checklaunch: hardware median 189 ms (min 182, p90 203); WARP median 31 ms (min 28, p90 35).I also built a program that only creates a device on the first high-performance adapter (or WARP) at feature level 11_0, plus a direct command queue, and then exits. Over 20 runs after one warm-up:
(An empty
cmd /c exit 0costs about 19 ms per process here.)So on this machine the cost of a launch is almost all device creation: 139 × ~188 ms ≈ 26 s of the 26.8 s. That is the same pattern as the issue, but the absolute times are about 0.6× on hardware and 0.55× on WARP. Without a debug layer here I can't isolate its cost. The difference from the issue's 300–360 ms per hardware device mixes the debug layer, Windows 10 vs 11, the driver build and the hardware, and this data can't tell those apart.
roansystemlabs commentedon Nov 22, 2026
Third measurement, aimed at the one variable the first two could not separate: the debug layer, on and off on the same machine.
Environment.
mainat5a16ee9,devpreset (Debug, Ninja, MSVC Build Tools 2022, CMake/CTest 3.31.6). Windows 11 build 26200, RTX 3070 (driver 32.0.16.2101), Intel i7-10700, DXC from Windows SDK 10.0.26100.0, Python env fromrequirements-dev.txt. Graphics Tools (Tools.Graphics.DirectX~~~~0.0.1.0) installed for this run, no restart needed;offscreen_checkthen printsdebug_layer=enabled. CPU load was about 7% before and after the runs.How the layer was switched. To use one binary for every state, I built
offscreen_checkwith a local two-line patch that is not meant for upstream: if the environment variableX2W_MEASURE_NO_DEBUG_LAYERis set, theID3D12Debugpointer is released beforeEnableDebugLayer(), so the program takes the same path as a machine without Graphics Tools and printsdebug_layer=unavailable.D3D12GetDebugInterfaceis still called in both states. I checked the state in eachctest -Vlog: "off" runs print onlydebug_layer=unavailable, "on" runs print onlydebug_layer=enabled. The order was A/B/A (off, on, off), three runs each:ctest --preset dev --no-tests=error -V -R '^pixel_aot_(hardware|warp)$'pixel_aot_hardwareruns (s)pixel_aot_warpmean / min / max (s)Device creation alone. A small program outside the repo, like the one in the previous comment: in the "on" state it requests the debug interface and calls
EnableDebugLayer(), in the "off" state it does neither; device on the first high-performance adapter (or WARP) at feature level 11_0, one direct queue, exit. Timed per process from outside, 20 runs after one warm-up, in each state:A later interleaved repeat (15 runs per state, alternating off/on) gave the same picture: hardware median 250.0 → 260.6 ms, WARP 25.6 → 27.7 ms.
What I read from this, cautiously:
Raw
ctest -Vlogs and the probe source are available if useful.AI-assisted: run and prepared with the support of Roan System; reviewed before posting.
roansystemlabs commentedon Nov 22, 2026
I had the same change in progress locally and only now saw #556, which batches the floating-point predicate draws. I'm not opening an overlapping PR. The parts #556 leaves alone are the other three predicate suites in
pixel_aot_predicate_rounding_*: 32-bit integer (33 single-case launches), 16-bit integer (45, plus threemust_mismatchcontrols on mutated shaders that stay single-case) and SDWA (24). Batched per compiled group with the same references, they take 20 launches instead of 102. The signed/unsigned and inverted-unordered SDWA controls stay inside their batch as expected mismatches, each followed by a passing case.Local check on
0f8e7fa: Windows 11 (26200), RTX 3070 (driver 32.0.16.2101) and WARP, debug layer on. All pass, and injected faults fail on both adapters with the case named (i32 emitted as u32, i16 as u16, SDWAnltemitted as orderedge, controls relabelledpass). Wholedraw-predicate-roundingwith the float suite batched as well: 185 → 83 renderer launches. My timings were taken on a loaded machine, so I'll only quote the launch counts.I'd stack this after #556 and reuse its
run_pixel_batch()as it lands, so the two don't conflict. Is that fine with the author of #556, or is a follow-up for these suites already planned? If so, I'll leave it.AI-assisted: prepared with an AI coding agent and reviewed by a human before posting.
RonLogic commentedon Nov 22, 2026
Please go ahead with the three remaining predicate suites. #556 has merged, and I have no overlapping follow-up in progress. Reusing
run_pixel_batch()and preserving the signed/unsigned and unordered mismatch controls sounds like a good fit. I can verify the resulting PR on RTX 4070 and WARP when it is up.AI-assisted.
shader: batch the integer and SDWA predicate draws in pixel_aot (#564)
rwZephyr commentedon Nov 22, 2026
RDNA 4 timing for the current
draw-coreregistrations inpixel_aot_hardwareandpixel_aot_warp. This was run locally from unmodified upstreammainatedc2e54e7e75fcd7c0f13e98b47ba119d9a08268. AI-assisted report.Ryzen 7 7800X3D, Windows 11 25H2 x64 build
26200.9974, MSVC19.44.35230, SDK10.0.26100, DXC1.8.2502.8, CMake/CTest3.31.12, Python3.12.10. The renderer selected the RX 9070 XT (1002:7550,32.0.32029.2010) and WARP (1414:008c,10.0.26100.9818). Both reporteddebug_layer=unavailable. Normal background services were running.With the local toolchain loaded, the dev CRT DLLs staged beside the renderer, and
$intakePythonpointing to the local virtual environment:For the profile I ran the same
pixel_aot_check.py draw-coreentry point once per backend after the CTest runs, with matching arguments, working directory, and environment. A local wrapper measured wall time around eachsubprocess.runcall. All 127 renderer launches per backend were single invocations (120--check-pixel-case, 5--check-pixel, 2--check-pixel-quad-lod). The renderer timing includes process startup, device setup, drawing, and readback together. There were no timeouts or skips.shader: batch the scalar SALU draws in pixel_aot_predicate_rounding
R0Y00 commentedon Nov 22, 2026
The batching follow-up #697 has merged. It cuts renderer launches from 494 to 263 per backend across eight modes while keeping per-case pass/mismatch checks. On RTX 4050 Laptop, the author measured
draw-coreat 24.11 s (dev) and 24.23 s (/O2). On WARP it was 9.74 s and 9.48 s. We still need a same-machine follow-up on an adapter that previously approached the 60 s cap and evidence for the debug-layer/device-removal cases in the original checklist. If you can retest, please runctest --preset dev --no-tests=error -R '^pixel_aot_hardware$' -Von currentmainand report the commit, adapter, driver, Windows build, debug-layer status and elapsed time. #685 covers a separate runner follow-up.rwZephyr commentedon Nov 22, 2026
Same-machine retest after #697 on the RX 9070 XT, as requested. This is the adapter from my earlier
edc2e54report. AI-assisted; all runs local.Environment: Windows 11 25H2 x64, build 26200.9974. Ryzen 7 7800X3D, MSVC 19.44.35230, SDK 10.0.26100, DXC 1.8.2502.8, CMake/CTest 3.31.12, Python 3.12.10,
devpreset.XBOX2WINDOWS_ADAPTER='RX 9070 XT'selected AMD Radeon RX 9070 XT (1002:7550), driver32.0.32029.2010. Debug layer: unavailable (debug_layer=unavailable; Graphics Tools is not installed on this machine). Normal background services were running.Command, as given, run three times per commit from a clean tree:
787ace7main4c3b573fa52b37So on this adapter, #697 takes
pixel_aot_hardwarefrom about 44 s to about 23.5 s, roughly a 47% reduction. Before #697, the current test content was at about three-quarters of the 60 s cap. My earlier ~20 s figure atedc2e54is not comparable:tests/pixel_aot_check.pyhas grown since then, by 465 lines between4c3b573and787ace7alone, so the pre-#697 cost atfa52b37is the relevant baseline. The time at currentmainmatches4c3b573within noise.My first three runs on
787ace7, before the cache was warm, took 29.40 / 26.48 / 24.30 s. The warm reruns are the ones in the table. There were no failures, timeouts or skips in any of the 12 runs (edc2e54excluded).Not covered: the debug-layer and device-removal cases from the original checklist. The D3D12 debug layer is unavailable here, so this report has no evidence for them.
R0Y00 commentedon Nov 22, 2026
Thanks for the same-machine comparison. The three warm RX 9070 XT runs before #697 were 42.63–44.55 s; at the merge they were 23.42–23.62 s, with all runs passing. #685 also merged the explicit pass/skip/fail runner. This issue stays open for the original checklist's case-local debug-layer messages and device-removal behavior. The timing evidence is complete for this adapter.
rwZephyr commentedon Nov 23, 2026
I added a local regression test for the pixel batch runner on
fd2486f427c9d8a99b050bc77abc28c135d03a06plus the test patch. The self-test injected a debug error and a device-removal status. Expected and observed case statuses werepass, error, pass, error, error, error. The runner attempted four draws and made no draw calls for the two cases after removal.On Windows 10 22H2 build 19045.6466, the existing predicate-rounding pixel checks passed on both the RTX 3060 Ti (driver 621.24, DXGI 32.0.16.2124) and Microsoft WARP (10.0.19041.5794). The D3D12 debug layer was unavailable on both runs. CTest reported 3/3 passed, with zero skips. The self-test covers runner logic with injected errors. Live debug-layer and device-removal evidence is still outstanding.
ctest --preset dev --no-tests=error -V -R '^(offscreen_capability_table_self_test|pixel_aot_predicate_rounding_(hardware|warp))$'AI-assisted. All tests ran locally.
FZNull commentedon Nov 23, 2026
Another data point for the timeout side of this issue, on the same class of machine but a different adapter/driver than the two above.
Environment: Windows 11 build 26300.9974, NVIDIA GeForce RTX 4060, driver 32.0.16.2124, debug layer unavailable, Windows SDK 10.0.26100.0, DXC 1.9.2609.5, Python 3.13.12. Machine otherwise idle, single
ctestrun (not parallel).A local trial merge of #428 (which adds 4 DPP forms and their draw cases) onto
5a2c782:pixel_aot_hardwarepixel_aot_warpTIMEOUT 60)pixel_aot_check.py draw ... hardwarerun directlymax_absolute_error=0max_absolute_error=0On unmodified main at
5a2c782the same test ran in 59.13 s here and passed, so this adapter sits right at the limit: 1.9 s of extra draw cases push it over. The work is not slow, the device creation is, exactly as measured above.This is a case where the timeout now hides a passing result on supported hardware, so any of the proposed fixes (batch device, higher
TIMEOUT, or splitting the test) would restore a useful signal. A per-caseTIMEOUTthat scales with the case count would also stop the limit from silently creeping back.AI-assisted.
JB2WIN commentedon Nov 23, 2026
Timing data point at
37ed46d: on an RTX 3080 (driver 32.0.16.2124, Windows 11 26200.9974, debug layer enabled),pixel_aot_predicate_rounding_hardwarepassed in 56.4 s in one full run. In a second build from the same base it hit its 60 s timeout twice: once in a parallel run and once run on its own. Earlier on this machine it took about 41.8 s. That mode now runs at or past its timeout on this adapter. AI-assisted (Claude Code).roansystemlabs commentedon Nov 23, 2026
We'd like to take the
pixel_aot_predicate_rounding_hardwaretimeout next: it is now at or past its 60 s limit in the RTX 3080/4060 reports above, and on our RTX 3070 under load. Its cases already go throughrun_pixel_batchper shader since #697, so the first step is to measure where the time actually goes (per-shader compiles, renderer start-up, draws) on RTX 3070 and WARP with the debug layer, then propose the smallest change that brings it back under the limit without touching any case's expected bytes or mismatch controls. I'll post the measurements and link the PR here.tests: run the comparison draws as their own pixel_aot CTest entry
30 remaining items
tedin7 commentedon Nov 25, 2026
Claiming speed item: compute_store_aot_descriptor_load_format_warp (tests/compute_load_format_check.py draw: cut remaining serial launches, same checks).
tedin7 commentedon Nov 25, 2026
Claiming speed item: startup_mrt_fxc_warp + startup_mrt_dxc_warp (tests/startup_mrt_check.py: run the 6 integer-format cases in parallel, private cache per format, test-only).
RavenCurseBurg commentedon Nov 25, 2026
I’ll measure a follow-up to the merged #2568 using the same
compute_store_aot_descriptor_load_format_warpfixture. Its six workers retain a separate renderer process and D3D12 device for each dispatch. Twenty-one of the 32 dispatches use the same compiled shader (seven matching references and fourteen intentionally wrong ones).I’ll compare that version with a prototype that reuses one device for those 21 cases and leaves the eleven independently compiled shader mutations intact. I’ll check the same case order, individual mismatch diagnostics, and a device/error case. I can run WARP, RTX 4060 and UHD 770 on the same Windows machine and post the timings even if reusing the device loses to six parallel workers.
tests: run the six integer-format MRT cases in parallel (#2588)
RavenCurseBurg commentedon Nov 25, 2026
I measured the follow-up to #2568 on the full
compute_store_aot_descriptor_load_formatfixture. Sharing only the device slowed down all three desktop adapters. Sharing the fixed shader's root signature and compute pipeline as well reduced the median on all three and on hosted WARP.Each desktop column is a separate experiment with its own baseline. On Windows 11 build 26100.9711 I warmed both implementations, then ran three timed pairs on each adapter with the same renderer binary for both sides. Desktop driver versions were 32.0.15.9579 (NVIDIA), 32.0.101.5973 (Intel) and 10.0.26100.9711 (WARP). The desktop debug layer was unavailable. The hosted figures are medians of three interleaved runs per implementation on one runner. Windows build and raw CTest output
The fixture goes from 32 renderer launches to 12. All 21 fixed-shader references get fresh buffers, a separate dispatch and a fenced comparison of all 320 words. On each desktop adapter I compared the bytes of the 32 case inputs, the 12 HLSL and DXIL pairs, and the individual statuses, mismatch counts and first differing words. All matched. A one-byte reference between two passing inputs returned
pass/error/passand exit 1. In a separate hosted debug-layer control, an injected D3D12 error affected only the middle case and actual device removal failed that case and the next one. Debug-layer controlsThe candidate retains the per-case labels and the renderer's debug output. Its Release checks and timings also exercise the other root signatures and image paths that use the compute helper.
RavenCurseBurg commentedon Nov 25, 2026
I’ll take the heap-view load fixture as a follow-up to #2615. The Windows receipt on that PR puts
compute_store_aot_heap_view_load_warpamong the slower cases. Its matching references for one- and two-group dispatches reuse two shaders (XY and XYZW). I’ll measure batching references by shader, preserving the independently compiled mutations and per-slot failure diagnostics. I also noticed four zero-publication controls in the current source while the summary counts three. I’ll reconcile the summary with the actual case stream and compare the inputs and first wrong words on WARP and hardware before proposing the change.R0Y00 commentedon Nov 26, 2026
The heap-view load follow-up #2635 is on
mainat8ecaa8ec. It reduces this fixture from 77 renderer launches to 16 while retaining all 77 observed records, including 14 separately compiled mutations and the seven wrong-reference checks. The PR's paired Windows Server WARP median went from 11.51 s to 7.87 s. The latest Windows receipt also passed all four adjacent checks in Debug and Release. Please keep any next batching slice anchored to an identified fixture and its per-case mismatches.RavenCurseBurg commentedon Nov 26, 2026
I’ll measure
compute_store_aot_heap_view_store_warpand its hardware counterpart next. The four-check run for #2635 recorded 12, 12, 16, 17 and 17 matching cases across UINT4 and four D16 stores, plus 52 independently compiled shader mutations. Each mode currently starts a process for every fixed-shader reference. I’ll compare one batch per mode, keeping each mutation and its required first-word diagnostic, the 320-word sentinels, and the hardware capability skip. I’ll report the full-fixture timings and compare the individual readbacks before proposing a change. Original runRavenCurseBurg commentedon Nov 26, 2026
The heap-view store result is in merged PR #2654. Its 126 readbacks and 52 shader mutations matched on WARP, an RTX 4060 and a UHD 770. Three-pair medians fell by 28.9%, 36.6% and 37.6% respectively.
I’ll measure the fixed-shader references in
startup_vertex_fetch_formats_{warp,hardware}next. On current main the TBUFFER section starts 50 renderers for 14 matching references and 36 deliberately wrong references over the same 14 shaders. I’ll test one batch per format against the separate runs, retaining the predicted first wrong word, 320-word guard checks, and the fixture’s existing skip behavior. The 15 shader mutations and the later descriptor-driven cases have separate coverage. #2006 extends the format table and decoder. I’ll check that the batching handles its additional format and compare the full-fixture timings before proposing a change.RavenCurseBurg commentedon Nov 26, 2026
I will take the compiler reuse follow-up to merged #2690. The full vertex-fetch fixture calls DXC 186 times. I will compare every distinct stage and complete input, its DXIL hash, all 129 readbacks and first mismatches, and paired wall time on WARP, RTX 4060 and UHD 770. The cache lives in one fixture invocation.
tedin7 commentedon Nov 26, 2026
Claiming a generic follow-up for the per-case process cost: an offscreen_check --serve mode that runs any operation case after case on one device, adopted first by the flat-param, pixel-words and image-sample draw checks (builds on #2635, #2654, #2690, #2711). Draft PR soon.
RavenCurseBurg commentedon Nov 26, 2026
I will take the remaining compile cost in
startup_gfx2hlsl_f16_alu_drawmentioned in #2766. I will measure which FXC/DXC inputs repeat, reuse or queue independent compilations within the fixture, and compare shader bytes, case order, wrong-word controls and paired elapsed times with the current suite. GPU draws will still execute in their original order.tests: serve GPU draw cases from one offscreen_check device (#2766)
lukaslw-lab commentedon Dec 2, 2026
Closing: the proposal is done. Per-case device creation is gone from the large draw fixtures:
offscreen_checkserve mode: tests: serve GPU draw cases from one offscreen_check device #2766.Fixture-specific speedups (#808, #831, #2370, #2568, #2635, #2654, #2690) landed along the way. New slow fixtures can get their own issues.
AI-assisted.