Repository navigation
Warp budget test: accept either group charging first (rebased on main, +12/−1) - #970
Open
HailLucifer666 wants to merge 1 commit into
Open
HailLucifer666 wants to merge 1 commit into
HailLucifer666 wants to merge 1 commit into
Conversation
This was referenced Nov 25, 2026
|
I independently reproduced the same cross-group outcome on native Windows WARP while working on #888. This test change captures the current parallel clamp's behavior. #899 addresses the runtime side by making earlier records take the budget first across groups, keeping the assertion that the surviving records are 1 and 2. The #899 WARP run passed all 13 indirect tests, including repeated runs of that order check. The comparison with the old parallel clamp also measures the additional dispatches. Physical GPU and game frame timings remain open. WARP reproduction · Patched WARP run · Cost comparison AI-assisted using Codex. |
HailLucifer666
force-pushed
the
test/warp-budget-group-race
branch
from
November 25, 2026 14:30
f51b5e8 to
b80bfd8
Compare
warp_budget_saturates_without_wraparound_and_preserves_draw_fields has 128 records, two groups of 64. Each group charges the list's budget once, taking its records in lane order, but which group charges first is up to the card (or WARP's threads): the two draws that fit are records 1 and 2 or records 64 and 65. The test asserted records 1 and 2 only, and failed about 5 runs in 6 on an RX 6950 XT's host. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
JohnTWillemsen
added a commit
to JohnTWillemsen/victory-fork
that referenced
this pull request
Nov 25, 2026
… bounds Port fxceless PR fxceless#970 order-independent two-workgroup budget assertion: either group may charge first but total clamped draws and copy fields must still match. Keep pipeline depth-bounds creation, library reload, state replay and pixel readbacks tested on WARP, but permit its known software-only failure to reject out-of-range pixels, never on a hardware adapter. Confirmed by exact-source CI failures 45647740157 and upstream WARP reports; no emulator runtime behavior changed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Takes
MamaLeVrai's #849 verbatim — same commit, same authorship, no changes.Roy-0406reached the same cause independently in #847 from a different machine, which is the strongest evidence either of them has.Now one commit, one file,
+12/−1, on top of currentmain(0b0074e0).A correction to this PR's own earlier body
I first wrote that
mainalready had an order-independent version of this assertion, from578d459c. That is wrong and I am retracting it:578d459cis a commit on our fork'smain, not upstream. Upstreammainstill carriesassert!(i == 1 || i == 2, "the first two real draws fit the budget")atindirect.rs:1539, beside the count-based assertion at1550. The count assertion does not save it — the index assertion still fires. The fix is genuinely needed here.I also opened this against a branch based on
f85101b6, which is seven commits and thirty-four files behindmain. It has been rebuilt on0b0074e0; that is why the diff is now twelve lines.The mechanism
Two groups of 64 records each charge the list's one budget word with a compare-and-swap, and each group then takes its records in lane order. Which group charges first is the card's decision, so the two draws that fit are records 1 and 2 or records 64 and 65. The old assertion named one of two legal outcomes.
Evidence, and a probe that fails on demand
Two groups of one budget, so both orders are correct and the invariant worth pinning is
(kept, zeroed) == (2, 126), which line 1561 already asserts.On this machine today the second group charges first, consistently. That makes the old assertion fail deterministically rather than intermittently:
[1, 2]only (the pre-fix shape) → 2 of 3 runs fail,panicked at indirect.rs:1542: the first two real draws of the group that charged first fit the budget, not [64, 65][64, 65]only → passes, because that is the order this machine takes7c2bf779459c22d0Full suite: 170 passed, 0 failed, 5 ignored.
Earlier measurement on the
f85101b6tree, full suite, four processes at a time: 2 of 12 runs failed without this patch, 0 of 12 with it. Idle and serial runs never reproduced it, which is why it read as a machine-specific flake for days.Ordering
#169 is built on
f85101b6and carries the same strict assertion, so it should rebase ontomainafter this lands — otherwise its suite keeps showing a failure unrelated to its change.Not covered
Native D3D12 — everything above is WARP. And this fixes a test, not the shader: if the budget were ever meant to be spent in a defined order, that would be a different and much larger question.