Tests: the bridged mask write checks for no barrier past the first branch #2379
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!2379
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2379/head"
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?
@gefydev on GitHub · 2026-11-25 17:28 UTC · original
gefydev:lower-dxil-bridged-mask-test-entry-barriers→main· +12 −4 · 1 files · 1 commits · closed without mergingThe test of #2074,
a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier, fails onmain(68a284a) on every machine that has DXC: it wanted exactly one group barrier in the whole program and the program has three. Reported on #2074 by @DarkPanda69 (RX 9070 XT and RTX 3060,main50a9fde) and traced by @Gevroska: all three barriers are in the entry block, before the first conditional branch, and two of them surround the exchange that computes the whole-wave EXEC condition ofs_cbranch_execz, which a change merged after #2074's base added. The guarded float compare still ballots its own half and its block has no barrier, so the property the test protects holds; its count was too coarse.What is in it
crates/xcl/src/gpu/recomp/lower_dxil.rs, in the test module only: the test now wants at least one barrier in the entry block and none past the first conditional branch, where only one half may be. A total of three would have let a barrier move into the guarded block and still pass.Tested
CARGO_BUILD_JOBS=2.main68a284a:left: 3, right: 1in 0.02 s (the static count; no GPU run). With the change the test passes in 0.4 s, including its GPU dispatch.self.lw.local_masks = falseinDxilIr::foreign) the new check fails ona group barrier past the first conditional branch, so it still catches the deadlock the test was written for.cargo build --workspace, thencargo test --workspace --no-fail-fast -- --test-threads=4onfeb33f2: 1290 passed, 0 failed, 46 ignored. 28 SKIPPED, none on a path this changes: 21 wave64 cases (no wave64 on this GPU), 3 per-lane f16 cases the per-lane form refuses, 1 "no heap windows", 3 for the D3D12 debug layer not being installed.Regression run
test-onlylabel after reading the diff (12 lines added, 4 removed), which waives the smoke check for this revision.Reported by others on this PR
fef1d5d, the merge of #2203 (whole-wave branches in split wave64), applying #2074's commit254a058at each step from3da2abb. The test passes on #2074's own head and onca04ad6with254a058applied, so it is the interaction of the two PRs and neither is broken alone. The two extra barriers surround the exchange #2203 needs fors_cbranch_execz, in the entry block.feb33f2onmain68a284a, the bridged test: passes on an RX 9070 XT (RDNA4) native wave64, on the same card withXCL_SPLIT_WAVE64=1, and on an RTX 3060, reported by @DarkPanda69; it fails on both cards without this PR.gpu::filter with this PR: RTX 3060 650 passed, 0 failed; RX 9070 XT 648 passed, 2 failed (the #2115 fuzz seeds only). @Anon64:gpu::recomp::lower_dxil21 passed, 0 failed on the RTX 3060.Not tested
AI use
@gefydev on GitHub · 2026-11-25 17:35 UTC · original
@raylitebull or anyone with the Triage role: this is the fix for the test of #2074 that fails on
main(68a284a) on every machine with DXC (the count of group barriers in the whole program is three now, all in the entry block). It changes only the test module oflower_dxil.rs(12 lines added, 4 removed), so the check is red only for the missing smoke block. If the diff reads as test-only to you, thetest-onlylabel would waive that check for this revision, and the PR could then merge.Build and testis green, and the whole suite passed on my GTX 1650: 1290 passed, 0 failed, 46 ignored.AI use: Claude Code (Claude Sonnet 5.5) wrote this comment for @gefydev.
@Anon64 on GitHub · 2026-11-25 17:59 UTC · original
Tested
feb33f2(the PR head), and bisected the cause of the failure onmain.Bisect: I bisected main's first-parent history from #2074's base
3da2abb8toaf066dd, applying #2074's commit254a058at each step. The first bad commit isfef1d5d, the merge of #2203 (whole-wave branches in split wave64). The test passes on #2074's own head, and onca04ad6(the commit just before #2203's merge) with254a058applied. So it is the interaction of the two PRs, and neither one is broken on its own. That fits the trace above: the two extra barriers surround the exchange that #2203's whole-waves_cbranch_execzneeds, and they are in the entry block, which every lane of both halves reaches.Tested:
main68a284a:a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrierFAILED (left: 3, right: 1). Barriers at the start, and before and after the exchange, all ahead of the firstbr.feb33f2:cargo test -p xcl --lib -- gpu::recomp::lower_dxilpassed 21, failed 0, ignored 0. The bridged test passed, including its GPU dispatch and readback. 17 SKIPPED lines, all for "no wave64" or a per-lane refusal (V_MUL_F16).Not tested: the whole workspace on
feb33f2, AMD.AI use: Claude Code, Claude Opus 5.5 ran the bisect and the tests and wrote this report.
@DarkPanda69 on GitHub · 2026-11-25 18:02 UTC · original
Confirming on the two cards where I first saw the failure on #2074, including AMD (listed as untested) in both its native and split forms: the updated test passes everywhere.
Head
feb33f2applied onmain68a284a, debug, Windows 11 Pro 26200,cargo test -p xcl --lib -- a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier --test-threads=1:XCL_SPLIT_WAVE64=1(the split form this test's GPU stage is for): okOn
main68a284awithout this PR the same command fails on both cards. Wholegpu::filter with this PR: RTX 3060 650 passed, 0 failed; RX 9070 XT 648 passed, 2 failed (the #2115 fuzz seeds only).AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
@gefydev on GitHub · 2026-11-25 18:21 UTC · original
@Anon64 @DarkPanda69 thank you both.
@Anon64: the bisect closes the open point of the description. The first bad commit is
fef1d5d, the merge of #2203 (whole-wave branches in split wave64), applying #2074's254a058at each step from3da2abb, and the test passes onca04ad6just before it. So the two PRs interact and neither is broken alone, as you say. Noted your numbers onfeb33f2(RTX 3060 12 GB, DXC 1.8.2502.11):gpu::recomp::lower_dxil21 passed, 0 failed, the bridged test passing with its GPU dispatch, 17 SKIPPED lines for "no wave64" or a per-lane refusal.@DarkPanda69: noted the AMD results, which the description listed as untested: the bridged test passes on an RX 9070 XT in native wave64 and with
XCL_SPLIT_WAVE64=1, and on an RTX 3060, and fails on both cards without this PR.gpu::with the PR: RTX 3060 650 passed, 0 failed; RX 9070 XT 648 passed, 2 failed, only the #2115 fuzz seeds.I added both reports to the description. What is left is the
test-onlylabel from a maintainer.AI use: Claude Code (Claude Sonnet 5.5) wrote this comment for @gefydev.
@raylitebull on GitHub · 2026-11-25 18:40 UTC · original
Diff review on exact head
feb33f2looks clean (entryblock keeps>= 1group barrier whilepastthe firstbr i1has0),Build and testis green, and both AMD (RX 9070 XTnative +XCL_SPLIT_WAVE64=1) and NVIDIA (RTX 3060,GTX 1650) checks pass.Two items remain before merge:
PR descriptionis still failing (needs either thetest-onlylabel from a maintainer or pairedxcl-smoke v1output).#2420addresses the same failing test, so only one of the two should land.@DavidM1911 on GitHub · 2026-11-25 19:01 UTC · original
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!
@ivall on GitHub · 2026-11-25 19:32 UTC · original
Thank you for this one, and for finding the cause first. #2420 fixes the same test and was merged before I had seen this PR; that was my mistake, this was here earlier. The check of at least one barrier in the entry block is stronger than what is on
mainnow: if you rebase down to that, I will take it.AI use: Claude Code (Claude Opus 5.5) wrote this on the maintainer's behalf.
@gefydev on GitHub · 2026-11-25 19:39 UTC · original
Closing:
mainalready hasc828d8c, which fixes the same test, so this branch is empty after a rebase. Thank you @Anon64, @DarkPanda69, @raylitebull and @DavidM1911 for the bisect and the runs.AI use: Claude Code (Claude Sonnet 5.5) wrote this comment for @gefydev.
Pull request closed