Tests: the WARP budget test lets either group of records charge the budget first #1110
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!1110
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1110/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?
@tippythetaidum on GitHub · 2026-11-25 19:48 UTC · original
tippythetaidum:tests/warp-budget-group-order→main· +11 −4 · 1 files · 1 commits · closed without mergingWhat fails
indirect::tests::warp_budget_saturates_without_wraparound_and_preserves_draw_fieldsfails on GitHub's Windows runner:The runner has no card, so the test's WARP device is the only one. Today's
mainCI doesn't get as far as the tests: Clippy stops it first, and #982 fixes that. Once Clippy passed in a build of this tree, this test was one of two that still failed.Why
The clamp program charges the budget per group of 64 records. Inside a group the records charge in their order, but the groups take turns through a compare-exchange on the budget word, in whatever order the device runs them. The test's 128 records are one empty record and 127 that each cost half the budget, so exactly two fit: the first two real draws of whichever group charges first. That's records 1 and 2 when group 0 goes first, and records 64 and 65 when group 1 does. The test assumed group 0. WARP doesn't always run it first.
So the clamp is doing what it says. The assertion was too narrow.
Change
The test collects the kept records and accepts
[1, 2]or[64, 65]. The other checks stay as they are: the budget saturates atBUDGETwithout wrapping, the source arguments are untouched, every other record is zeroed (125), and every record keeps its fields.Tested
On GitHub's Windows runner (no card, WARP), in a CI run of a tree with this change and #982 on
main: the test fails before the change and passes after. I have not run it on WARP on my own machine. On my RTX 5080 the test also builds its device with WARP, and the change only widens what it accepts.AI-assisted (Claude Code, Claude Opus 5.5).
🤖 Generated with Claude Code
@liuycsbxbxn on GitHub · 2026-11-25 22:09 UTC · original
Widening what the test accepts is the right direction — it removes the failure that was being observed, and "the change only widens what it accepts" is the right way to describe the risk.
One assumption left in it, for whoever lands one of the two:
kept == [1, 2] || kept == [64, 65]also says which pair it is, which holds only while the group that charges is the lowest-indexed one. The invariant form in #1098 (exactly two records keep their draw, record 0 is not one of them, every other record zeroed whole,spent == BUDGET_CAP) makes the same change without naming the pair, so a future wave size or a different adapter cannot make it red again.Not a blocker from my side — both PRs fix the observed flake, and they touch the same lines so only one can land.
@tippythetaidum on GitHub · 2026-11-25 22:32 UTC · original
Agreed, and thanks for pointing to #1098. I missed it when I opened this: it predates this PR (19:23 against 19:48) and states the invariant without naming the pair, which is the better test. The clamp is
[numthreads(64, 1, 1)], so the pairs follow from its own group size rather than the adapter's wave size. Still, as you say, #1098's form holds whatever the record count or grouping becomes.I'm closing this in favour of #1098 so there's one fewer duplicate to sort through.
AI-assisted (Claude Code, Claude Opus 5.5).
Pull request closed