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

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

@⁠githubkdskkd on GitHub · 2026-12-01 18:14 UTC · original
githubkdskkd:card-idle-two-switches → main · +22 −2 · 3 files · 1 commits · open

Refs #4816

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)

#4816'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 #4816's first version; these two switches were ablated only on the RTX 5070 rig.
  • Before: / After: — not re-measured; #4816'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: #4816 (this PR's revised, two-switch form), #3809 (four other play defaults in the same two files), #1780 (the learn machinery), #4559 and #4227 (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.

**@⁠githubkdskkd** on GitHub · 2026-12-01 18:14 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/5044) `githubkdskkd:card-idle-two-switches` → `main` · +22 −2 · 3 files · 1 commits · open Refs #4816 ## 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) #4816'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://git.gtahub.st/github/trustno1-coder--VIctory-NVIDIA/pulls/4816) 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://git.gtahub.st/github/trustno1-coder--VIctory-NVIDIA/pulls/4816) 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 #4816's first version; these two switches were ablated only on the RTX 5070 rig. - Before: / After: — not re-measured; #4816'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: #4816 (this PR's revised, two-switch form), #3809 (four other play defaults in the same two files), #1780 (the learn machinery), #4559 and #4227 (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.
SEND_FREE_FIRST sends a submission blocked on flights in the air its first
lists, which need nothing from that work, at once, so the card does not run
dry while the submitting thread prepares the rest (host.rs:6331-6345,
applied at 9677). SWEEP_AHEAD lets the once-a-second sweep run beside
flights in the air instead of draining the card for it (host.rs:4820-4835,
applied at 10265). Both measured neutral in the ablations of PR 4815 (an
RTX 5070: -0.4 % and -0.8 %, within the controls' spread). CARD_STEPS_LEARN
and VICTORY_LATE_FILLS stay at their off defaults: measured there at
-29.0 % and -21.5 % fps (PR 4815's comments).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 18:18:56 +00:00
github-bot force-pushed github-bot/gh-5044 from 1543c144ac to be77d718f4 2026-12-01 18:43:20 +00:00 Compare
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/5045/head:github-bot/gh-5044'
git switch 'github-bot/gh-5044'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-5044'
git switch 'github-bot/gh-5044'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-5044'
git switch 'github-bot/gh-5044'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-5044'
git switch 'main'
git merge --squash 'github-bot/gh-5044'
git switch 'main'
git merge --ff-only 'github-bot/gh-5044'
git switch 'main'
git merge 'github-bot/gh-5044'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!5045
No description provided.