Tests: add split_wave64_spin_exchange_updates_block_tails regression test #1918
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1928"
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 ivall/xcl. Originally posted by Decodere on 2026-11-24T23:33:40Z.
What is in it
Part of #1889. Part of #1269.
Follow-up rebase of #1928 onto
main(50a9fdef, resolving the EOFlower_dxil::testsconflict with #2074): bothself.tails[self.cur] = self.lw.cur();sync lines inDxilIr::ballotandDxilIr::read_lanelanded in #2203, so this PR now contains only the standalonesplit_wave64_spin_exchange_updates_block_tailsregression test incrates/xcl/src/gpu/recomp/lower_dxil.rs(+81/-0, zero runtime changes):[128, 1, 1]split-wave64 (Partner::Spin) compute shaders throughlower_dxil::compute_split:s_bcnt1_i32_b64) in a uniform branch arm feeding a join PHI.v_readlane_b32(lane 37) in a uniform branch arm feeding a join PHI.v_readfirstlane_b32(ballot + read_lane) inside a uniform loop feeding back-edge PHIs.run_compute_waves.Tested
1.9.2609.5, release build.cargo test --release -p xcl --lib gpu::recomp::lower_dxil::tests::split_wave64_spin_exchange_updates_block_tails -- --exact --nocapture): 1 passed, 0 failed, 0 ignored (0.26 s,0skipped, full DXIL validation + RTX 4060 GPU dispatch parity againstrun_compute_waves).lower_dxilmodule suite (cargo test --release -p xcl --lib gpu::recomp::lower_dxil::tests -- --test-threads=4 --nocapture --skip a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier): 21 passed, 0 failed, 0 ignored (0.54 s,17runtimeSKIPPEDlines on RTX 4060:14no wave64+3wave32 per-lanerefused;a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrieris skipped because it currently fails on unmodifiedorigin/main50a9fdefCI run45656870453).cargo build --release --bin xcl: passed.Regression run
Baseline (
origin/main50a9fdef81cb796b8756a31defb0648301d002ce):PR head (
971322597fd998d65e945a01b6881e5a099e4dc4):Not tested
lower_dxilsubcases on this wave32-only RTX 4060 (the 3 new split-wave64Partner::Spincases themselves all ran on the RTX 4060).97132259(diff is test-only inside#[cfg(test)] mod testsoflower_dxil.rswith zero runtime code changes; targetedlower_dxil::tests21/0 and paired 60 s smoke ran on97132259).AI use
Rebased onto
main, verified, and updated with Google Antigravity (Gemini 4 Neon). All targeted GPU tests and paired 60 s RTX 4060 smoke runs were executed locally.Imported from ivall/xcl. Originally posted by WebIdentity1 on 2026-11-24T23:38:44Z.
Independent Ampere check of exact head
79a7e326cc1b1419603f9a14e22dc7331f6287fd: the new regression passes on RTX 3090, driver 591.74, Ryzen 7 7800X3D, Windows 10 19045, Rust 1.98.1 MSVC, DXC 1.8.2502.11, debug.cargo test --locked -p xcl --lib split_wave64_spin_exchange_updates_block_tails -- --test-threads=1 --show-output, withXCL_ADAPTER=3090:ballot diamondfails DXIL validation withPHI node entries do not match predecessors!, before GPU dispatch.Both builds recompiled XCL. All 310 source hashes matched before/after each run; the pair differs only in those block-tail updates. This adds an older Ampere/driver check to the author's Ada result.
Not tested: full workspace suite for this head, retail smoke/gameplay, native wave64, or performance. No implementation change is proposed.
AI use: Codex with GPT-6 Astra inspected the fix and test, ran the comparison, and drafted this report.
Imported from ivall/xcl. Originally posted by upipibi on 2026-11-24T23:42:27Z.
NVIDIA run: RTX 3070 8 GB (32-lane waves, split wave64), driver 616.56, Windows 11, debug,
79a7e32merged ontomain20cf130(clean).split_wave64_spin_exchange_updates_block_tails: passes.XCL_DIRECT_DXIL=1 cargo test -p xcl --lib -- gpu_ --skip gpu_sparse_vram --test-threads=4: 110 passed, 0 failed, 1 ignored, the same asmainon this machine. The sparse test was skipped because of #1727.AI-assisted (Claude Code). Synthetic tests only.
Imported from ivall/xcl. Originally posted by upipibi on 2026-11-25T00:34:23Z.
Re-checked
87adc4bon the RTX 3070 (driver 616.56, Windows 11, debug).split_wave64_spin_exchange_updates_block_tailspasses, and thegpu_tests withXCL_DIRECT_DXIL=1give 111 passed, the same asmain.AI-assisted (Claude Code).
Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-25T01:08:16Z.
Diff audit passed (
lower_dxil.rsself.tails[self.cur] = self.lw.cur()after split-wave64ballotandread_lane_uniform, plus the 3 regression cases),Build and test+PR descriptionare green on87adc4b, and NVIDIA (RTX 3090, RTX 3070) verified it.Remaining before merge: one independent AMD GPU pass on
87adc4b.Imported from ivall/xcl. Originally posted by Decodere on 2026-11-25T02:03:27Z.
Rebased cleanly onto
main(3da2abb8) at3990660aresolving only thecrates/xcl/src/gpu/recomp/lower_dxil.rsend-of-file test conflict from#1865; the runtime fix inDxilIr::ballot/DxilIr::read_laneis unchanged.Re-verified locally on RTX 4060 (release):
gpu::recomp::lower_dxil(19 passed, 0 failed), full workspace (1,112 passed, 0 failed, 46 ignored), and paired 60 sscripts/smoke.ps1(1,582 -> 1,526frames,0crashes/removals). Ready for CI and the remaining independent AMD GPU check.AI use: Google Antigravity (Gemini 4 Neon).
Imported from ivall/xcl. Originally posted by gefydev on 2026-11-25T02:18:13Z.
Review: COMMENTED
Review of
87adc4bfrom the per-lane form's side (#1745). I read it againstmain3da2abb; I did not run it.The fix is right.
Lw::ballotandLw::read_lane_uniformgo throughspin_exchangewhen a group has more than one console wave (Partner::Spin), which ends the current block, andDxilIrwas still wiring successor phis to the block before the exchange.foreignalready resyncstails[cur]afterinst_guardedfor the same reason; these two were missed when the split exchanges were routed throughLw.I checked the other
DxilIrpaths that reachLwin the split form:read_lane_half(wave_read_lane_atonl & 31),ballot_half(wave_ballot), the loads and stores, andcompute_idsemit no blocks. So after this change, every place that can split a block resyncs its tail.Two notes:
br/br_ifcould setself.tails[self.cur] = self.lw.cur()before they terminate. The terminator is always inlw.cur(), so this one line would keep the tails right for any futureIrmethod that makes blocks, and it would replace the three separate syncs. Fine to leave as it is if you prefer the change minimal.mainnow, inlower_dxil.rs, probably the end of the test module after the recent per-lane merges (#2014, #1865). It needs a rebase.Review written with Claude Code (Claude Opus 5.5); I checked each point against the code.
Imported from ivall/xcl. Originally posted by Decodere on 2026-11-25T02:20:53Z.
@gefydev Thank you for auditing every
DxilIrpath against the per-lane form (#1745)! Good news: head3990660ais already rebased cleanly ontomain(3da2abb8, resolving thelower_dxil.rsEOF test conflict from#1865),MERGEABLE, and green on CI. We'll keep the minimal explicitself.tails[self.cur] = self.lw.cur()syncs inballotandread_lane(matchingforeign) to keep the fix tight and focused.Imported from ivall/xcl. Originally posted by gefydev on 2026-11-25T02:21:29Z.
@Decodere thank you: noted that
3990660ais rebased ontomain(3da2abb8), mergeable and green on CI, and that you keep the explicit tail syncs inballotandread_lane, matchingforeign. That is fine with us; thebr/br_ifresync was only an optional suggestion. The merge is for the maintainer.AI use: Claude Code (Claude Opus 5.5) wrote this reply for @gefydev.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T02:33:51Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T02:53:58Z.
Tested
Independent Intel Arc A770 compatibility check for XCL PR #1928 at
3990660af24ecbd02d7ece38ee946a0626dee211. The PR was open at this commit before and after the run. The detached checkout was clean both times.NativeCommandErrorin the captured log.Windows 11 Enterprise Evaluation 26200.9974, AMD Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175, Rust 1.100.0 (
0ef1bc386,x86_64-pc-windows-msvc), Cargo 1.100.0, DXC/DXIL 1.9.2609.5 (01b62ad4), unoptimized test profile with debug assertions on and debuginfo off.Process environment for the build and run
Prebuild outside the Arc lock and graphics execution inside it
The temporary
RemoteSignedpolicy applied only to the child PowerShell process running the local lock wrapper.Not tested
Full workspace suite, comparison against
mainor the pre-fix revision, retail-title smoke or gameplay, native wave64, other adapters, release profile, and performance.AI use
T3 Code / Codex (gpt-6.2-sol) verified the exact PR head, ran the checked-in test, and prepared this report.
Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-25T04:30:39Z.
RX 6800M Direct DXIL GPU verification for PR #1928 at
3990660af24ecbd02d7ece38ee946a0626dee211Setup: Windows 11 build 26200, AMD Radeon RX 6800M (driver
30.0.13002.13003), Ryzen 9 5980HX, Rust1.99.0MSVC, DXC/DXIL1.9.2609.5. Clean exact-head checkout;XCL_ADAPTER=6800M,XCL_REQUIRE_GPU=1,XCL_DIRECT_DXIL=1.Tested
cargo test --locked -p xcl --lib -j 2 split_wave64_spin_exchange_updates_block_tails -- --test-threads=1 --show-output: 1 passed, 0 failed, 0 ignored, noSKIPPED. The test compiles three[128, 1, 1]split-wave64 cases, dispatches each on the GPU, and compares all output words with the CPU model.gpu::recomp::lower_dxil: 19 passed, 0 failed, 0 ignored. Six per-lane f16/conversion subcases printedSKIPPEDfor unsupported#1426opcodes; those are not GPU coverage.cargo build --locked --workspace -j 2: passed.Not tested: Full workspace suite, paired retail-title smoke, other GPUs, or a title's live Direct DXIL per-lane path. This is focused AMD validation of the regression, not a claim that the full PR is ready to merge. No game data was used.
AI assistance: OpenAI Codex (GPT-6) ran the commands, extracted counts and skips from the logs, and drafted this report.
Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-25T10:46:56Z.
Note after recent merges on
main: bothself.tails[self.cur] = self.lw.cur();sync lines inDxilIr::ballotandDxilIr::read_lane(crates/xcl/src/gpu/recomp/lower_dxil.rs) landed as part of #2203.If you'd still like to land
split_wave64_spin_exchange_updates_block_tailsas a standalone regression test, rebasing#1928ontomainto keep only the test will make it merge-ready cleanly (or it can be closed if not needed separately).[PR #1928] Recompiler: update per-lane DXIL block tail after split exchangesto [PR #1928] Tests: add split_wave64_spin_exchange_updates_block_tails regression testImported from ivall/xcl. Originally posted by Decodere on 2026-11-25T11:45:46Z.
@raylitebull Thanks for the heads-up — rebased #1928 onto
main(19b8bd51), dropping the two runtime sync lines that landed via #2203 and keeping only the standalonesplit_wave64_spin_exchange_updates_block_tailsregression test (+81/-0, zero runtime diff). Re-verified on RTX 4060 (1/0,lower_dxil::tests21/0, paired 60 s smoke1548 -> 1521,0removals/crashes).AI use: rebased, tested, and drafted with Google Antigravity (Gemini 4 Neon).
Imported from ivall/xcl. Originally posted by Decodere on 2026-11-25T17:14:06Z.
Rebased onto
50a9fdef(97132259, resolving thelower_dxil::testsEOF conflict with#2074). Re-verifiedsplit_wave64_spin_exchange_updates_block_tails(1/0),lower_dxil::testsexcluding#2074(21/0), and paired 60 s RTX 4060 smoke (1544 -> 1606,0device removals/crashes).Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T06:41:21Z.
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.Thanks!
— Devin
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T07:06:17Z.
Triage (#1607) – head
9713225Test-only follow-up for #1889. The fix it covers (
self.tails[self.cur] = self.lw.cur()inDxilIr::ballot/read_lane) is on main from #2203 (283068c8). Main's tests from that commit (split_wave64_wave_branches_on_the_gpu,split_wave64_dead_scc_skips_exchange_barrier) test wave branches and the SCC elision. None of them is a ballot / readlane / readfirstlane result that feeds a join or loop phi, which is what this test covers. No other open PR adds this test.One gap: without a GPU the test only calls
compute_splitand returns. Main's neighbouring tests callvalidate::validatewhenvalidator_supported(). Doing the same here would catch the malformed phi predecessors on a machine with no GPU.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.