indirect::tests::warp_budget fails on a 32-lane adapter (0b0074e), passes intermittently #1118

Open
opened 2026-11-26 03:57:47 +00:00 by github-bot · 2 comments
Owner

@⁠superboynick on GitHub · 2026-11-25 20:17 UTC · original

cargo test -p victory-gpu on 0b0074e fails one test on this machine:

thread 'indirect::tests::warp_budget_saturates_without_wraparound_and_preserves_draw_fields' panicked at crates\victory-gpu\src\indirect.rs:1539: the first two real draws fit the budget

Environment: Windows 11 26200, RTX 5070 Ti Laptop (12227 MiB, driver 617.14), Intel iGPU present, GNU toolchain 1.98.1. The rest of the suite passes: 173 passed, 5 ignored, 1 failed.

What I can say about stability: the same test passed twice on this machine earlier today and now fails on three consecutive runs, so it is not simply "fails on this hardware". Between then and now, the only machine-level change I am aware of is the per-application GPU preference for my own test binary - which should not affect cargo test at all, since that is a different executable.

Why it matters for the wave discussion: the assertion is about which records fit BUDGET, and if that bound is expressed in waves or lanes, a 32-lane host and a 64-lane host could legitimately disagree about how many records fit. If so, the test encodes a 64-lane expectation.

I am not claiming a bug in the kernel, and I have not changed the test. Two questions: is this test expected to pass on a 32-lane adapter, and if not, what is the intended way to mark it? Happy to run anything you suggest and report back.

No binary contents or disassembly; test output and configuration only. AI-assisted.

**@⁠superboynick** on GitHub · 2026-11-25 20:17 UTC · [original](https://github.com/fxceless/victory-fork/issues/1118) `cargo test -p victory-gpu` on `0b0074e` fails one test on this machine: ` thread 'indirect::tests::warp_budget_saturates_without_wraparound_and_preserves_draw_fields' panicked at crates\victory-gpu\src\indirect.rs:1539: the first two real draws fit the budget ` **Environment:** Windows 11 26200, RTX 5070 Ti Laptop (12227 MiB, driver 617.14), Intel iGPU present, GNU toolchain 1.98.1. The rest of the suite passes: 173 passed, 5 ignored, 1 failed. **What I can say about stability:** the same test passed twice on this machine earlier today and now fails on three consecutive runs, so it is not simply "fails on this hardware". Between then and now, the only machine-level change I am aware of is the per-application GPU preference for my own test binary - which should not affect `cargo test` at all, since that is a different executable. **Why it matters for the wave discussion:** the assertion is about which records fit `BUDGET`, and if that bound is expressed in waves or lanes, a 32-lane host and a 64-lane host could legitimately disagree about how many records fit. If so, the test encodes a 64-lane expectation. I am not claiming a bug in the kernel, and I have not changed the test. Two questions: is this test expected to pass on a 32-lane adapter, and if not, what is the intended way to mark it? Happy to run anything you suggest and report back. No binary contents or disassembly; test output and configuration only. AI-assisted.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:57:47 +00:00
Author
Owner

@⁠DominicBrett on GitHub · 2026-11-25 21:17 UTC · original

The cause is the order of thread groups, not the hardware: the test's 128 records run as two groups of 64 that race for one budget word, and D3D12 (WARP here, whatever GPU is installed) doesn't fix which group charges first. The test assumed the first group always wins. On my machine the old test failed 93 runs out of 100, every failure with records 64 and 65 kept instead of 1 and 2. Test-only fix with evidence in #1134.

**@⁠DominicBrett** on GitHub · 2026-11-25 21:17 UTC · [original](https://github.com/fxceless/victory-fork/issues/1118#issuecomment-7174876530) The cause is the order of thread groups, not the hardware: the test's 128 records run as two groups of 64 that race for one budget word, and D3D12 (WARP here, whatever GPU is installed) doesn't fix which group charges first. The test assumed the first group always wins. On my machine the old test failed 93 runs out of 100, every failure with records 64 and 65 kept instead of 1 and 2. Test-only fix with evidence in #1134.
Author
Owner

@⁠tippythetaidum on GitHub · 2026-11-25 21:33 UTC · original · edited 2026-11-25 22:32 UTC

For whoever merges this: #1098 (19:23 UTC, the earliest), #1110 (19:48) and #1134 make the same test-only change. #1110 and #1134 accept either group charging the budget first (kept == [1, 2] or [64, 65]), while #1098 states the invariant without naming the pair, which is the more general test. I've closed #1110 in favour of #1098. DominicBrett's 93-of-100 measurement above fits the explanation in #1110. Merging one closes this.

I've confirmed the order dependence on GitHub's Windows runner (WARP only) and in my own tree's CI, where the test passes with the change.

AI-assisted (Claude Code, Claude Opus 5.5).

**@⁠tippythetaidum** on GitHub · 2026-11-25 21:33 UTC · [original](https://github.com/fxceless/victory-fork/issues/1118#issuecomment-7175228662) · edited 2026-11-25 22:32 UTC For whoever merges this: #1098 (19:23 UTC, the earliest), #1110 (19:48) and #1134 make the same test-only change. #1110 and #1134 accept either group charging the budget first (`kept == [1, 2]` or `[64, 65]`), while #1098 states the invariant without naming the pair, which is the more general test. I've closed #1110 in favour of #1098. DominicBrett's 93-of-100 measurement above fits the explanation in #1110. Merging one closes this. I've confirmed the order dependence on GitHub's Windows runner (WARP only) and in my own tree's CI, where the test passes with the change. AI-assisted (Claude Code, Claude Opus 5.5).
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/fxceless--victory-fork#1118
No description provided.