GPU tests: two indirect tests follow VICTORY_INDIRECT_REST's default (they fail on main) #578

Open
github-bot wants to merge 1 commit from github-bot/gh-578 into main AGit
Owner

@⁠kibagami-nc on GitHub · 2026-11-28 01:12 UTC · original
kibagami-nc:fix/indirect-tests-follow-rest-default → main · +21 −3 · 1 files · 1 commits · open

The problem

cargo test -p victory-gpu --locked fails on main (a4d05e7), on every run:

---- indirect::tests::host_list_budget_starts_empty_at_each_submission ----
assertion `left == right` failed: round 0: the spent budget empties the record after it
  left: 1
 right: 0

---- indirect::tests::warp_batch_charges_every_execution ----
assertion `left == right` failed
  left: 0
 right: 134217728

545f890 turned VICTORY_INDIRECT_REST off by default. Before, rest() was on unless set to 0; now it is off unless set to 1. Its doc says why: "off by default so one oversized record takes nothing and later valid draws still run". The two tests still asserted the old default. The code is as intended; only the tests are out of date.

  • host_list_budget_starts_empty_at_each_submission. Three records of 65,535 × 16 groups of 64 threads cost 67,107,840 each. Two leave 2,048 of the 2^27 budget. The small record after them (64) fits in that, unless the third took the rest, which it no longer does by default.
  • warp_batch_charges_every_execution. The last case (one record read by three executions, 3 × 2^26) asks for more than the budget. By default it takes nothing, and the test expected all of it.

The change

Tests only, in crates/victory-gpu/src/indirect.rs:

  • First test. The big records are 32,768 × 32 groups: 2^20 groups of 64 threads, exactly half the budget each. The first two spend all of it, so the small record runs empty in both modes. That is what the test is about: the budget is spent, and starts empty again at the next submission.
  • Second test. The expected charge is worked out the way the pass charges it, with rest(), which the pass is made with.

Tests

  • Both modes. Both tests pass with the default and with VICTORY_INDIRECT_REST=1, on an RTX 5070 Ti, with WARP for the second.
  • Whole suite. cargo test -p victory-gpu --locked: 443 passed, 0 failed, 36 ignored. Before: 2 failed.
  • Clippy. cargo clippy -p victory-gpu --all-targets -- -D warnings stops on the dead-code lints main has, among them depth_written in this file (see #425, #265 and #86). This change adds none.

With #572 (a test of victory-loader that failed about one run in seven on Intel CPUs), these are the only test failures I found in cargo test --workspace --locked on main on this PC.

No game files, dumps or extracted data are included.

**@⁠kibagami-nc** on GitHub · 2026-11-28 01:12 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/578) `kibagami-nc:fix/indirect-tests-follow-rest-default` → `main` · +21 −3 · 1 files · 1 commits · open ## The problem `cargo test -p victory-gpu --locked` fails on `main` (a4d05e7), on every run: ``` ---- indirect::tests::host_list_budget_starts_empty_at_each_submission ---- assertion `left == right` failed: round 0: the spent budget empties the record after it left: 1 right: 0 ---- indirect::tests::warp_batch_charges_every_execution ---- assertion `left == right` failed left: 0 right: 134217728 ``` 545f890 turned `VICTORY_INDIRECT_REST` off by default. Before, `rest()` was on unless set to `0`; now it is off unless set to `1`. Its doc says why: "off by default so one oversized record takes nothing and later valid draws still run". The two tests still asserted the old default. The code is as intended; only the tests are out of date. - **`host_list_budget_starts_empty_at_each_submission`.** Three records of 65,535 × 16 groups of 64 threads cost 67,107,840 each. Two leave 2,048 of the 2^27 budget. The small record after them (64) fits in that, unless the third took the rest, which it no longer does by default. - **`warp_batch_charges_every_execution`.** The last case (one record read by three executions, 3 × 2^26) asks for more than the budget. By default it takes nothing, and the test expected all of it. ## The change Tests only, in `crates/victory-gpu/src/indirect.rs`: - **First test.** The big records are 32,768 × 32 groups: 2^20 groups of 64 threads, exactly half the budget each. The first two spend all of it, so the small record runs empty in both modes. That is what the test is about: the budget is spent, and starts empty again at the next submission. - **Second test.** The expected charge is worked out the way the pass charges it, with `rest()`, which the pass is made with. ## Tests - **Both modes.** Both tests pass with the default and with `VICTORY_INDIRECT_REST=1`, on an RTX 5070 Ti, with WARP for the second. - **Whole suite.** `cargo test -p victory-gpu --locked`: 443 passed, 0 failed, 36 ignored. Before: 2 failed. - **Clippy.** `cargo clippy -p victory-gpu --all-targets -- -D warnings` stops on the dead-code lints `main` has, among them `depth_written` in this file (see #425, #265 and #86). This change adds none. With #572 (a test of `victory-loader` that failed about one run in seven on Intel CPUs), these are the only test failures I found in `cargo test --workspace --locked` on `main` on this PC. No game files, dumps or extracted data are included.
545f890 turned VICTORY_INDIRECT_REST off by default: a record that does
not fit in what is left of its list's budget now takes nothing, and the
records after it that fit still run. Two tests still asserted the old
default and failed on every run of cargo test -p victory-gpu:

- host_list_budget_starts_empty_at_each_submission: three records of
  65,535 x 16 groups left 2,048 of the budget, which the small record
  after them fits in unless the third took the rest ("round 0: the spent
  budget empties the record after it", left: 1, right: 0). The records
  are now 32,768 x 32 groups, exactly half the budget each, so the first
  two spend all of it and the small record runs empty in both modes.

- warp_batch_charges_every_execution: one record read by three
  executions asks for more than the budget, and by default takes
  nothing; the test expected all of it (left: 0, right: 134217728). The
  expected charge now follows rest(), which the pass is made with.

Both tests pass with the default and with VICTORY_INDIRECT_REST=1. Only
tests change.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 01:18:39 +00:00
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/578/head:github-bot/gh-578'
git switch 'github-bot/gh-578'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-578'
git switch 'github-bot/gh-578'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-578'
git switch 'github-bot/gh-578'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-578'
git switch 'main'
git merge --squash 'github-bot/gh-578'
git switch 'main'
git merge --ff-only 'github-bot/gh-578'
git switch 'main'
git merge 'github-bot/gh-578'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.