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

Open
opened 2026-11-25 20:17:56 +00:00 by superboynick · 2 comments
superboynick commented 2026-11-25 20:17:56 +00:00 (Migrated from github.com)
Contributor

Imported from fxceless/victory-fork. Originally posted by superboynick on 2026-11-25T20:17:56Z.


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.

<!-- greyfinch-sync:fxceless/victory-fork:issue:6612935459 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/issues/1118). Originally posted by [superboynick](https://github.com/superboynick) on 2026-11-25T20:17:56Z. --- `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.
DominicBrett commented 2026-11-25 22:07:21 +00:00 (Migrated from github.com)
Author
Contributor

Imported from fxceless/victory-fork. Originally posted by DominicBrett on 2026-11-25T21:17:29Z.


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.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7174876530 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/issues/1118#issuecomment-7174876530). Originally posted by [DominicBrett](https://github.com/DominicBrett) on 2026-11-25T21:17:29Z. --- 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.
tippythetaidum commented 2026-11-25 22:07:23 +00:00 (Migrated from github.com)
Author
Contributor

Imported from fxceless/victory-fork. Originally posted by tippythetaidum on 2026-11-25T21:33:09Z.


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).

<!-- greyfinch-sync:fxceless/victory-fork:comment:7175228662 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/issues/1118#issuecomment-7175228662). Originally posted by [tippythetaidum](https://github.com/tippythetaidum) on 2026-11-25T21:33:09Z. --- 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).
Sign in to join this conversation.
No labels
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.

Reference
fxceless/victory-fork#1115
No description provided.