Release profile: the program optimised as one unit (fat LTO, one codegen unit) #128

Merged
1mosce merged 1 commit from upstream-pr/128 into main 2026-11-30 14:12:04 +00:00
1mosce commented 2026-11-27 18:31:48 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by 1mosce on 2026-11-27T18:31:48Z.


Draft: opened for the idea and the build-time figure; the frame times are not measured yet.

What

The release profile (and diag, which inherits it) builds the program as one unit: lto = "fat", codegen-units = 1. Nothing else changes; the code does the same.

Why

The frame is bound by the processor on the machines I can measure, and the hot paths cross crates: the title's list calls go through victory-gpu into the translator and the formats, and the submitting thread's steps are spread over host, shadow, watch and land. With sixteen codegen units and no link-time optimisation nothing is inlined across those borders but what is marked for it.

Session of 2026-11-28, RTX 4070 Laptop (8 GiB), Ryzen 9 8945HS (8 cores, 16 threads), Series S profile: the thread that prepares submissions worked 52 to 54 ms of a 54 to 57 ms frame at 4,000 to 5,000 draws, the card 58 to 79 % busy; the lists' translation took 333 to 494 ms of processor time a frame over its threads.

What it costs

The build. On the same machine a full cargo build --release --locked -p victory took 1 min 15 s before (2026-11-27) and 3 min 24 s with this (2026-11-28; other compiles were running beside it, and -C target-cpu=native was set locally, so the second figure is on the high side). Everyone who builds at the launcher's first start waits that much longer, once; every rebuild of a changed crate ends in the same whole-program step.

If that is too much for the default, a second profile ([profile.fast] inherits = "release") that the launcher takes with a switch would keep today's build as it is.

Not measured

The frame. I have the build and no run with it yet; I will add the submitting thread's and the translation's milliseconds for the same scene with and without it, and mark this ready only if they show something.

🤖 Generated with Claude Code

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5531408806 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/128). Originally posted by [1mosce](https://github.com/1mosce) on 2026-11-27T18:31:48Z. --- **Draft: opened for the idea and the build-time figure; the frame times are not measured yet.** ## What The release profile (and `diag`, which inherits it) builds the program as one unit: `lto = "fat"`, `codegen-units = 1`. Nothing else changes; the code does the same. ## Why The frame is bound by the processor on the machines I can measure, and the hot paths cross crates: the title's list calls go through `victory-gpu` into the translator and the formats, and the submitting thread's steps are spread over `host`, `shadow`, `watch` and `land`. With sixteen codegen units and no link-time optimisation nothing is inlined across those borders but what is marked for it. Session of 2026-11-28, RTX 4070 Laptop (8 GiB), Ryzen 9 8945HS (8 cores, 16 threads), Series S profile: the thread that prepares submissions worked 52 to 54 ms of a 54 to 57 ms frame at 4,000 to 5,000 draws, the card 58 to 79 % busy; the lists' translation took 333 to 494 ms of processor time a frame over its threads. ## What it costs The build. On the same machine a full `cargo build --release --locked -p victory` took 1 min 15 s before (2026-11-27) and 3 min 24 s with this (2026-11-28; other compiles were running beside it, and `-C target-cpu=native` was set locally, so the second figure is on the high side). Everyone who builds at the launcher's first start waits that much longer, once; every rebuild of a changed crate ends in the same whole-program step. If that is too much for the default, a second profile (`[profile.fast] inherits = "release"`) that the launcher takes with a switch would keep today's build as it is. ## Not measured The frame. I have the build and no run with it yet; I will add the submitting thread's and the translation's milliseconds for the same scene with and without it, and mark this ready only if they show something. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
meonline42 commented 2026-11-29 09:18:11 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by meonline42 on 2026-11-29T09:18:11Z.


Measurements from a Zen 3 + Ampere machine, in case they're useful (stacked builds, so most PRs aren't isolated, see below).

Machine: Ryzen 9 5900X (thermally limited: ~3.7 GHz average, Tctl 80-87 °C), RTX 3090 at 350 W, 64 GB DDR4-3200, Windows 11. Series X profile, 1080p rendered to 1440p, DLSS Performance, FSR 3 frame generation 2x.
Base: main at e1f2eb6, plus a local keyboard-input patch (victory-hle only, nothing in the GPU path).
Method: each build was started unattended from the same save, standing still, and measured for 150 s once the world was drawn. The scene isn't identical between runs (traffic and time of day differ), so I also bucketed the 5-second victory_gpu::host lines by draws per frame.

Build (stacked, each on top of the one above) fps median ms/frame, 6,000-6,999 draws ms/frame, 12,000-12,999 draws
main e1f2eb6 16 57.9 (n=3) -
+ #1403 #1279 #2049 #1937 17 56.8 (n=22) 77.6 (n=4)
+ #1988 with VICTORY_PRESENT_QUEUE=1 18 55.9 (n=24) 75.5 (n=10)
#1403 #1279 #2049 #1937 + #128 (fat LTO), no present queue 18 55.0 (n=26) 74.0 (n=8)
  • Each step moves in the right direction, but the gains (1-2 ms per step, about 5% in total) are close to run-to-run noise on this setup.
  • No crashes or visible problems in any run, but standing still doesn't exercise much.
  • #1937: the launcher here already set VICTORY_SPANS_QUICK=1, so its default flip made no difference in this run.
  • #128: a full release build took 4 min 23 s on the 5900X.
  • On this machine, most of the frame is still preparing: copies of 24-28 ms for 60-70 MB per frame, and the card busy only a few ms. Copy-back dropped from ~13 ms to ~6.5 ms between 923e38c and e1f2eb6.

Posted by Claude Code on behalf of the machine's owner.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7253672497 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/128#issuecomment-7253672497). Originally posted by [meonline42](https://github.com/meonline42) on 2026-11-29T09:18:11Z. --- Measurements from a Zen 3 + Ampere machine, in case they're useful (stacked builds, so most PRs aren't isolated, see below). **Machine:** Ryzen 9 5900X (thermally limited: ~3.7 GHz average, Tctl 80-87 °C), RTX 3090 at 350 W, 64 GB DDR4-3200, Windows 11. Series X profile, 1080p rendered to 1440p, DLSS Performance, FSR 3 frame generation 2x. **Base:** `main` at `e1f2eb6`, plus a local keyboard-input patch (victory-hle only, nothing in the GPU path). **Method:** each build was started unattended from the same save, standing still, and measured for 150 s once the world was drawn. The scene isn't identical between runs (traffic and time of day differ), so I also bucketed the 5-second `victory_gpu::host` lines by draws per frame. | Build (stacked, each on top of the one above) | fps median | ms/frame, 6,000-6,999 draws | ms/frame, 12,000-12,999 draws | |---|---|---|---| | `main` e1f2eb6 | 16 | 57.9 (n=3) | - | | + #1403 #1279 #2049 #1937 | 17 | 56.8 (n=22) | 77.6 (n=4) | | + #1988 with `VICTORY_PRESENT_QUEUE=1` | 18 | 55.9 (n=24) | 75.5 (n=10) | | #1403 #1279 #2049 #1937 + #128 (fat LTO), no present queue | 18 | 55.0 (n=26) | 74.0 (n=8) | - Each step moves in the right direction, but the gains (1-2 ms per step, about 5% in total) are close to run-to-run noise on this setup. - No crashes or visible problems in any run, but standing still doesn't exercise much. - #1937: the launcher here already set `VICTORY_SPANS_QUICK=1`, so its default flip made no difference in this run. - #128: a full release build took 4 min 23 s on the 5900X. - On this machine, most of the frame is still `preparing`: copies of 24-28 ms for 60-70 MB per frame, and the card busy only a few ms. Copy-back dropped from ~13 ms to ~6.5 ms between `923e38c` and `e1f2eb6`. Posted by Claude Code on behalf of the machine's owner.
DoubleD17 commented 2026-11-30 03:37:10 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by DoubleD17 on 2026-11-30T03:37:10Z.


We ran a test of this profile (fat LTO, one codegen unit) on current main, on a CPU-bound machine (about 66 ms of CPU preparation per frame).

CPU prep (ms/frame) controls at that point fps (mean) controls at that point
round 1 72.2 69.3 11.80 11.85
round 2 66.3 68.4 12.58 11.65
mean difference +0.4 ms +3.8 %

No gain we can measure here (the controls alone spread over 9 ms). The release build took 5 min instead of 1.5 min. The picture was clean (0 defects in 160 frames).

Setup:

  • Ryzen 7 5800X (8 cores, 16 threads), RTX 5070 12 GB (DXGI budget 11,175 MB), 64 GB RAM, Windows 11;
  • Series X, 1440p with DLAA (DLSS at native resolution; corrected, this line said DLSS Performance at first), frame generation and ray tracing off;
  • the PR merged locally onto main 41adb551 (only its own commits on top), against 41adb551 itself;
  • a warm-up run per build, then 150 s runs in two rounds (the second in reverse order), with four control runs of 41adb551 spread through the session;
  • every run starts from the same save, restored before each run;
  • figures are medians of the 5 s host lines. The four controls measured 60.4–69.4 ms of CPU preparation per frame and drifted during the session, so each run is compared with the controls interpolated to its own start.

Picture check: a burst of 10 captures a second at the end of each run (80 frames), looked at frame by frame.

AI Assisted

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7268048303 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/128#issuecomment-7268048303). Originally posted by [DoubleD17](https://github.com/DoubleD17) on 2026-11-30T03:37:10Z. --- We ran a test of this profile (fat LTO, one codegen unit) on current main, on a CPU-bound machine (about 66 ms of CPU preparation per frame). | | CPU prep (ms/frame) | controls at that point | fps (mean) | controls at that point | |---|---|---|---|---| | round 1 | 72.2 | 69.3 | 11.80 | 11.85 | | round 2 | 66.3 | 68.4 | 12.58 | 11.65 | | **mean difference** | **+0.4 ms** | | **+3.8 %** | | No gain we can measure here (the controls alone spread over 9 ms). The release build took 5 min instead of 1.5 min. The picture was clean (0 defects in 160 frames). **Setup:** - Ryzen 7 5800X (8 cores, 16 threads), RTX 5070 12 GB (DXGI budget 11,175 MB), 64 GB RAM, Windows 11; - Series X, 1440p with DLAA (DLSS at native resolution; corrected, this line said DLSS Performance at first), frame generation and ray tracing off; - the PR merged locally onto main 41adb551 (only its own commits on top), against 41adb551 itself; - a warm-up run per build, then 150 s runs in two rounds (the second in reverse order), with four control runs of 41adb551 spread through the session; - every run starts from the same save, restored before each run; - figures are medians of the 5 s host lines. The four controls measured 60.4–69.4 ms of CPU preparation per frame and drifted during the session, so each run is compared with the controls interpolated to its own start. Picture check: a burst of 10 captures a second at the end of each run (80 frames), looked at frame by frame. AI Assisted
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!128
No description provided.