Card meter: VICTORY_CARD_METER_ROWS=<n>, how many of the largest pipelines its per-pipeline table says (48 by default) #4229

Closed
github-bot wants to merge 11 commits from github-bot/gh-4228 into main AGit
Owner

@⁠Denkiyaa on GitHub · 2026-11-30 17:36 UTC · original
Denkiyaa:pr/card-meter-rows → main · +780 −821 · 33 files · 11 commits · closed without merging

Fixes #

What it changes

A diagnostic only. The card meter's per-pipeline table (VICTORY_CARD_METER_PIPELINES=1) logs the 48 pipelines that took the most of the card's time over 256 frames. A family of programs (the ray-traced light's gathers, the volumetrics, one effect's passes) is spread over many pipelines, most of them below the 48th, so its share of the card cannot be summed from the log. VICTORY_CARD_METER_ROWS=<n> says how many rows the table logs (read once; 48 by default, so nothing changes unless it is set; 0 or a value that does not parse keeps 48; a large number gives every row). With every row, the card's time can be summed by program family outside the layer, from the names in the log.

One finding from using it, on the PC below: one compute program, CS_TransmissionVolumetrics_Tiled_LocalLights, took 15-22 ms of the card a dispatch when it ran, and was the largest part of what slow launches (17 rendered frames a second instead of 23-25) had over normal ones. Main has since left both water-light programs out on 32-lane cards (VICTORY_WATER_LIGHT), so that one is settled there; the switch is for the next such question.

File: crates/victory-gpu/src/cardmeter.rs (7 lines).

How it was tested

  • GPU and profile (Series X or S, resolution, DLSS, frame generation, ray tracing): RTX 5070 Ti 16 GB, Ryzen 7 9800X3D, 32 GB RAM, Linux under Proton (GE-Proton11-15), Series S profile, DLSS Quality. Used with VICTORY_CARD_METER_PIPELINES=1 and a large VICTORY_CARD_METER_ROWS to sum the card's time by program family; measured on a branch of this repository carrying other ports besides this change. Not run on Windows.
  • Before: the table stops at 48 rows.
  • After: it logs as many rows as asked; unset, the same 48 as before.
  • For shader changes, the wave sizes tested (32 and/or 64 lanes): no shader change.
  • cargo test passed for the crates it touches: no, not run. victory-gpu's tests need Windows, and this was prepared on Linux. What was run: cargo xwin clippy -p victory-gpu --all-targets --locked --target x86_64-pc-windows-msvc -- -D warnings on this branch (cut from main 84bd61e2): it builds; the only two findings are main's own, in files this PR does not touch (method ranged is never used in shadow.rs:7197, manual implementation of .is_multiple_of() in host.rs:5092), and with those two lints allowed it passes with no other warning. cargo xtask policy --staged passed.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: #3075 (VICTORY_GPU_TIMING_ALSO, the same need for the timing run's top-40 list in copystat.rs; this is the card meter's table, which needs no timing run); #3671 touches cardmeter.rs above this line (sample retirement), no textual overlap expected; #2852 (timed pipeline rebinds, in host.rs) feeds the same table; #4203 adds card time by kind in release builds in another module (card_time.rs).

Written with Claude Code (Claude Opus 5.5): the measurements were run by me on my PC; the code and this text were prepared with it.

🤖 Generated with Claude Code

**@⁠Denkiyaa** on GitHub · 2026-11-30 17:36 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4228) `Denkiyaa:pr/card-meter-rows` → `main` · +780 −821 · 33 files · 11 commits · closed without merging <!-- Thanks for the pull request. Please label it (pr-fix, pr-feature, pr-performance, pr-diagnostics, pr-refactor, pr-docs or pr-tests, plus the area labels), or put the label in the title, like [pr-fix]. --> Fixes # ## What it changes A diagnostic only. The card meter's per-pipeline table (`VICTORY_CARD_METER_PIPELINES=1`) logs the 48 pipelines that took the most of the card's time over 256 frames. A family of programs (the ray-traced light's gathers, the volumetrics, one effect's passes) is spread over many pipelines, most of them below the 48th, so its share of the card cannot be summed from the log. `VICTORY_CARD_METER_ROWS=<n>` says how many rows the table logs (read once; 48 by default, so nothing changes unless it is set; 0 or a value that does not parse keeps 48; a large number gives every row). With every row, the card's time can be summed by program family outside the layer, from the names in the log. One finding from using it, on the PC below: one compute program, `CS_TransmissionVolumetrics_Tiled_LocalLights`, took 15-22 ms of the card a dispatch when it ran, and was the largest part of what slow launches (17 rendered frames a second instead of 23-25) had over normal ones. Main has since left both water-light programs out on 32-lane cards (`VICTORY_WATER_LIGHT`), so that one is settled there; the switch is for the next such question. File: `crates/victory-gpu/src/cardmeter.rs` (7 lines). ## How it was tested - GPU and profile (Series X or S, resolution, DLSS, frame generation, ray tracing): RTX 5070 Ti 16 GB, Ryzen 7 9800X3D, 32 GB RAM, Linux under Proton (GE-Proton11-15), Series S profile, DLSS Quality. Used with `VICTORY_CARD_METER_PIPELINES=1` and a large `VICTORY_CARD_METER_ROWS` to sum the card's time by program family; measured on a branch of this repository carrying other ports besides this change. Not run on Windows. - Before: the table stops at 48 rows. - After: it logs as many rows as asked; unset, the same 48 as before. - For shader changes, the wave sizes tested (32 and/or 64 lanes): no shader change. - `cargo test` passed for the crates it touches: no, not run. `victory-gpu`'s tests need Windows, and this was prepared on Linux. What was run: `cargo xwin clippy -p victory-gpu --all-targets --locked --target x86_64-pc-windows-msvc -- -D warnings` on this branch (cut from main 84bd61e2): it builds; the only two findings are main's own, in files this PR does not touch (`method ranged is never used` in `shadow.rs:7197`, `manual implementation of .is_multiple_of()` in `host.rs:5092`), and with those two lints allowed it passes with no other warning. `cargo xtask policy --staged` passed. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: #3075 (`VICTORY_GPU_TIMING_ALSO`, the same need for the timing run's top-40 list in `copystat.rs`; this is the card meter's table, which needs no timing run); #3671 touches `cardmeter.rs` above this line (sample retirement), no textual overlap expected; #2852 (timed pipeline rebinds, in `host.rs`) feeds the same table; #4203 adds card time by kind in release builds in another module (`card_time.rs`). --- Written with Claude Code (Claude Opus 5.5): the measurements were run by me on my PC; the code and this text were prepared with it. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
For summing the card's time of a family of programs (the ray-traced
light's gathers, the volumetrics) outside the layer: with every row, the
log holds each pipeline's time and its name. Used that way on an RTX
5070 Ti under Proton, one compute program,
CS_TransmissionVolumetrics_Tiled_LocalLights, took 15-22 ms of the card a
dispatch when it ran, and was the largest part of what slow launches had
over normal ones. 48 by default, as before; 0 or a value that does not
parse keeps 48.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 18:09:06 +00:00
github-bot closed this pull request 2026-12-01 18:50:24 +00:00
Author
Owner

@⁠trustno1-coder on GitHub · 2026-12-01 18:45 UTC · original

Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

**@⁠trustno1-coder** on GitHub · 2026-12-01 18:45 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4228#issuecomment-7321478000) Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

Pull request closed

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!4229
No description provided.