tests: run compute load-format draw cases concurrently #2347

Merged
tedin7 merged 3 commits from upstream-pr/2355 into main 2026-11-25 14:22:48 +00:00
tedin7 commented 2026-11-25 13:30:46 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T13:30:46Z.


Part of #448

What this unblocks: compute_store_aot_descriptor_load_format_warp, the slowest test in Windows WARP runs (119 s dev, 84 s release at ab096620 on #2059), no longer launches offscreen_check one case at a time.

What changes

tests/compute_load_format_check.py draw ran every case (2 dispatches, the refused formats, their placeholder references, the wrong references and the mutated sources) one after the other through a single shared load.case file. Each launch creates a new D3D12 device, which is the cost #448 measures.

Now every case writes its own case file (and, for mutations, its own .hlsl/.cso), and the launches run on a ThreadPoolExecutor with at most min(4, os.cpu_count()) workers. The results are checked afterwards in the original order, with the original conditions and messages:

  • dispatches and refused formats must pass (renderer output is still printed);
  • placeholder references must fail with word=0 expected=... actual=c5c5c5c5;
  • wrong references must fail at the first differing word;
  • mutated sources must fail with Compute readback differs.

No case or check is removed. startup_mrt_check.py is not changed here: its formats share a cache directory and a manifest that is renamed mid-test, so it needs a Windows profile before any change.

Verification

Linux (this branch):

python3 -B tests/compute_load_format_check.py controls      -> exit 0
python3 -m py_compile tests/compute_load_format_check.py     -> exit 0
draw mode with a stub compiler and renderer:
  renderer always exits 0 -> "escaped detection" AssertionError (as before)
  renderer always exits 1 -> exit 1 on the first dispatch (as before)

Windows Server 2025 WARP at 3b9fdc77 (4 focused tests: compute_heap_view_controls, compute_load_format_controls, compute_store_aot_descriptor_load_format_warp, compute_store_aot_heap_view_load_warp):

x2w_pipe.py win2025 2355 --keep-release
dev:     100% tests passed out of 4   ctest 44.2 s
release: 100% tests passed out of 4   ctest 40.6 s

Before, on main code at 333213c0 (#2059 full run), compute_store_aot_descriptor_load_format_warp alone took 119 s dev / 84 s release, and in the latest #2059 dev run it hit the 120 s ctest timeout under load.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6605614489 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2355). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T13:30:46Z. --- Part of #448 What this unblocks: `compute_store_aot_descriptor_load_format_warp`, the slowest test in Windows WARP runs (119 s dev, 84 s release at `ab096620` on #2059), no longer launches `offscreen_check` one case at a time. ## What changes `tests/compute_load_format_check.py draw` ran every case (2 dispatches, the refused formats, their placeholder references, the wrong references and the mutated sources) one after the other through a single shared `load.case` file. Each launch creates a new D3D12 device, which is the cost #448 measures. Now every case writes its own case file (and, for mutations, its own `.hlsl`/`.cso`), and the launches run on a `ThreadPoolExecutor` with at most `min(4, os.cpu_count())` workers. The results are checked afterwards in the original order, with the original conditions and messages: - dispatches and refused formats must pass (renderer output is still printed); - placeholder references must fail with `word=0 expected=... actual=c5c5c5c5`; - wrong references must fail at the first differing word; - mutated sources must fail with `Compute readback differs`. No case or check is removed. `startup_mrt_check.py` is not changed here: its formats share a cache directory and a manifest that is renamed mid-test, so it needs a Windows profile before any change. ## Verification Linux (this branch): ``` python3 -B tests/compute_load_format_check.py controls -> exit 0 python3 -m py_compile tests/compute_load_format_check.py -> exit 0 draw mode with a stub compiler and renderer: renderer always exits 0 -> "escaped detection" AssertionError (as before) renderer always exits 1 -> exit 1 on the first dispatch (as before) ``` Windows Server 2025 WARP at 3b9fdc77 (4 focused tests: `compute_heap_view_controls`, `compute_load_format_controls`, `compute_store_aot_descriptor_load_format_warp`, `compute_store_aot_heap_view_load_warp`): ``` x2w_pipe.py win2025 2355 --keep-release dev: 100% tests passed out of 4 ctest 44.2 s release: 100% tests passed out of 4 ctest 40.6 s ``` Before, on main code at 333213c0 (#2059 full run), `compute_store_aot_descriptor_load_format_warp` alone took 119 s dev / 84 s release, and in the latest #2059 dev run it hit the 120 s ctest timeout under load. AI-assisted; commands listed were executed locally.
RavenCurseBurg commented 2026-11-25 14:05:11 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-25T13:46:27Z.


I compared the serial fixture at the merge base b5d1ea2e with 3b9fdc77 using the same DXC 1.9.2609 and renderer on Windows 11 build 26100.9711. Each invocation ran the full python -B tests/compute_load_format_check.py draw <dxc> <offscreen_check> <backend> entry point. Elapsed times in seconds:

Adapter Serial PR
WARP 10.0.26100.9711 48.10, 45.51 17.83, 17.66
Intel UHD 770, 32.0.101.5973 55.64 21.66
RTX 4060, 32.0.15.9579 27.91 13.69

WARP order was serial / PR / PR / serial. Hardware ran PR then serial, one trial each. All eight invocations passed the same 7 dispatches, 14 wrong references and 11 source mutations. I also compared the seven ordered renderer summaries per invocation: 320 words, zero mismatches in each. The hardware adapter names were confirmed in the child output; local D3D12 debug layer unavailable.

I took the separate shared-cache MRT timing question to #448.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7164268954 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2355#issuecomment-7164268954). Originally posted by [RavenCurseBurg](https://github.com/RavenCurseBurg) on 2026-11-25T13:46:27Z. --- I compared the serial fixture at the merge base b5d1ea2e with 3b9fdc77 using the same DXC 1.9.2609 and renderer on Windows 11 build 26100.9711. Each invocation ran the full `python -B tests/compute_load_format_check.py draw <dxc> <offscreen_check> <backend>` entry point. Elapsed times in seconds: | Adapter | Serial | PR | | --- | ---: | ---: | | WARP 10.0.26100.9711 | 48.10, 45.51 | 17.83, 17.66 | | Intel UHD 770, 32.0.101.5973 | 55.64 | 21.66 | | RTX 4060, 32.0.15.9579 | 27.91 | 13.69 | WARP order was serial / PR / PR / serial. Hardware ran PR then serial, one trial each. All eight invocations passed the same 7 dispatches, 14 wrong references and 11 source mutations. I also compared the seven ordered renderer summaries per invocation: 320 words, zero mismatches in each. The hardware adapter names were confirmed in the child output; local D3D12 debug layer unavailable. I took the separate shared-cache MRT timing question to #448.
tedin7 commented 2026-11-25 14:05:15 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T13:53:35Z.


Thanks for the side-by-side timing. Your run used the current head 3b9fdc77, and it matches what we saw: WARP drops from about 46-48 s to about 18 s, and the two hardware adapters also get faster. All eight runs report the same 7 dispatches, 14 wrong references and 11 mutations, with zero summary mismatches, so running the draws in parallel does not change the results.

On our side, Win2025 WARP at 3b9fdc77 passes 4/4 in both dev and release (x2w_pipe.py win2025 2355). The CTest wall time for these targets is 44.2 s dev and 40.6 s release, down from 119 s and 84 s.

Following the shared-cache MRT question in #448.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7164442433 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2355#issuecomment-7164442433). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T13:53:35Z. --- Thanks for the side-by-side timing. Your run used the current head 3b9fdc77, and it matches what we saw: WARP drops from about 46-48 s to about 18 s, and the two hardware adapters also get faster. All eight runs report the same 7 dispatches, 14 wrong references and 11 mutations, with zero summary mismatches, so running the draws in parallel does not change the results. On our side, Win2025 WARP at 3b9fdc77 passes 4/4 in both dev and release (`x2w_pipe.py win2025 2355`). The CTest wall time for these targets is 44.2 s dev and 40.6 s release, down from 119 s and 84 s. Following the shared-cache MRT question in #448. AI-assisted; commands listed were executed locally.
tedin7 commented 2026-11-25 14:05:15 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T13:56:11Z.


Independent verification of 3b9fdc77: PASS.

  • Concurrency: every draw case writes its own files (case{N}.bin, mutated{N}.*); no file is shared between threads. Checks still run in the original order with the same messages and conditions; no case was dropped.
  • Error path: a compile failure inside the pool raises CalledProcessError as before, so the exit code is unchanged.
  • Win2025 WARP (x2w_pipe.py win2025 2355): 4/4 dev and 4/4 release. compute_store_aot_descriptor_load_format_warp takes 44 s dev and 39 s release.
  • Independent hardware timing in this thread: WARP 46-48 s -> about 18 s, Intel UHD 770 55.6 s -> 21.7 s, RTX 4060 27.9 s -> 13.7 s, with identical results.
  • Hygiene: body has Part of #448, What this unblocks:, Verification:; commits carry no generated-by trailers.

Moving to Ready for review.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7164506035 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2355#issuecomment-7164506035). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T13:56:11Z. --- Independent verification of 3b9fdc77: PASS. - Concurrency: every draw case writes its own files (`case{N}.bin`, `mutated{N}.*`); no file is shared between threads. Checks still run in the original order with the same messages and conditions; no case was dropped. - Error path: a compile failure inside the pool raises `CalledProcessError` as before, so the exit code is unchanged. - Win2025 WARP (`x2w_pipe.py win2025 2355`): 4/4 dev and 4/4 release. `compute_store_aot_descriptor_load_format_warp` takes 44 s dev and 39 s release. - Independent hardware timing in this thread: WARP 46-48 s -> about 18 s, Intel UHD 770 55.6 s -> 21.7 s, RTX 4060 27.9 s -> 13.7 s, with identical results. - Hygiene: body has `Part of #448`, `What this unblocks:`, `Verification:`; commits carry no generated-by trailers. Moving to Ready for review. AI-assisted; commands listed were executed locally.
chatgpt-codex-connector[bot commented 2026-11-25 14:05:16 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-25T13:56:25Z.


Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-25T13:59:32.010368Z 3b9fdc7 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7164511727 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2355#issuecomment-7164511727). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-25T13:56:25Z. --- <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"3b9fdc77c122760af1252395cfbfcff0de06aedc","has_any_findings":false,"has_unresolved_findings":false,"status":"completed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} --> <details> <summary><strong>Codex Review Summary</strong>: ✅ Completed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ✅ **Completed** <relative-time datetime="2026-11-25T13:59:32.010368Z">2026-11-25T13:59:32.010368Z</relative-time> | `3b9fdc7` | Draft marked ready | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@codex review" or "@codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. </details> </details>
upstream-sync closed this pull request 2026-11-25 15:01:40 +00:00
tedin7 commented 2026-11-25 15:01:59 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T14:21:58Z.


Win2025 WARP receipt for head ad6de589 after updating with main.

Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit ad6de589f46a25e12d5fb87591d2876671f711e4:

  • Debug (--preset dev):
    • Build (cmake --build --preset dev --target offscreen_check -- -j 2): 0.00s (configure 0.00s)
    • Test (ctest --preset dev -R '^(compute_heap_view_controls|compute_load_format_controls|compute_store_aot_descriptor_load_format_warp|compute_store_aot_heap_view_load_warp)$' --parallel 2 --no-tests=error --output-on-failure): 4/4 passed (40.32s: compute_store_aot_heap_view_load_warp 24.00s, compute_heap_view_controls 1.84s, compute_load_format_controls 2.01s, compute_store_aot_descriptor_load_format_warp 40.08s)
  • Release /O2 (--preset release):
    • Build (cmake --build --preset release --target offscreen_check -- -j 2): 0.00s (configure 0.00s)
    • Test (ctest --preset release -R '^(compute_heap_view_controls|compute_load_format_controls|compute_store_aot_descriptor_load_format_warp|compute_store_aot_heap_view_load_warp)$' --parallel 2 --no-tests=error --output-on-failure): 4/4 passed (33.59s: compute_store_aot_heap_view_load_warp 9.25s, compute_load_format_controls 0.95s, compute_heap_view_controls 0.90s, compute_store_aot_descriptor_load_format_warp 33.29s)
  • sccache: 0/3 hits; wall 90.6s

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7165165234 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2355#issuecomment-7165165234). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T14:21:58Z. --- Win2025 WARP receipt for head ad6de589 after updating with main. Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit `ad6de589f46a25e12d5fb87591d2876671f711e4`: - **Debug (`--preset dev`)**: - Build (`cmake --build --preset dev --target offscreen_check -- -j 2`): `0.00s` (configure `0.00s`) - Test (`ctest --preset dev -R '^(compute_heap_view_controls|compute_load_format_controls|compute_store_aot_descriptor_load_format_warp|compute_store_aot_heap_view_load_warp)$' --parallel 2 --no-tests=error --output-on-failure`): **4/4 passed** (`40.32s`: `compute_store_aot_heap_view_load_warp` `24.00s`, `compute_heap_view_controls` `1.84s`, `compute_load_format_controls` `2.01s`, `compute_store_aot_descriptor_load_format_warp` `40.08s`) - **Release `/O2` (`--preset release`)**: - Build (`cmake --build --preset release --target offscreen_check -- -j 2`): `0.00s` (configure `0.00s`) - Test (`ctest --preset release -R '^(compute_heap_view_controls|compute_load_format_controls|compute_store_aot_descriptor_load_format_warp|compute_store_aot_heap_view_load_warp)$' --parallel 2 --no-tests=error --output-on-failure`): **4/4 passed** (`33.59s`: `compute_store_aot_heap_view_load_warp` `9.25s`, `compute_load_format_controls` `0.95s`, `compute_heap_view_controls` `0.90s`, `compute_store_aot_descriptor_load_format_warp` `33.29s`) - `sccache`: 0/3 hits; wall `90.6s` AI-assisted; commands listed were executed locally.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!2347
No description provided.