Skip to content

tests: run six descriptor load format launches at once - #2568

Merged
R0Y00 merged 3 commits into
R0Y00:mainfrom
tedin7:x2w-speed-load-format-threads
Nov 25, 2026
Merged

R0Y00 merged 3 commits into
R0Y00:mainfrom
tedin7:x2w-speed-load-format-threads

Conversation

@tedin7

@tedin7 tedin7 commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Part of #448

What this unblocks: a shorter compute_store_aot_descriptor_load_format_warp, so Win2025 slots free up sooner.

Change: tests/compute_load_format_check.py draw already runs its dispatches and mutated-source compiles on a thread pool (4 workers). This raises the pool to 6 (a named constant, LAUNCH_THREADS). No check is added, removed or weakened; every case still checks the same message in the same order.

Before/after on Win2025 (Build 26100, MSVC 14.44.35207, D3D12 WARP, 11 vCPU slot, --preset dev), head 74a4e5e4487b6a097d9ce1e4c128c0328150c922. Same test, LAUNCH_THREADS = 4 ("before") against = 6 ("after"), three runs each on the shared VM:

Workers ctest seconds Median
4 36.94, 39.13, 27.20 36.94 s
6 29.16, 26.09, 26.91 26.91 s

That is about 27% lower at the median. The 4-worker run of 27.20 s ran at a quiet moment; the VM is shared, so single runs are noisy. An independent paired run on Windows 11 (comment above) also measured a 16% lower median (26.5 s -> 22.3 s). Both runs pass the same cases.

Verification (Win2025, exact head 74a4e5e4487b6a097d9ce1e4c128c0328150c922):

  • cmake --build --preset dev -- -j 2 -> nothing to build (test-only Python change; 0.00 s)
  • ctest --preset dev -R 'compute_store_aot_descriptor_load_format|compute_load_format' --parallel 2 --no-tests=error --output-on-failure -> 3/3 passed (38.18 s)
  • cmake --build --preset release -- -j 2 -> nothing to build (0.00 s)
  • ctest --preset release -R 'compute_store_aot_descriptor_load_format|compute_load_format' --parallel 2 --no-tests=error --output-on-failure -> 3/3 passed (33.53 s)
  • python3 tests/compute_heap_view_check.py and python3 tests/compute_load_format_check.py -> ok
  • Linux: python3 -B tests/compute_load_format_check.py controls -> exit 0; git diff --check -> clean

AI-assisted; commands listed were executed locally.

@tedin7

tedin7 commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator Author

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

  • Debug (--preset dev):
    • Build (cmake --build --preset dev -- -j 2): 0.00s (configure 0.00s)
    • Test (ctest --preset dev -R 'compute_store_aot_descriptor_load_format|compute_load_format' --parallel 2 --no-tests=error --output-on-failure): 3/3 passed (38.18s: compute_store_aot_descriptor_load_format_hardware 36.87s, compute_load_format_controls 0.82s, compute_store_aot_descriptor_load_format_warp 37.95s)
  • Release /O2 (--preset release):
    • Build (cmake --build --preset release -- -j 2): 0.00s (configure 0.00s)
    • Test (ctest --preset release -R 'compute_store_aot_descriptor_load_format|compute_load_format' --parallel 2 --no-tests=error --output-on-failure): 3/3 passed (33.53s: compute_load_format_controls 0.65s, compute_store_aot_descriptor_load_format_hardware 32.45s, compute_store_aot_descriptor_load_format_warp 33.39s)
  • Windows Python checks: tests/compute_heap_view_check.py ok (0.6s), tests/compute_load_format_check.py ok (0.8s)
  • sccache: 87/155 hits; wall 79.3s

AI-assisted; commands listed were executed locally.

@tedin7
tedin7 marked this pull request as ready for review November 25, 2026 21:38
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
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-25T21:39:55.315209Z 74a4e5e 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.

@RavenCurseBurg

Copy link
Copy Markdown
Contributor

I ran a paired four/six-worker comparison on Windows 11 26100.9711 with 24 logical CPUs and WARP 10.0.26100.9711. The two worktrees were the merge base 34e1637e and this head 74a4e5e4. I used the normal python -B tests/compute_load_format_check.py draw <dxc> <offscreen_check> warp entry point in each, with the same DXC 1.9.2609, Python 3.14.3 and Release renderer. The renderer was built at f0402dd1; its native sources match both revisions.

Workers Measured wall time (seconds) Median
4 28.128, 24.925, 26.529 26.529 s
6 22.268, 22.097, 23.042 22.268 s

I ran one warm-up for each configuration, then measured in order 4/6, 6/4, 4/6. Six workers reduced the local median by 4.261 s (16.1%). All eight runs exited 0 with byte-identical stdout, including the seven dispatches, 14 wrong references and 11 shader mutations. The only stderr difference was the temporary directory in DXC's diagnostic for mutated source 31. These timings are for the WARP test in isolation on this machine.

@tedin7

tedin7 commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator Author

@RavenCurseBurg thanks for the paired run. Six workers gave a 16.1% lower median (26.529 s -> 22.268 s) with byte-identical output, which matches the speed-up this PR targets. No code change needed; head stays 74a4e5e4, CI and the Win2025 dev+release receipt above are on that exact head. Ready for review and merge.

AI-assisted; commands listed were executed locally.

@R0Y00
R0Y00 merged commit a0c810c into R0Y00:main Nov 25, 2026
5 checks passed
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.

3 participants