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

Manually merged
github merged 1 commit from github-bot/gh-126 into gh-pr/126/base 2026-11-28 19:02:46 +00:00 AGit
Owner

@⁠1mosce on GitHub · 2026-11-27 18:31 UTC · original
1mosce:wide-chunk → main · +113 −2 · 2 files · 1 commits · merged 2026-11-28 19:01 UTC

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

**@⁠1mosce** on GitHub · 2026-11-27 18:31 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/126) `1mosce:wide-chunk` → `main` · +113 −2 · 2 files · 1 commits · merged 2026-11-28 19:01 UTC ## 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)
Most of the refreshes that go to the threads are looks that find nothing to copy (8,438 of 9,584 a frame), each taking its number from one counter all the threads share; and a flush of a few small copies woke as many threads as it had pieces. wide_each_from hands the long pieces (textures) out one at a time and the others by the chunk, and wakes no more threads than there are such shares.

Tests: numbers are claimed once each, the single ones first; every number is worked once whatever the chunk.

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

@⁠cloph-dsp on GitHub · 2026-11-28 02:01 UTC · original

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).

**@⁠cloph-dsp** on GitHub · 2026-11-28 02:01 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/126#issuecomment-7232072158) 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).
Author
Owner

@⁠Yoshi-233 on GitHub · 2026-11-28 13:34 UTC · original

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.

**@⁠Yoshi-233** on GitHub · 2026-11-28 13:34 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/126#issuecomment-7240031194) 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.
github-bot referenced this pull request from a commit 2026-11-28 19:02:00 +00:00
github-bot changed target branch from main to gh-pr/126/base 2026-11-28 19:02:37 +00:00
github manually merged commit 7ab985d047 into gh-pr/126/base 2026-11-28 19:02:39 +00:00
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!126
No description provided.