Play defaults: send free first and sweep ahead on — learned pages and late fills stay off #5044

Open
githubkdskkd wants to merge 1 commit from upstream-pr/5044 into main
githubkdskkd commented 2026-12-01 18:14:41 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by githubkdskkd on 2026-12-01T18:14:41Z.


Refs #4815

What it changes

Two switches that are already in the code but off by default are now on in both launchers (apps/victory/src/play.rs, scripts/play-nvidia.ps1), and the README's rows say the new defaults:

  • VICTORY_SEND_FREE_FIRST=1 — a submission that must wait for earlier card work is split, and its first lists, which need nothing from that work, go to the card at once (host.rs:6890-6904, applied at 10467). Its doc records 37 ms a frame of the card standing with nothing of ours queued while the submitting thread worked (a play run of 2026-11-27).
  • VICTORY_SWEEP_AHEAD=1 — the once-a-second sweep runs while card work is still in flight, instead of the settle that stood the submitting thread until the card had run all it was given (host.rs:5320-5340, applied at 11136).

The pattern behind both: the card idle while the submitting thread prepares and waits.

Rebased on main at b97efa76 (2026-12-01, one commit: "Play defaults: send free first and sweep ahead on", be77d718); the diff is unchanged: three files, +22/−2.

Why VICTORY_CARD_STEPS_LEARN and VICTORY_LATE_FILLS were dropped (and stay off)

#4815's first version turned four defaults on. Two independent benches in its comments measured that and it was slower: -21.3 % fps with all four on (@DoubleD17, RTX 5070, Ryzen 7 5800X) and -13.7 % (27.61 vs 32.01) on a second rig (@tillo88, RTX 5070 Ti, 9800X3D, v2026.11.30.03), with the submitting thread going from 20.5 to about 35 ms a frame. The isolation table in @DoubleD17's comment puts the cost on the learned pages:

switches at 1 fps submitting thread waiting on the card
CARD_STEPS_LEARN alone -29.0 % +29.3 ms
CARD_STEPS_LEARN + LATE_FILLS -21.5 % +20.6 ms
LATE_FILLS alone -0.3 % -0.0 ms
SEND_FREE_FIRST alone -0.4 % +0.0 ms (preparation -0.4 ms)
SWEEP_AHEAD alone -0.8 % -0.3 ms (preparation +0.0 ms)

The learning of late-written pages makes the submitting thread wait on the card: @tillo88's run shows the learn line active ("1.00 submissions waited for a learned page; 141 pages learned", "175.0 fills in 4.00 submissions done when the card got to them (VICTORY_LATE_FILLS)" a frame), and its p99 improving (63.7 → 56.4 and 49.0 ms across the two runs) is not a mitigating factor, as that comment itself says — at about 27.6 fps every frame is longer. LATE_FILLS does nothing without CARD_STEPS_LEARN (it only softens that loss), so both stay at their off defaults; players who see the stretched skinned characters the learn machinery fixes can still opt in with --set VICTORY_CARD_STEPS_LEARN=1 --set VICTORY_LATE_FILLS=1, accepting the measured cost.

Why these two flags are isolated

They are the only two of the four whose ablations measured no cost: SEND_FREE_FIRST -0.4 % (preparation -0.4 ms, waiting +0.0 ms) and SWEEP_AHEAD -0.8 % (preparation +0.0 ms, waiting -0.3 ms), both within the controls' spread of 1.9 to 4.2 ms of preparation on that rig. Neither measured a gain anywhere, and neither was ablated on the second rig (which ran all four together); they are kept for the card-idle pattern their docs record, at a measured cost of nothing.

No code changes. Each switch stays overridable per run — --set NAME=0 in victory play, -More @{NAME='0'} in the launcher — and the F1 menu's saved settings win over both launchers' tables.

How it was tested

  • GPU and profile: none available where this was prepared. The numbers above are the two benches of #4815's first version; these two switches were ablated only on the RTX 5070 rig.
  • Before: / After: — not re-measured; #4815's benches are the before.
  • For shader changes, the wave sizes tested (32 and/or 64 lanes): — (no shader changes).
  • cargo test passed for the crates it touches: cargo check -p victory does not compile on the unchanged base (main at 5fabb46e before this rebase, same pins now) in the environment where this was prepared — 93 pre-existing errors in victory-gpu with the pinned toolchain, on a clean checkout with no changes. The change touches only launcher default tables and README rows; CI on Windows is the arbiter.

What was checked instead, on the rebased tree: both switches still exist and the launchers' value 1 turns each on (SEND_FREE_FIRST is switch::on, on unless 0; SWEEP_AHEAD reads exactly 1); neither is in either launcher's default table on main; the diff touches no other default; and the override chain was read in both files (menu saves and --set/-More insert over the tables before the environment is written).

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: #4815 (this PR's revised, two-switch form), #3809 (four other play defaults in the same two files), #1780 (the learn machinery), #4558 and #4226 (the sweep), #3854, #2237.

A call to measure

If you can run this title on your rig: please benchmark this PR against an unmodified build — same save, same route, switches at their defaults, and an ablation arm with VICTORY_SEND_FREE_FIRST=0 VICTORY_SWEEP_AHEAD=0 if you can spare a third run. Post your numbers on this PR either way, including null results: the two switches here have only one rig's ablation behind them, and a defaults change should not merge on less than that.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5591699292 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/5044). Originally posted by [githubkdskkd](https://github.com/githubkdskkd) on 2026-12-01T18:14:41Z. --- Refs #4815 ## What it changes Two switches that are already in the code but off by default are now on in both launchers (`apps/victory/src/play.rs`, `scripts/play-nvidia.ps1`), and the README's rows say the new defaults: - `VICTORY_SEND_FREE_FIRST=1` — a submission that must wait for earlier card work is split, and its first lists, which need nothing from that work, go to the card at once (`host.rs:6890-6904`, applied at `10467`). Its doc records 37 ms a frame of the card standing with nothing of ours queued while the submitting thread worked (a play run of 2026-11-27). - `VICTORY_SWEEP_AHEAD=1` — the once-a-second sweep runs while card work is still in flight, instead of the settle that stood the submitting thread until the card had run all it was given (`host.rs:5320-5340`, applied at `11136`). The pattern behind both: the card idle while the submitting thread prepares and waits. *Rebased on main at `b97efa76` (2026-12-01, one commit: "Play defaults: send free first and sweep ahead on", `be77d718`); the diff is unchanged: three files, +22/−2.* ### Why `VICTORY_CARD_STEPS_LEARN` and `VICTORY_LATE_FILLS` were dropped (and stay off) #4815's first version turned four defaults on. Two independent benches in its comments measured that and it was slower: **-21.3 %** fps with all four on (@DoubleD17, RTX 5070, Ryzen 7 5800X) and **-13.7 %** (27.61 vs 32.01) on a second rig (@tillo88, RTX 5070 Ti, 9800X3D, v2026.11.30.03), with the submitting thread going from 20.5 to about 35 ms a frame. The isolation table in @DoubleD17's [comment](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4815#issuecomment-7311549963) puts the cost on the learned pages: | switches at `1` | fps | submitting thread waiting on the card | |---|---|---| | `CARD_STEPS_LEARN` alone | **-29.0 %** | +29.3 ms | | `CARD_STEPS_LEARN` + `LATE_FILLS` | **-21.5 %** | +20.6 ms | | `LATE_FILLS` alone | -0.3 % | -0.0 ms | | `SEND_FREE_FIRST` alone | -0.4 % | +0.0 ms (preparation -0.4 ms) | | `SWEEP_AHEAD` alone | -0.8 % | -0.3 ms (preparation +0.0 ms) | The learning of late-written pages makes the submitting thread wait on the card: @tillo88's [run](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4815#issuecomment-7315904821) shows the learn line active ("1.00 submissions waited for a learned page; 141 pages learned", "175.0 fills in 4.00 submissions done when the card got to them (VICTORY_LATE_FILLS)" a frame), and its p99 improving (63.7 → 56.4 and 49.0 ms across the two runs) is not a mitigating factor, as that comment itself says — at about 27.6 fps every frame is longer. `LATE_FILLS` does nothing without `CARD_STEPS_LEARN` (it only softens that loss), so both stay at their off defaults; players who see the stretched skinned characters the learn machinery fixes can still opt in with `--set VICTORY_CARD_STEPS_LEARN=1 --set VICTORY_LATE_FILLS=1`, accepting the measured cost. ### Why these two flags are isolated They are the only two of the four whose ablations measured no cost: `SEND_FREE_FIRST` -0.4 % (preparation -0.4 ms, waiting +0.0 ms) and `SWEEP_AHEAD` -0.8 % (preparation +0.0 ms, waiting -0.3 ms), both within the controls' spread of 1.9 to 4.2 ms of preparation on that rig. Neither measured a gain anywhere, and neither was ablated on the second rig (which ran all four together); they are kept for the card-idle pattern their docs record, at a measured cost of nothing. No code changes. Each switch stays overridable per run — `--set NAME=0` in `victory play`, `-More @{NAME='0'}` in the launcher — and the F1 menu's saved settings win over both launchers' tables. ## How it was tested - GPU and profile: none available where this was prepared. The numbers above are the two benches of #4815's first version; these two switches were ablated only on the RTX 5070 rig. - Before: / After: — not re-measured; #4815's benches are the before. - For shader changes, the wave sizes tested (32 and/or 64 lanes): — (no shader changes). - `cargo test` passed for the crates it touches: `cargo check -p victory` does not compile on the unchanged base (`main` at 5fabb46e before this rebase, same pins now) in the environment where this was prepared — 93 pre-existing errors in `victory-gpu` with the pinned toolchain, on a clean checkout with no changes. The change touches only launcher default tables and README rows; CI on Windows is the arbiter. What was checked instead, on the rebased tree: both switches still exist and the launchers' value `1` turns each on (`SEND_FREE_FIRST` is `switch::on`, on unless `0`; `SWEEP_AHEAD` reads exactly `1`); neither is in either launcher's default table on main; the diff touches no other default; and the override chain was read in both files (menu saves and `--set`/`-More` insert over the tables before the environment is written). ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: #4815 (this PR's revised, two-switch form), #3809 (four other play defaults in the same two files), #1780 (the learn machinery), #4558 and #4226 (the sweep), #3854, #2237. ## A call to measure If you can run this title on your rig: please benchmark this PR against an unmodified build — same save, same route, switches at their defaults, and an ablation arm with `VICTORY_SEND_FREE_FIRST=0 VICTORY_SWEEP_AHEAD=0` if you can spare a third run. Post your numbers on this PR either way, including null results: the two switches here have only one rig's ablation behind them, and a defaults change should not merge on less than that.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/5044:upstream-pr/5044'
git switch 'upstream-pr/5044'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/5044'
git switch 'upstream-pr/5044'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/5044'
git switch 'upstream-pr/5044'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/5044'
git switch 'main'
git merge --squash 'upstream-pr/5044'
git switch 'main'
git merge --ff-only 'upstream-pr/5044'
git switch 'main'
git merge 'upstream-pr/5044'
git push origin 'main'
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!5044
No description provided.