tests: split four long CPU checks into parallel ctest cases #2481
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2489"
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-25T18:16:52Z.
Part of #870 (no open CI-time issue found; nearest orchestration issue)
What this unblocks: shorter Windows checks per merge.
cpu_aot_sse_fp_pd,cpu_aot_x87_fprem,cpu_aot_x87_scaleandcpu_aot_xchgeach run one long Python check in a single CTest case (27-44 s each). This change splits each check into parallel CTest cases, so the wall time of each becomes about the longest part. Expected saving: roughly 40-60 s of wall time across the four tests with the parallel pool.Coverage is identical:
check_library,check_target,check_controls,check_lifted,check_native,check_light, and a part selector insse_fp_pd_check.py). Same cases, same asserts, same messages. The originalcheckmode still runs everything, in the original order.<test>_<part>(sse_fp_pd: differential, modes, cmp_differential, cmp_modes;xchgandx87_scale: native, lifted, controls;x87_fprem: lifted, native, controls). Each is a CTest fixture setup.cpu_aot_sse_fp_pd,cpu_aot_xchg,cpu_aot_x87_scale,cpu_aot_x87_fprem) are kept. Each now runs the cheap remainder (rejections, or the hand-worked model plus rejections) and requires all its parts throughFIXTURES_REQUIRED. If any part fails, the original is "Not Run" (JUnitnotrun), sotools/form_coverage.pyand the; coverage: source <name>headers still count the fixture only when every part passed. The docs commandsctest -R '^cpu_aot_xchg$'still run the parts automatically.form_coverage.pyis not affected.Verification:
python3 -m py_compile tests/cpu/xchg.py tests/cpu/x87_scale.py tests/cpu/x87_fprem.py tests/cpu/sse_fp_pd_check.py-> OK.ctest -j2 --output-junitgives the original asNot Runandstatus="notrun"in the JUnit file.check(...)equals the union of the calls made by the parts.xchg: 13 calls both ways;x87_scale: 19 both ways;x87_fprem: 14 both ways.sse_fp_pd_check.py: with no part it runs the same five checks as before; the five parts are those five checks, one each.AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by ChazY11 on 2026-11-25T18:39:59Z.
The split is wired correctly, and I verified the part that matters by running it
Three things I checked mechanically rather than by reading:
1. A failing part makes the aggregate fail — it is not a silent skip. The build products for
cpu_xchg_liftedandcpu_xchg_controlsdo not exist on this machine, so the parts fail for a real reason and I could watch the wiring:Not Runlands in the FAILED summary, not in the capability-skip bucket, which is the property that makesFIXTURES_REQUIREDsafe here. If it had come back as a skip (77) instead, a broken part could have looked like an unavailable adapter.2. Every part of each aggregate is required. Three of the four parse cleanly from the CMake text:
cpu_aot_sse_fp_pdis aforeach(part IN ITEMS …)loop, which my regex cannot follow — I counted it by hand instead: four parts registered (differential,modes,cmp_differential,cmp_modes) andx2w_require_check_parts(cpu_aot_sse_fp_pd differential modes cmp_differential cmp_modes), so it is alsook. My parse flagging it is a limitation of the check, not a finding.3. No form-coverage record is lost. None of these four tests set
FORM_COVERAGE_RECORDonmaineither, so the split does not drop a record that used to exist.What the aggregate still covers
cpu_aot_xchgnow runscheck-rejections— the part that needs no fixture — and the three DLL checks run in parallel. That is the right remainder: the rejection cases are cheap and independent, and keeping them on the aggregate meansctest -R '^cpu_aot_xchg$'still exercises something rather than being an empty gate.One thing to decide deliberately
The script keeps its old
checkmode (check_librarynative + lifted +check_controls+check_rejections) even though CTest no longer calls it. That is harmless and useful for a human running the file directly — but it does mean a localpython tests/cpu/xchg.py check …takes the full serial path, while CTest takes the parallel one. Worth a sentence in the file header so the next person does not conclude the parts are the only coverage.Caveat on my verification
I could not run the split to completion — the lifted DLLs are not built here (full CMake build fails in DXC on this host with
unable to create compilation: AccessDenied, unrelated to this PR). What I verified is the CTest wiring and the failure propagation, plus thatcpu_aot_xchg_nativepassed on its own, which at least shows a part can succeed independently of the aggregate.AI-assisted; the
ctestruns were executed locally on Windows 11 build 26300.9974.Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T18:54:55Z.
Thanks for running the wiring. The header note is in
db75c505.tests/cpu/xchg.pyheader now says CTest runs check-native, check-lifted and check-controls as parallel cases and keeps check-rejections on the aggregate, and thatcheckstill runs every part serially for a direct run.x87_fprem.pyandx87_scale.py;sse_fp_pd_check.pysays that passing no part name still runs all five parts serially.Commands run locally (Linux):
python3 -B -m py_compileon the four files (ok),git diff --check(clean). Win2025 dev+release on the new head is still pending.AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T19:42:10Z.
The Win2025 run on
db75c505found a real bug in this split:cpu_aot_x87_scaleandcpu_aot_x87_fpremcallcheck-rejections/check-lightwith no file paths, and the oldmode, first, second, *rest = sys.argv[1:]raisedValueError: not enough values to unpack(both aggregates failed in 0.13 s). Fixed in70be1807: the mode is read first and the paths are optional. Linux repro before the fix:python3 tests/cpu/x87_scale.py check-rejectionsstopped at the unpack; after it, it gets past argument parsing. Receipt on the new head:Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit
70be180770d5a3484edc0ed18685ec1b1d484267:--preset dev):cmake --build --preset dev --target cpu_xchg cpu_xchg_lifted cpu_xchg_oneway cpu_xchg_plain cpu_sse_fp_pd_original cpu_sse_fp_pd_original_lifted cpu_sse_fp_pd_altered_lifted cpu_sse_fp_harness cpu_x87_harness cpu_x87_fprem cpu_x87_fprem_d63 cpu_x87_fprem_halfnear cpu_x87_fprem_lifted cpu_x87_fprem_nonan cpu_x87_fprem_nopartial cpu_x87_fprem_qswap cpu_x87_fprem_tieup cpu_x87_fprem_truncate1 cpu_x87_fprem_zerosign cpu_x87_scale cpu_x87_scale_chop cpu_x87_scale_floor cpu_x87_scale_lifted cpu_x87_scale_neginf cpu_x87_scale_pc53 cpu_x87_scale_swap cpu_x87_scale_zeroinf -- -j 2):6.60s(configure0.00s)ctest --preset dev -R '^cpu_aot_(sse_fp_pd|x87_fprem|x87_scale|xchg)(_native|_lifted|_controls|_differential|_modes|_cmp_differential|_cmp_modes)?$' --parallel 2 --no-tests=error --output-on-failure): 17/17 passed (97.69s:cpu_aot_x87_scale_controls22.26s,cpu_aot_xchg_controls29.74s,cpu_aot_sse_fp_pd_modes27.53s,cpu_aot_x87_scale_lifted21.65s,cpu_aot_x87_scale_native20.25s,cpu_aot_x87_fprem_native28.42s,cpu_aot_xchg_native11.11s,cpu_aot_xchg_lifted8.96s,cpu_aot_x87_fprem_controls8.67s,cpu_aot_x87_fprem_lifted6.50s,cpu_aot_sse_fp_pd_differential2.61s,cpu_aot_sse_fp_pd_cmp_modes5.26s,cpu_aot_sse_fp_pd_cmp_differential0.69s,cpu_aot_x87_scale0.29s,cpu_aot_xchg0.24s,cpu_aot_sse_fp_pd0.32s,cpu_aot_x87_fprem0.26s)/O2(--preset release):cmake --build --preset release --target cpu_xchg cpu_xchg_lifted cpu_xchg_oneway cpu_xchg_plain cpu_sse_fp_pd_original cpu_sse_fp_pd_original_lifted cpu_sse_fp_pd_altered_lifted cpu_sse_fp_harness cpu_x87_harness cpu_x87_fprem cpu_x87_fprem_d63 cpu_x87_fprem_halfnear cpu_x87_fprem_lifted cpu_x87_fprem_nonan cpu_x87_fprem_nopartial cpu_x87_fprem_qswap cpu_x87_fprem_tieup cpu_x87_fprem_truncate1 cpu_x87_fprem_zerosign cpu_x87_scale cpu_x87_scale_chop cpu_x87_scale_floor cpu_x87_scale_lifted cpu_x87_scale_neginf cpu_x87_scale_pc53 cpu_x87_scale_swap cpu_x87_scale_zeroinf -- -j 2):97.70s(configure0.00s)ctest --preset release -R '^cpu_aot_(sse_fp_pd|x87_fprem|x87_scale|xchg)(_native|_lifted|_controls|_differential|_modes|_cmp_differential|_cmp_modes)?$' --parallel 2 --no-tests=error --output-on-failure): 17/17 passed (78.90s:cpu_aot_sse_fp_pd_differential2.46s,cpu_aot_sse_fp_pd_cmp_differential0.76s,cpu_aot_sse_fp_pd_cmp_modes5.85s,cpu_aot_sse_fp_pd_modes17.78s,cpu_aot_xchg_native9.71s,cpu_aot_xchg_lifted9.70s,cpu_aot_xchg_controls17.19s,cpu_aot_x87_scale_native13.92s,cpu_aot_x87_scale_lifted13.98s,cpu_aot_x87_fprem_lifted7.72s,cpu_aot_x87_scale_controls17.47s,cpu_aot_x87_fprem_controls9.63s,cpu_aot_sse_fp_pd0.34s,cpu_aot_xchg0.28s,cpu_aot_x87_scale0.31s,cpu_aot_x87_fprem_native20.81s,cpu_aot_x87_fprem0.27s)sccache: -97/-163 hits; wall196.2sAI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T21:11:11Z.
Merged current main into this branch (merge commit, no code change from us). Receipt on the new head:
Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit
efdbf561bde0b12fe95995b765c31d1e36d46b01:--preset dev):cmake --build --preset dev --target cpu_x87_fldcw_constnearest cpu_x87_fldcw_deferred cpu_x87_fldcw_fistnearest cpu_x87_fldcw_fninitsw cpu_x87_fldcw_fninitword cpu_x87_fldcw_lifted cpu_x87_fldcw_noreturn cpu_x87_fldcw_nounmasked cpu_x87_fldcw_onereturn cpu_x87_fldcw_pc01 cpu_x87_fldcw_pc53 cpu_x87_fldcw_rawword cpu_x87_fldcw_rcnearest cpu_x87_fldcw_swaddr cpu_x87_fldcw_swbyte cpu_x87_fldcw_swnone cpu_x87_fldcw_swtop cpu_x87_fldcw_swwide cpu_x87_fprem cpu_x87_fprem_d63 cpu_x87_fprem_halfnear cpu_x87_fprem_lifted cpu_x87_fprem_nonan cpu_x87_fprem_nopartial cpu_x87_fprem_qswap cpu_x87_fprem_tieup cpu_x87_fprem_truncate1 cpu_x87_fprem_zerosign cpu_x87_scale cpu_x87_scale_chop cpu_x87_scale_floor cpu_x87_scale_lifted cpu_x87_scale_neginf cpu_x87_scale_pc53 cpu_x87_scale_swap cpu_x87_scale_zeroinf cpu_xchg_lifted cpu_xchg_oneway cpu_xchg_plain -- -j 2):6.77s(configure0.00s)ctest --preset dev -R '^cpu_aot_(sse_fp_pd|x87_fprem|x87_scale|xchg)(_native|_lifted|_controls|_differential|_modes|_cmp_differential|_cmp_modes)?$' --parallel 6 --no-tests=error --output-on-failure): 17/17 passed (26.68s:cpu_aot_x87_scale_lifted15.71s,cpu_aot_x87_scale_native15.76s,cpu_aot_x87_scale_controls17.46s,cpu_aot_sse_fp_pd_modes18.13s,cpu_aot_xchg_controls20.62s,cpu_aot_x87_fprem_native20.89s,cpu_aot_sse_fp_pd_differential2.42s,cpu_aot_sse_fp_pd_cmp_differential0.72s,cpu_aot_x87_scale0.30s,cpu_aot_x87_fprem_lifted6.72s,cpu_aot_xchg_native9.89s,cpu_aot_sse_fp_pd_cmp_modes5.06s,cpu_aot_xchg_lifted9.94s,cpu_aot_xchg0.25s,cpu_aot_sse_fp_pd0.31s,cpu_aot_x87_fprem_controls8.86s,cpu_aot_x87_fprem0.24s)/O2(--preset release):cmake --build --preset release --target cpu_x87_fldcw_constnearest cpu_x87_fldcw_deferred cpu_x87_fldcw_fistnearest cpu_x87_fldcw_fninitsw cpu_x87_fldcw_fninitword cpu_x87_fldcw_lifted cpu_x87_fldcw_noreturn cpu_x87_fldcw_nounmasked cpu_x87_fldcw_onereturn cpu_x87_fldcw_pc01 cpu_x87_fldcw_pc53 cpu_x87_fldcw_rawword cpu_x87_fldcw_rcnearest cpu_x87_fldcw_swaddr cpu_x87_fldcw_swbyte cpu_x87_fldcw_swnone cpu_x87_fldcw_swtop cpu_x87_fldcw_swwide cpu_x87_fprem cpu_x87_fprem_d63 cpu_x87_fprem_halfnear cpu_x87_fprem_lifted cpu_x87_fprem_nonan cpu_x87_fprem_nopartial cpu_x87_fprem_qswap cpu_x87_fprem_tieup cpu_x87_fprem_truncate1 cpu_x87_fprem_zerosign cpu_x87_scale cpu_x87_scale_chop cpu_x87_scale_floor cpu_x87_scale_lifted cpu_x87_scale_neginf cpu_x87_scale_pc53 cpu_x87_scale_swap cpu_x87_scale_zeroinf cpu_xchg_lifted cpu_xchg_oneway cpu_xchg_plain -- -j 2):26.69s(configure0.00s)ctest --preset release -R '^cpu_aot_(sse_fp_pd|x87_fprem|x87_scale|xchg)(_native|_lifted|_controls|_differential|_modes|_cmp_differential|_cmp_modes)?$' --parallel 6 --no-tests=error --output-on-failure): 17/17 passed (34.45s:cpu_aot_sse_fp_pd_cmp_differential0.77s,cpu_aot_sse_fp_pd_differential2.42s,cpu_aot_sse_fp_pd_cmp_modes5.04s,cpu_aot_xchg_native10.22s,cpu_aot_xchg_lifted10.48s,cpu_aot_sse_fp_pd_modes16.52s,cpu_aot_x87_scale_native14.53s,cpu_aot_x87_fprem_lifted6.69s,cpu_aot_sse_fp_pd0.33s,cpu_aot_xchg_controls17.00s,cpu_aot_xchg0.26s,cpu_aot_x87_scale_lifted14.52s,cpu_aot_x87_fprem_controls8.29s,cpu_aot_x87_scale_controls15.59s,cpu_aot_x87_scale0.25s,cpu_aot_x87_fprem_native17.59s,cpu_aot_x87_fprem0.24s)sccache: 74/74 hits; wall74.1sAI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-25T21:11:26Z.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
efdbf56ℹ️ 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.