A submission's refreshes go to the kept threads several at a time (VICTORY_WIDE_CHUNK=<n>, 1 by default: as before) #126

Merged
1mosce merged 1 commit from upstream-pr/126 into main 2026-11-28 19:01:28 +00:00
1mosce commented 2026-11-27 18:31:42 +00:00 (Migrated from github.com)

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


What

VICTORY_WIDE_CHUNK=<n> (1 by default: as before; 256 at most): a submission's refreshes of copies go to the kept threads n at a time, and no more threads are woken than there are such shares. In refresh_front and in the light path of flush_all.

shadow::wide_each_from(n, single, chunk, work): the numbers under single go one at a time (the textures of refresh_front: the longer pieces, each may be a thread's whole share), the others chunk at a time; with fewer than two shares the work is done where it is, without the queue. With a chunk of 1 it is wide_each.

What is done to each copy does not change, only which thread does it and how many are woken for it.

Why

Session of 2026-11-28, RTX 4070 Laptop (8 GiB), Ryzen 9 8945HS, Series S profile, the submitting thread's line:

  • indoors, 5,400 draws: refreshes 12.7 in 38 flushes of 9584, 8438 of them known to copy nothing, 9086 on several threads;
  • the open world, 5,600 draws: refreshes 16.0 in 52 flushes of 6477, 5242 of them known to copy nothing, 5592 on several threads, up to 21 to 23 ms in some seconds.

So most of what goes to the threads is a look that finds nothing to copy, and each of those takes its number from one counter all the threads share. And a flush with a few small copies left after the looks wakes as many threads as it has pieces (wide_each goes wide from two).

Tested

  • shadow::wide_chunk_tests (new): the numbers are claimed once each, the single ones first; every number is worked once whatever the chunk (0 to 1,000 numbers, chunks 1 to 256). cargo test -p victory-gpu --lib shadow:: wide_chunk_tests: 36 passed, 1 ignored.
  • cargo clippy -p victory-gpu --all-targets --locked: no warning that upstream ca9c75c does not have; cargo xtask policy: 280 files ok.
  • Not measured in the title yet. I will add the refreshes' milliseconds with 1 and with 8 here.

🤖 Generated with Claude Code

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5531407646 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/126). Originally posted by [1mosce](https://github.com/1mosce) on 2026-11-27T18:31:42Z. --- ## What `VICTORY_WIDE_CHUNK=<n>` (1 by default: as before; 256 at most): a submission's refreshes of copies go to the kept threads `n` at a time, and no more threads are woken than there are such shares. In `refresh_front` and in the light path of `flush_all`. `shadow::wide_each_from(n, single, chunk, work)`: the numbers under `single` go one at a time (the textures of `refresh_front`: the longer pieces, each may be a thread's whole share), the others `chunk` at a time; with fewer than two shares the work is done where it is, without the queue. With a chunk of 1 it is `wide_each`. What is done to each copy does not change, only which thread does it and how many are woken for it. ## Why Session of 2026-11-28, RTX 4070 Laptop (8 GiB), Ryzen 9 8945HS, Series S profile, the submitting thread's line: - indoors, 5,400 draws: `refreshes 12.7 in 38 flushes of 9584, 8438 of them known to copy nothing, 9086 on several threads`; - the open world, 5,600 draws: `refreshes 16.0 in 52 flushes of 6477, 5242 of them known to copy nothing, 5592 on several threads`, up to 21 to 23 ms in some seconds. So most of what goes to the threads is a look that finds nothing to copy, and each of those takes its number from one counter all the threads share. And a flush with a few small copies left after the looks wakes as many threads as it has pieces (`wide_each` goes wide from two). ## Tested - `shadow::wide_chunk_tests` (new): the numbers are claimed once each, the single ones first; every number is worked once whatever the chunk (0 to 1,000 numbers, chunks 1 to 256). `cargo test -p victory-gpu --lib shadow:: wide_chunk_tests`: 36 passed, 1 ignored. - `cargo clippy -p victory-gpu --all-targets --locked`: no warning that upstream `ca9c75c` does not have; `cargo xtask policy`: 280 files ok. - **Not measured in the title yet.** I will add the refreshes' milliseconds with 1 and with 8 here. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
cloph-dsp commented 2026-11-28 02:01:09 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by cloph-dsp on 2026-11-28T02:01:09Z.


Independent local verification (Windows, Rust 1.100.0/MSVC, no game data):

  • PR #126 at head 7ab985d0470082ed8ed00df80ff0c355ec6f511c, single-commit parent/base ca9c75cd6d59b04a096746b313baed986608e63a.
  • cargo test --locked -p victory-gpu --lib -- shadow::wide_chunk_tests::numbers_are_claimed_once_each_the_single_ones_first --exact --test-threads=1 --quiet → 1 passed, 0 failed, 456 filtered, exit 0.
  • git grep -F for the test name on the base returned no hits (test is new on this PR); git diff --check ca9c75cd HEAD clean (2 files, +113/-2).
  • Used a per-worktree CARGO_TARGET_DIR (never shared) with CARGO_BUILD_JOBS=2; local clone is shallow so the PR's single-commit parent was used as base instead of a merge-base.
  • Only the named synthetic test was replayed; full workspace suite and clippy were not run locally (no clippy component on this toolchain). Pre-existing compiler warnings present.
  • GPU/driver: N/A (CPU-only shadow test). No game data, assets, extracted shaders, DRM or decrypt involved.

AI-assisted (Hy4 flash).

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7232072158 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/126#issuecomment-7232072158). Originally posted by [cloph-dsp](https://github.com/cloph-dsp) on 2026-11-28T02:01:09Z. --- Independent local verification (Windows, Rust 1.100.0/MSVC, no game data): - PR #126 at head `7ab985d0470082ed8ed00df80ff0c355ec6f511c`, single-commit parent/base `ca9c75cd6d59b04a096746b313baed986608e63a`. - `cargo test --locked -p victory-gpu --lib -- shadow::wide_chunk_tests::numbers_are_claimed_once_each_the_single_ones_first --exact --test-threads=1 --quiet` → 1 passed, 0 failed, 456 filtered, exit 0. - `git grep -F` for the test name on the base returned no hits (test is new on this PR); `git diff --check ca9c75cd HEAD` clean (2 files, +113/-2). - Used a per-worktree `CARGO_TARGET_DIR` (never shared) with `CARGO_BUILD_JOBS=2`; local clone is shallow so the PR's single-commit parent was used as base instead of a merge-base. - Only the named synthetic test was replayed; full workspace suite and clippy were not run locally (no clippy component on this toolchain). Pre-existing compiler warnings present. - GPU/driver: N/A (CPU-only shadow test). No game data, assets, extracted shaders, DRM or decrypt involved. AI-assisted (Hy4 flash).
Yoshi-233 commented 2026-11-28 13:34:25 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Yoshi-233 on 2026-11-28T13:34:25Z.


Measured chunk 1 vs 8 on an i7-14700K / RTX 4070 Ti SUPER in a fixed indoor view (Series X, 2560×1440 to 3840×2160 DLSS Quality M, 2× frame generation). The same executable alternated the chunk size every 16 s. We kept six full alternating intervals with matching screenshots, dropped the first second of each, and timed the game's own presents separately from PresentMon's displayed intervals.

Chunk 1 Chunk 8
Rendered frames measured 787 782
Rendered FPS 17.45 17.34
Median / P99 render time (ms) 56.61 / 79.08 56.81 / 82.04
Rendered 1% low (slowest 1% mean time, converted to FPS) 12.40 11.20
Displayed FPS 34.89 34.67
Refresh work (ms/frame) 14.6 14.5
Refresh items / items known to need no copy (per frame) 7,999 / 6,951 7,824 / 6,808

The two Windows worker tests passed. The medians in this room were very close. I would keep chunk 1 on this machine based on this sample. There were only three intervals per setting, so the difference in tail times is provisional.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7240031194 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/126#issuecomment-7240031194). Originally posted by [Yoshi-233](https://github.com/Yoshi-233) on 2026-11-28T13:34:25Z. --- Measured chunk 1 vs 8 on an i7-14700K / RTX 4070 Ti SUPER in a fixed indoor view (Series X, 2560×1440 to 3840×2160 DLSS Quality M, 2× frame generation). The same executable alternated the chunk size every 16 s. We kept six full alternating intervals with matching screenshots, dropped the first second of each, and timed the game's own presents separately from PresentMon's displayed intervals. | | Chunk 1 | Chunk 8 | | --- | ---: | ---: | | Rendered frames measured | 787 | 782 | | Rendered FPS | 17.45 | 17.34 | | Median / P99 render time (ms) | 56.61 / 79.08 | 56.81 / 82.04 | | Rendered 1% low (slowest 1% mean time, converted to FPS) | 12.40 | 11.20 | | Displayed FPS | 34.89 | 34.67 | | Refresh work (ms/frame) | 14.6 | 14.5 | | Refresh items / items known to need no copy (per frame) | 7,999 / 6,951 | 7,824 / 6,808 | The two Windows worker tests passed. The medians in this room were very close. I would keep chunk 1 on this machine based on this sample. There were only three intervals per setting, so the difference in tail times is provisional.
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!126
No description provided.