tests: cache and parallelize form_coverage_check control runs #1520
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1527"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T13:40:35Z.
Cache and parallelize
tests/pixel_aot_check.check_controlsacrosstests/form_coverage_check.pywith zero dropped assertions and set-identicalACCEPTEDcoverage.Summary
tests/form_coverage_check.py:pixel.ACCEPTEDincheck_plain_bitscan_forms(withtry ... finally) so it no longer clears the set populated bypixel.check_controls._controls_accepted()to runpixel.check_controlsonce per process and reuse the cachedfrozensetacrosscheck_shader_records,check_swap_coverage, andcheck_pk_fmac_coverage.tests/pixel_aot_check.py:_check_controls_inline(directory)and run them viaconcurrent.futures.ProcessPoolExecutorincheck_controls(directory)while the parent executes the inline body, collectingACCEPTEDsets deterministically across workers with a clean serial fallback (X2W_SERIAL_CONTROLS=1, single-core, or pool creation failure).Verification
Commit under test:
x2w-opt-form-coverageonorigin/main(1ca0dec1).origin/mainbefore change,python -B tests/form_coverage_check.py):75.017s(exit 0,form coverage checks passed)python -B tests/form_coverage_check.py, 2x back-to-back on 16-core Linux):11.574s(exit 0,form coverage checks passed)load average: 16.91):14.050sand17.400s(bothexit 0,form coverage checks passed)python -B tests/pixel_aot_check.py:6.379s(exit 0)check_controls(..., parallel=False)vscheck_controls(..., parallel=True)vsform_coverage_check._controls_accepted()):SET_IDENTICAL=True count=788(serial=24.525s,parallel=5.219s)python -B tests/docs_links_check.py: passed (16 Markdown files and 340 links)python -B tests/bidi_controls_check.py: passed (1239 tracked source, script and build/CI files: no bidirectional controls)git diff --check origin/main..HEAD: passedAI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T14:30:54Z.
Review: COMMENTED
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:
a4daf98481ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T14:44:16Z.
Review: COMMENTED
No description provided.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T14:23:28Z.
Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit
a4daf98481cedba25989ed41391c11a89c7dbfe7:--preset dev):cmake --build --preset dev --target offscreen_check -- -j 6):34.16s(configure1.85s)ctest --preset dev -R '^pixel_aot_warp$' --parallel 4 --no-tests=error --output-on-failure): 1/1 passed (13.98s:pixel_aot_warp13.90s)/O2(--preset release):cmake --build --preset release --target offscreen_check -- -j 6):45.20s(configure1.93s)ctest --preset release -R '^pixel_aot_warp$' --parallel 4 --no-tests=error --output-on-failure): 1/1 passed (12.84s:pixel_aot_warp12.76s)spawn):tests/form_coverage_check.py: passed (18.02s)tests/pixel_aot_check.py: passed (9.56s)tests/form_coverage_check.py:75.0sbaseline ->16.90s/14.60sback-to-back (exit 0,form coverage checks passed)tests/pixel_aot_check.py:5.86s(exit 0)check_controls(..., parallel=False)vscheck_controls(..., parallel=True): identicalACCEPTEDset (788forms),27.88sserial ->7.34sparallelValueErrorraisesRuntimeErrornaming the failing sub-task and cancels pending futuresorigin/mainProcessPoolExecutormax_workersat61to respect Windows_MAX_WINDOWS_WORKERSon >61-core hosts_check_controls_inlineor any worker sub-check failsAI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T14:23:41Z.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
a4daf98ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T14:30:55Z.
Code review location:
tests/pixel_aot_check.py; line 15789When worker creation is denied or a process limit is exhausted, this submission raises instead of taking the serial fallback:
ProcessPoolExecutorstarts workers lazily insubmit(), outside the constructor-only exception handler. Reproduced on Linux/Python 3.12 in an unprivileged process withRLIMIT_NPROC=(0, 0): the parent commit passes with 788 accepted forms, but this commit raisesBlockingIOError(11, 'Resource temporarily unavailable'); explicit serial mode also passes under the same limit. Consequently, the default pixel-control and form-coverage checks regress on these hosts. Include initial submission and worker startup in the startup-failure fallback while continuing to propagate actual check failures.Useful? React with 👍 / 👎.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T14:44:16Z.
Code review location:
tests/pixel_aot_check.py; line 15789Fixed in
1ed17b653be6eb6ba628cf1c3911d75ec55e7ea0.check_controls()now wrapsexecutor.submit()in the startup-failure fallback handler: if lazy worker/thread creation fails during submission (e.g.BlockingIOErrorunderRLIMIT_NPROCorPermissionError), any already-submitted futures are cancelled, the pool exits cleanly viawith executor:, and the inline + serial control checks run to completion. Actual worker check failures fromfuture.result()still cancel pending futures and propagate asRuntimeErrorwithout falling back to serial.Verified locally:
BlockingIOErroron 2ndProcess.startwith realProcessPoolExecutor) falls back cleanly and validates all 788 accepted forms; workerAssertionErrorpropagates without serial fallback.tests/pixel_aot_check.pyandtests/form_coverage_check.pypass./O2):tests/form_coverage_check.py(16.1s),tests/pixel_aot_check.py(8.9s), andpixel_aot_warp/pixel_aot_f16_arith_warppass (2/2 Debug, 2/2 Release).AI-assisted; commands listed were executed locally.
upstream-sync referenced this pull request2026-11-24 16:03:27 +00:00