Tests: check divergent block barriers in a_bridged_mask_write #2420

Manually merged
github merged 1 commit from gh-pr/2420/head into gh-pr/2420/base 2026-11-26 05:30:25 +00:00
Owner

@⁠Ritolino on GitHub · 2026-11-25 18:22 UTC · original
Ritolino:test/bridged-mask-write-barrier-check → main · +4 −3 · 1 files · 1 commits · merged 2026-11-25 18:45 UTC

Fixes gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier failing on main (left: 3, right: 1).

After whole-wave branches (#2178), the entry block before \n br legitimately contains the xcl_xw setup barrier and the two split-wave xcl_xs exchange barriers (total 3 barriers in the module), while the divergent half-only block (<label>:46) still emits 0 group barriers — which is the invariant introduced by #2074.

What is in it

  • crates/xcl/src/gpu/recomp/lower_dxil.rs (#[cfg(test)] only): update a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier to assert 0 dx.op.barrier calls after the entry \n br terminator instead of 1 barrier across the whole module, while keeping the GPU dispatch check intact (test-only).

Tested

  • Windows 11 x64, AMD Ryzen 9 7950X, NVIDIA GeForce RTX 4080 (wave32), DXC 1.9.2602.17, rustc 1.100.0 (stable-x86_64-pc-windows-msvc), debug (c828d8c)
  • cargo test -p xcl --lib a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier: 1 passed, 0 failed (0.93s)
  • .\scripts\test.ps1 (cargo test --workspace -- --test-threads=4): xcl --lib 1253 passed, 1 failed, 26 ignored (the single failure is the pre-existing NTFS blob_enumeration_sees_one_submitted_update issue tracked in #2421; 23/24 other targets passed).
  • .\scripts\test.ps1 --skip blob_enumeration_sees_one_submitted_update: 1328 passed, 0 failed, 46 ignored, 1 filtered out (SKIPPED GPU tests across workspace: 23 no wave64, 3 per-lane form: refused, 1 no heap windows, 1 no D3D12 debug layer, 1 cannot disable the driver cache (Windows Developer Mode is required)).

Not tested

  • AMD GPU (wave64 / RDNA2–4) — no AMD adapter available locally.
  • scripts/smoke.ps1 (xcl-smoke) — test-only change (#[cfg(test)] only, no runtime files touched) and no Xbox GDK title available locally.

AI use

  • Antigravity with Gemini 4 Neon (Medium) for root-cause analysis and Gemini 4 Hydrogen (Medium) for editing the test assertion and running local verification; reviewed by human.
**@⁠Ritolino** on GitHub · 2026-11-25 18:22 UTC · [original](https://github.com/xcl-dev/xcl/pull/2420) `Ritolino:test/bridged-mask-write-barrier-check` → `main` · +4 −3 · 1 files · 1 commits · merged 2026-11-25 18:45 UTC Fixes `gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier` failing on `main` (`left: 3, right: 1`). After whole-wave branches (`#2178`), the entry block before `\n br ` legitimately contains the `xcl_xw` setup barrier and the two split-wave `xcl_xs` exchange barriers (total `3` barriers in the module), while the divergent half-only block (`<label>:46`) still emits `0` group barriers — which is the invariant introduced by `#2074`. **What is in it** - `crates/xcl/src/gpu/recomp/lower_dxil.rs` (`#[cfg(test)]` only): update `a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier` to assert `0` `dx.op.barrier` calls after the entry `\n br ` terminator instead of `1` barrier across the whole module, while keeping the GPU dispatch check intact (`test-only`). **Tested** - Windows 11 x64, AMD Ryzen 9 7950X, NVIDIA GeForce RTX 4080 (`wave32`), DXC `1.9.2602.17`, `rustc 1.100.0` (`stable-x86_64-pc-windows-msvc`), debug (`c828d8c`) - `cargo test -p xcl --lib a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier`: `1 passed, 0 failed` (`0.93s`) - `.\scripts\test.ps1` (`cargo test --workspace -- --test-threads=4`): `xcl --lib` `1253 passed, 1 failed, 26 ignored` (the single failure is the pre-existing NTFS `blob_enumeration_sees_one_submitted_update` issue tracked in #2421; `23/24` other targets passed). - `.\scripts\test.ps1 --skip blob_enumeration_sees_one_submitted_update`: `1328 passed, 0 failed, 46 ignored, 1 filtered out` (SKIPPED GPU tests across workspace: `23` `no wave64`, `3` `per-lane form: refused`, `1` `no heap windows`, `1` `no D3D12 debug layer`, `1` `cannot disable the driver cache (Windows Developer Mode is required)`). **Not tested** - AMD GPU (`wave64` / RDNA2–4) — no AMD adapter available locally. - `scripts/smoke.ps1` (`xcl-smoke`) — `test-only` change (`#[cfg(test)]` only, no runtime files touched) and no Xbox GDK title available locally. **AI use** - Antigravity with Gemini 4 Neon (Medium) for root-cause analysis and Gemini 4 Hydrogen (Medium) for editing the test assertion and running local verification; reviewed by human.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:30:23 +00:00
github manually merged commit c828d8c091 into gh-pr/2420/base 2026-11-26 05:30:25 +00:00
Author
Owner

@⁠raylitebull on GitHub · 2026-11-25 18:26 UTC · original

Diff review on c828d8c (_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier in crates/xcl/src/gpu/recomp/lower_dxil.rs): check after \n br cleanly isolates barriers past the entry terminator (divergent_barriers == 0) while keeping the test GPU execution check intact, and I have approved CI run 45674546417. Two items needed before merge: (1) complete the truncated PR description with What is in it, Tested (GPU suite counts), Not tested, and AI use (and est-only label if applicable) so PR description passes; (2) add AMD + NVIDIA verification counts for c828d8c.

**@⁠raylitebull** on GitHub · 2026-11-25 18:26 UTC · [original](https://github.com/xcl-dev/xcl/pull/2420#issuecomment-7170914245) Diff review on c828d8c (_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier in crates/xcl/src/gpu/recomp/lower_dxil.rs): check after \n br cleanly isolates barriers past the entry terminator (divergent_barriers == 0) while keeping the test GPU execution check intact, and I have approved CI run 45674546417. Two items needed before merge: (1) complete the truncated PR description with **What is in it**, **Tested** (GPU suite counts), **Not tested**, and **AI use** (and est-only label if applicable) so PR description passes; (2) add AMD + NVIDIA verification counts for c828d8c.
Author
Owner

@⁠ivall on GitHub · 2026-11-25 18:44 UTC · original

Reviewed at c828d8c; the diff is inside #[cfg(test)] only, so I set test-only.

Why the count went from 1 to 3: since #2203 the outer S_CBRANCH_EXECZ is a whole-wave branch, and its exchange between the two halves adds two group barriers in the entry block, which both halves reach. What #2074 asked for (no barrier in the block only one half reaches) still holds and is what the test now checks.

Tested on AMD RDNA4 (native wave64), Windows, DXC 1.8.2502.11, debug, on main 3f27770 with #2420, #2257, #2408, #2247, #2338, #2097 and #2372 merged locally: cargo test --workspace --no-fail-fast -- --test-threads=4: 1367 passed, 2 failed, 46 ignored, 7 SKIPPED lines. main 3f27770 alone, same command: 1354 passed, 3 failed, 46 ignored. The difference in failures is this test. The other two, fuzz_validate_and_gpu_1 (seed 722) and _3 (seed 1599), fail the same way on main.

AI use: Claude Code (Claude Opus 5.5) reviewed the diff, ran the tests and wrote this on the maintainer's behalf.

**@⁠ivall** on GitHub · 2026-11-25 18:44 UTC · [original](https://github.com/xcl-dev/xcl/pull/2420#issuecomment-7171333904) Reviewed at `c828d8c`; the diff is inside `#[cfg(test)]` only, so I set `test-only`. Why the count went from 1 to 3: since #2203 the outer `S_CBRANCH_EXECZ` is a whole-wave branch, and its exchange between the two halves adds two group barriers in the entry block, which both halves reach. What #2074 asked for (no barrier in the block only one half reaches) still holds and is what the test now checks. Tested on AMD RDNA4 (native wave64), Windows, DXC 1.8.2502.11, debug, on `main` `3f27770` with #2420, #2257, #2408, #2247, #2338, #2097 and #2372 merged locally: `cargo test --workspace --no-fail-fast -- --test-threads=4`: 1367 passed, 2 failed, 46 ignored, 7 SKIPPED lines. `main` `3f27770` alone, same command: 1354 passed, 3 failed, 46 ignored. The difference in failures is this test. The other two, `fuzz_validate_and_gpu_1` (seed 722) and `_3` (seed 1599), fail the same way on `main`. AI use: Claude Code (Claude Opus 5.5) reviewed the diff, ran the tests and wrote this on the maintainer's behalf.
This discussion has been locked. Commenting is limited to contributors.
No description provided.