Give NVIDIA cards of 10 to 19 GB their memory settings under auto #339

Manually merged
github merged 5 commits from github-bot/gh-339 into gh-pr/339/base 2026-11-27 18:03:08 +00:00 AGit
Owner

@⁠maximecmb on GitHub · 2026-11-27 17:48 UTC · original
maximecmb:fix/auto-nvidia-card-memory → main · +139 −7 · 4 files · 5 commits · merged 2026-11-27 18:01 UTC

Summary

-Machine auto sizes three worker counts to the CPU (since 7afb2da) and keeps the RTX 4090's memory settings on every NVIDIA card. Under a 20 GiB budget those leave title buffers under 4 MiB in the PC's memory, and that is what holds smaller cards back, not the worker counts: on an RTX 5080 with eight cores the automatic profile ran one scene at a median of 16.4 fps, -Machine 4070tisuper at 28.9.

With this change the automatic profile adds, by the card's memory as its driver records it:

NVIDIA card Added, outside -Safe
15 to 19 GB the 4070tisuper preset's memory settings
10 to 14 GB the 4070 preset's memory settings
20 GB and more, under 10 GB, or memory not read nothing

Up to eight cores it also sets the presets' VICTORY_PIPELINE_WORKERS=3. The explicit presets are unchanged, -Machine 4090 still gives the 4090 settings to any card, and -More overrides each setting. The launcher prints one line when it adds the memory settings, naming -Machine 4090 as the way back.

This builds on the docs PR for the same PC (335) and contains its commits: it replaces that PR's "try this preset" line with the behaviour, and adds runs 10 to 12 and the table above to docs/rtx5080-16gb.md. Merging this one alone carries both; if 335 goes in first, this reduces to the launcher change and the doc additions.

Measurements

RTX 5080 16 GB (driver 617.42), Ryzen 7 9800X3D, 64 GB, Series S, diagnostics build of fcded4e (run 12: 55d8038 plus this launcher change; no translator change between them). All three runs started from the same copy of a warmed cache and of the saves, ran unattended for 150 s of the opening cutscene (about 3,100 draws a frame) and were recorded.

Run Settings fps median / p10 ms a frame on the GPU Pipelines being made when the world began
10 -Machine 4070tisuper 28.9 / 23.7 34.6 0.8 0
11 -Machine auto before this change 16.4 / 3.5 60.9 21.7 125
12 -Machine auto with this change 27.5 / 22.8 36.4 0.8 0

Run 12's log: card buffer limits vram_budget_mb=15209 card_buffers_min_kb=64 card_buffers_max_mb=1536, pipeline workers workers=3, card memory the CPU maps supported=true.

Why these thresholds

  • 20 GB is where shadow.rs switches the default card-buffer tier (default_card_limits_mb): from there the defaults already put 1 MiB buffers in the card's memory.
  • 10 to 19 GB is the range the explicit presets' memory settings were measured on: RTX 3080 10 GB (7.4 to 14.7 fps), RTX 4070 and RTX 5070 Ti in docs/rtx4070-performance.md, RTX 3060 12 GB in docs/rtx3060-16gb.md, RTX 5080 here.
  • Under 10 GB stays as it is: the laptop preset that fits those cards trades other things (docs/laptop-16gb.md).
  • Three pipeline workers up to eight cores is what the 4070, 4070tisuper and 3060 presets set. Two short runs here changed one count each on top of the preset (10 workers; page mapping on several threads): neither alone left pipelines unmade. Together, as the automatic profile had them, they did (run 11). VICTORY_MAP_THREADS=auto is left as the automatic profile has it.

What this does not cover

  • One PC. Only the 16 GB, eight-core case was run. The 10 to 14 GB branch and the six-core case are the existing presets' settings applied by the same rule, exercised here only as logic.
  • PCs with 16 GB of RAM. A card copy keeps its CPU side in RAM. The 3060 preset has the same settings on such a PC and measured faster than the old defaults, but this profile does not add its 3 GB of windows the CPU maps.
  • Run 12 against run 10. One run each; the 1.4 fps between them is more than two identical runs differed by here (0.1 and 0.6), and their only difference is VICTORY_MAP_THREADS (auto against 1). Not run again.
  • The open world. Only the opening cutscene can be reached unattended.

Visual review

Runs 10 to 12 were reviewed from one frame every 5 s of each recording. Run 12 shows the same shots, lighting, credits and HUD as run 10. Run 11 had pale green bars above and below the picture for about 12 s at the start of the world (0:41 to 0:53), while pipelines were still being made; runs 10 and 12 do not. Recordings stay local under the asset policy.

Verification

  • Get-AutoNvidiaSettings taken from the script and called for twelve cases (16 GB / 8 cores with and without -Safe, 12 GB / 6, 10 GB / 14, 24 GB / 16 and / 8, 32 GB / 24, 20 GB / 12, 6 GB / 14, 8 GB / 8, memory unread / 8 and / 16): each returns the settings in the table and nothing else.
  • On this PC the launcher prints the new line under -Machine auto, not under -Machine auto -Safe and not under -Machine 4090.
  • scripts\play.ps1 parses with no errors (the CI launcher check); cargo test -p xtask and cargo xtask policy pass. No Rust changes.

🤖 Generated with Claude Code

**@⁠maximecmb** on GitHub · 2026-11-27 17:48 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/339) `maximecmb:fix/auto-nvidia-card-memory` → `main` · +139 −7 · 4 files · 5 commits · merged 2026-11-27 18:01 UTC ## Summary `-Machine auto` sizes three worker counts to the CPU (since `7afb2da`) and keeps the RTX 4090's memory settings on every NVIDIA card. Under a 20 GiB budget those leave title buffers under 4 MiB in the PC's memory, and that is what holds smaller cards back, not the worker counts: on an RTX 5080 with eight cores the automatic profile ran one scene at a median of 16.4 fps, `-Machine 4070tisuper` at 28.9. With this change the automatic profile adds, by the card's memory as its driver records it: | NVIDIA card | Added, outside `-Safe` | |---|---| | 15 to 19 GB | the `4070tisuper` preset's memory settings | | 10 to 14 GB | the `4070` preset's memory settings | | 20 GB and more, under 10 GB, or memory not read | nothing | Up to eight cores it also sets the presets' `VICTORY_PIPELINE_WORKERS=3`. The explicit presets are unchanged, `-Machine 4090` still gives the 4090 settings to any card, and `-More` overrides each setting. The launcher prints one line when it adds the memory settings, naming `-Machine 4090` as the way back. This builds on the docs PR for the same PC (335) and contains its commits: it replaces that PR's "try this preset" line with the behaviour, and adds runs 10 to 12 and the table above to `docs/rtx5080-16gb.md`. Merging this one alone carries both; if 335 goes in first, this reduces to the launcher change and the doc additions. ## Measurements RTX 5080 16 GB (driver 617.42), Ryzen 7 9800X3D, 64 GB, Series S, diagnostics build of `fcded4e` (run 12: `55d8038` plus this launcher change; no translator change between them). All three runs started from the same copy of a warmed cache and of the saves, ran unattended for 150 s of the opening cutscene (about 3,100 draws a frame) and were recorded. | Run | Settings | fps median / p10 | ms a frame | on the GPU | Pipelines being made when the world began | |---|---|---|---|---|---| | 10 | `-Machine 4070tisuper` | 28.9 / 23.7 | 34.6 | 0.8 | 0 | | 11 | `-Machine auto` before this change | 16.4 / 3.5 | 60.9 | 21.7 | 125 | | 12 | `-Machine auto` with this change | **27.5** / 22.8 | 36.4 | 0.8 | 0 | Run 12's log: `card buffer limits vram_budget_mb=15209 card_buffers_min_kb=64 card_buffers_max_mb=1536`, `pipeline workers workers=3`, `card memory the CPU maps supported=true`. ## Why these thresholds - **20 GB** is where `shadow.rs` switches the default card-buffer tier (`default_card_limits_mb`): from there the defaults already put 1 MiB buffers in the card's memory. - **10 to 19 GB** is the range the explicit presets' memory settings were measured on: RTX 3080 10 GB (7.4 to 14.7 fps), RTX 4070 and RTX 5070 Ti in `docs/rtx4070-performance.md`, RTX 3060 12 GB in `docs/rtx3060-16gb.md`, RTX 5080 here. - **Under 10 GB** stays as it is: the laptop preset that fits those cards trades other things (`docs/laptop-16gb.md`). - **Three pipeline workers up to eight cores** is what the 4070, 4070tisuper and 3060 presets set. Two short runs here changed one count each on top of the preset (10 workers; page mapping on several threads): neither alone left pipelines unmade. Together, as the automatic profile had them, they did (run 11). `VICTORY_MAP_THREADS=auto` is left as the automatic profile has it. ## What this does not cover - **One PC.** Only the 16 GB, eight-core case was run. The 10 to 14 GB branch and the six-core case are the existing presets' settings applied by the same rule, exercised here only as logic. - **PCs with 16 GB of RAM.** A card copy keeps its CPU side in RAM. The 3060 preset has the same settings on such a PC and measured faster than the old defaults, but this profile does not add its 3 GB of windows the CPU maps. - **Run 12 against run 10.** One run each; the 1.4 fps between them is more than two identical runs differed by here (0.1 and 0.6), and their only difference is `VICTORY_MAP_THREADS` (auto against 1). Not run again. - **The open world.** Only the opening cutscene can be reached unattended. ## Visual review Runs 10 to 12 were reviewed from one frame every 5 s of each recording. Run 12 shows the same shots, lighting, credits and HUD as run 10. Run 11 had pale green bars above and below the picture for about 12 s at the start of the world (0:41 to 0:53), while pipelines were still being made; runs 10 and 12 do not. Recordings stay local under the asset policy. ## Verification - `Get-AutoNvidiaSettings` taken from the script and called for twelve cases (16 GB / 8 cores with and without `-Safe`, 12 GB / 6, 10 GB / 14, 24 GB / 16 and / 8, 32 GB / 24, 20 GB / 12, 6 GB / 14, 8 GB / 8, memory unread / 8 and / 16): each returns the settings in the table and nothing else. - On this PC the launcher prints the new line under `-Machine auto`, not under `-Machine auto -Safe` and not under `-Machine 4090`. - `scripts\play.ps1` parses with no errors (the CI launcher check); `cargo test -p xtask` and `cargo xtask policy` pass. No Rust changes. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
-Machine auto keeps the RTX 4090's memory settings on every NVIDIA
card. Under a 20 GiB budget those leave title buffers under 4 MiB in the
PC's memory (card buffer limits: 4096 KiB minimum). On an RTX 5080 with a
Ryzen 7 9800X3D the opening scene ran at a median of 16 fps with the
4090 settings and 27 fps with -Machine 4070tisuper, with the frame's
"on the GPU" part going from 22 ms to under 1 ms.

scripts\play.ps1 now reads the card's memory from the driver's registry
entry when auto picks the NVIDIA profile and, under 20 GB, prints which
explicit preset to try. No setting changes: the presets stay explicit.

docs/rtx5080-16gb.md has the PC, nine matched and recorded runs that
isolate the preset's parts, and the visual review. README and
docs/this-fork.md link it.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Runs 10 and 11 on fcded4e: -Machine 4070tisuper 28.9 fps, -Machine auto with its CPU-sized worker counts 16.4 fps. The automatic profile keeps the 4090 memory settings, 10 pipeline workers and page mapping on several threads; the pale bars seen in run 5 came back in run 11.

The launcher's line now shows only from 10 GB up, the cards the explicit presets were measured on.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
-Machine auto sized three worker counts to the CPU and kept the RTX
4090's memory settings on every NVIDIA card. Under a 20 GiB budget those
leave title buffers under 4 MiB in the PC's memory. On an RTX 5080 with
eight cores, same build and cache: 16.4 fps median with that automatic
profile, 28.9 with -Machine 4070tisuper.

The automatic profile now adds, by the card's memory as its driver
records it:
- 15 to 19 GB: the 4070tisuper preset's memory settings;
- 10 to 14 GB: the 4070 preset's memory settings;
- other sizes, or a size that cannot be read: nothing.
Not under -Safe, as in those presets. Up to eight cores it also sets the
presets' three pipeline workers: the default ten, next to the
page-mapping threads, left 125 pipelines unmade when the world began.

With it the same PC ran the scene at 27.5 fps with no pipeline left to
make at the start of the world (docs/rtx5080-16gb.md, run 12). The
explicit presets are unchanged, -Machine 4090 still gives the 4090
settings to any card, and -More overrides each setting.

This replaces the launcher line that named the preset to try.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 17:53:46 +00:00
Author
Owner

@⁠hamdanpor-ctrl on GitHub · 2026-11-27 17:51 UTC · original

Checked the small-card branch on a hybrid laptop: Intel Iris Xe plus RTX 3050 Laptop GPU 4 GB, i7-12700H (14 cores, 20 threads), 15.6 GiB, Windows 11 Pro. No game run; scripts\play.ps1 -Exe <missing path> -Console series-s from 2517ff1 and from main at 312f5a8, which stops after printing the settings.

  • The registry read picks the NVIDIA entry (ven_10de), not the Intel one: qwMemorySize 4,294,967,296, so $cardGb = 4.
  • As intended for cards under 10 GB, nothing is added: with 14 cores VICTORY_PIPELINE_WORKERS stays as it was, and no card-buffer settings appear.
  • Output is identical to main: "Settings for the automatic NVIDIA profile.", 8 / 6 / 4 threads for Series S, and the 15.6 GiB page-file note.

AI-assisted (Claude Code).

**@⁠hamdanpor-ctrl** on GitHub · 2026-11-27 17:51 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/339#issuecomment-7224859369) Checked the small-card branch on a hybrid laptop: Intel Iris Xe plus RTX 3050 Laptop GPU 4 GB, i7-12700H (14 cores, 20 threads), 15.6 GiB, Windows 11 Pro. No game run; `scripts\play.ps1 -Exe <missing path> -Console series-s` from `2517ff1` and from `main` at `312f5a8`, which stops after printing the settings. - The registry read picks the NVIDIA entry (`ven_10de`), not the Intel one: `qwMemorySize` 4,294,967,296, so `$cardGb` = 4. - As intended for cards under 10 GB, nothing is added: with 14 cores `VICTORY_PIPELINE_WORKERS` stays as it was, and no card-buffer settings appear. - Output is identical to `main`: "Settings for the automatic NVIDIA profile.", 8 / 6 / 4 threads for Series S, and the 15.6 GiB page-file note. AI-assisted (Claude Code).
Read memory through the device driver key for the detected adapter. Apply the automatic memory settings when a single NVIDIA adapter can be identified. Keep the CPU-based worker settings independent of that lookup.
github-bot changed target branch from main to gh-pr/339/base 2026-11-27 18:03:05 +00:00
github manually merged commit fa0d59e0f3 into gh-pr/339/base 2026-11-27 18:03:08 +00:00
Author
Owner

@⁠TaynanGT on GitHub · 2026-11-27 17:58 UTC · original

@⁠hamdanpor-ctrl The 4 GB dry run at 2517ff1 confirms the small-card boundary on the hybrid laptop. I updated fa0d59e to read the memory from the detected adapter’s device key. The Windows checks cover the same Intel-plus-NVIDIA layout and a stale 24 GB entry beside an active 16 GB card.

**@⁠TaynanGT** on GitHub · 2026-11-27 17:58 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/339#issuecomment-7224977438) @⁠hamdanpor-ctrl The 4 GB dry run at `2517ff1` confirms the small-card boundary on the hybrid laptop. I updated `fa0d59e` to read the memory from the detected adapter’s device key. The Windows checks cover the same Intel-plus-NVIDIA layout and a stale 24 GB entry beside an active 16 GB card.
This discussion has been locked. Commenting is limited to contributors.
No description provided.