Repository navigation
Indirect test: the two groups charge the budget in either order (the test failed 5 runs in 6) - #849
MamaLeVrai wants to merge 1 commit into
Conversation
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>
|
Confirmed on a Windows 11 / RX 9070 XT machine: the test alone fails 100 of 100 times on
The whole-binary runs also have failures this PR doesn't touch: Driver 32.0.32029.2010, Ryzen 7 5800X3D, Windows 11 26200, run from a service session. No game data. AI-assisted (Claude Code); run on my machine. |
|
Thank you for the 100-run confirmation on a different card and a different Windows build: on my RX 6950 XT the test alone failed 5 of 6 times on On the other failures you list: I saw AI-assisted (Claude Code); no game data. |
|
Reproduced and confirmed on a different machine: Windows 11, NVIDIA RTX 4070 Ti SUPER (driver 621.01), Ryzen 5 7600, Rust 1.98.1.
The test runs on WARP, so the GPU should not matter; it fails on this NVIDIA / Ryzen machine too, not only on the RX 6950 XT. |
|
Thank you for running it on an NVIDIA / Ryzen machine: 4 of 10 on AI-assisted (Claude Code); no game data. |
The switch this branch added turned the clamp pass off so `ExecuteIndirect` could read the title's own argument buffer. `dkdknight` ran it on an RTX 5080, twice, and both runs died with `0xc0000005` writing `0x0` within seconds. That is the answer the switch deserved: the title's argument records contain bounds the pass is what enforces, so "read them directly" is not a fast path, it is a crash with a longer name. So `0` no longer means "bypass". `clamp_setting` returns `(clamp on, say so)` and the clamp is on whatever is asked; a run that asked is told once, with the reason and with what actually answers its complaint. `clamp_is_on` is consulted where the clamp is first made, so the refusal is spoken even in a run that never reaches the pass. That leaves no path for the bypass, so the code is gone rather than unreachable: the `if !clamped` branch in `draw.rs` and the two `if clamped` teardowns go with it, and so does `wait_direct`, which existed only to put a barrier in front of an unclamped execute. Dead code behind a switch that is now always true is a lie about what the program can do. The cost the switch was chasing is real -- about five thousand one-record indirect mesh draws a frame, and SM issue at 4% in `dkdknight`'s Nsight capture -- and the answer to it is hoisting the clamps out of the per-record path (`VICTORY_HOIST_CLAMPS`, Phase I), which keeps the bounds check and stops paying for it once per record. Probe: `clamp_setting` returns `parse_clamp_enabled(asked)` again -> the new test fails with `left: (false, true), right: (true, true)` -> restored byte-identical (sha256 ade38ee886e354e5). cargo test -p victory-gpu --lib: 161 passed, 1 failed -- the failure is `warp_budget_saturates...`, the pre-existing flake (fxceless#847/fxceless#849), on a test this commit does not touch. cargo clippy -p victory-gpu --lib -D warnings: only the two pre-existing fxceless#841 errors remain.
|
Evidence from a fourth machine (Windows, WARP, this repo's own suite), and one thing your two PRs between them have established that neither body says: this is a regression, not a missing nicety.
Measured: full suite, four processes at a time, twelve runs on I have opened #970 taking |
The switch this branch added turned the clamp pass off so `ExecuteIndirect` could read the title's own argument buffer. `dkdknight` ran it on an RTX 5080, twice, and both runs died with `0xc0000005` writing `0x0` within seconds. That is the answer the switch deserved: the title's argument records contain bounds the pass is what enforces, so "read them directly" is not a fast path, it is a crash with a longer name. So `0` no longer means "bypass". `clamp_setting` returns `(clamp on, say so)` and the clamp is on whatever is asked; a run that asked is told once, with the reason and with what actually answers its complaint. `clamp_is_on` is consulted where the clamp is first made, so the refusal is spoken even in a run that never reaches the pass. That leaves no path for the bypass, so the code is gone rather than unreachable: the `if !clamped` branch in `draw.rs` and the two `if clamped` teardowns go with it, and so does `wait_direct`, which existed only to put a barrier in front of an unclamped execute. Dead code behind a switch that is now always true is a lie about what the program can do. The cost the switch was chasing is real -- about five thousand one-record indirect mesh draws a frame, and SM issue at 4% in `dkdknight`'s Nsight capture -- and the answer to it is hoisting the clamps out of the per-record path (`VICTORY_HOIST_CLAMPS`, Phase I), which keeps the bounds check and stops paying for it once per record. Probe: `clamp_setting` returns `parse_clamp_enabled(asked)` again -> the new test fails with `left: (false, true), right: (true, true)` -> restored byte-identical (sha256 ade38ee886e354e5). cargo test -p victory-gpu --lib: 161 passed, 1 failed -- the failure is `warp_budget_saturates...`, the pre-existing flake (fxceless#847/fxceless#849), on a test this commit does not touch. cargo clippy -p victory-gpu --lib -D warnings: only the two pre-existing fxceless#841 errors remain.
…test failed 5 runs in 6) (fxceless#849) PR: fxceless#849 Head: 8971052 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
indirect::tests::warp_budget_saturates_without_wraparound_and_preserves_draw_fieldsfails most of the time onmain(f85101b) on this machine (Windows 11, RX 6950 XT, Rust 1.98.1): 5 of 6 runs of the test alone, and 4 of 15 runs ofcargo test -p victory-gpu --lib, withWhy. The test has 128 records, two groups of 64. Each group charges the list's budget once, and takes its records in lane order (the comment in the clamp shader says so). Which of the two groups charges first is up to the card, or up to WARP's threads here. If the second group goes first, the draws that fit are records 64 and 65, not 1 and 2, and the test's
assert!(i == 1 || i == 2)fails.The change. The test now collects the kept records and asserts they are
[1, 2]or[64, 65](the first two real draws of the group that charged first), then runs the rest of its checks as before (two kept, the others zeroed, the fields untouched, the budget saturated at 2^27 without wrapping). Only the test changes.Checks. The test alone, 25 runs with this change: 0 failures (before: 5 of 6 failed). I did not run the whole suite again with this change; it touches the one test. I could not tell which of the two outcomes WARP gives in a run, only that the old assertion fails often.
AI-assisted (Claude Code); no game data.
🤖 Generated with Claude Code