card_steps tests: the shared-scratch bench counts fills and refusals as ranges #4980
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4980"
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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Tan7rex on 2026-12-01T16:18:39Z.
Refs #2741
What it changes
host::card_steps::tests::shared_scratch_eliminates_flight_settle_end_to_endasserts exact per-round counts: 1 refusal per round withVICTORY_SCRATCH_SHARED=0, 2 card fills per round with it on. InHost::card_stepsa round is only refused or filled on the card while the round before is still in flight when it is submitted (line().blocking()non-empty). When the test's thread is slowed, by the rest of the suite running beside it or by a small runner's cores, the card can finish first, nothing blocks, and that round counts neither. That's the failure in #2741 (expected 2 GPU fills per round, 12 of 16 on the runner) and the one here (expected 1 refusal per round,refused=7in 8 rounds).This takes option 2 of #2741:
ROUNDSrefusals, and still no fills2 * ROUNDSfills, and still exactly 0 refusals and 0 µs ofWHY_READwaitWhat doesn't depend on timing stays exact, and every round's bytes are still checked. "At least one" keeps the test proving each mode took its path at all.
#3385 makes the same change to the upload-mode refusal count, inside a larger CI cleanup that now conflicts with
main. It leaves the shared-mode fill count exact, which is #2741's original failure. This pull request is that test change alone, so it can land on its own; if #3385 lands first, this one only adds the fill range.How it was tested
Windows 11 Pro (build 26100), RTX 4090. Release test binary of
victory-gpu --lib(cargo test --release --locked --no-run -p victory-gpu --lib), run with default parallel threads. Game not run: this is a test-only change.main5fabb46e): the test failed in 14 of 60 whole-library runs, and 0 of 20 on its own (--exact)cargo testpassed for the crates it touches: this test, yes. In the 60 runs after the change, other tests failed:host_list_uav_pool_lifecycle_retire_trim_and_info_queue(19, fixed by #3902),a_late_fault_leaves_the_guard_taken_since(2, #4704), and once eacha_pipeline_made_ready_is_the_one_the_title_gets,our_section_view_is_unmapped_with_its_last_holderandrefresh_front_zero_arc_matches_and_runs_due. This change touches none of them.cargo xtask policy: 464 files okcargo clippy -p victory-gpu --all-targets --locked -- -D warnings, with and without--all-features: fails with the same 5 errors onmain5fabb46e(font.rs:213, font.rs:260, menu.rs:667, panel.rs:602, panel.rs:668), which #4679 and #4707 fix. None are incard_steps.rs.Not tested: a 2-4 core runner, where #2741 first failed. If such a runner finishes every round before the next one is submitted, the "at least one" lower bounds could still fail there.
Checked for overlap
card_stepstests). Of the 30 open pull requests that touchcard_steps.rs, only #3385 and #3061 change this test.🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.