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

Closed
kibagami-nc wants to merge 1 commit from upstream-pr/578 into main
kibagami-nc commented 2026-11-28 01:12:51 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by kibagami-nc on 2026-11-28T01:12:51Z.


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.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5535256368 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/578). Originally posted by [kibagami-nc](https://github.com/kibagami-nc) on 2026-11-28T01:12:51Z. --- ## 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 commented 2026-11-28 02:53:10 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by kibagami-nc on 2026-11-28T02:53:10Z.


Closing: main fixed the same two tests in 9b712a6 (CI green again), the same way (the big records fill the budget exactly, and the expected spend follows rest()). Nothing left here.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7232656354 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/578#issuecomment-7232656354). Originally posted by [kibagami-nc](https://github.com/kibagami-nc) on 2026-11-28T02:53:10Z. --- Closing: main fixed the same two tests in 9b712a6 (CI green again), the same way (the big records fill the budget exactly, and the expected spend follows `rest()`). Nothing left here.

Pull request closed

Sign in to join this conversation.
No reviewers
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
trustno1-coder/VIctory-NVIDIA!578
No description provided.