A submission's refreshes go to the kept threads several at a time (VICTORY_WIDE_CHUNK=<n>, 1 by default: as before) #126
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/126"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 threadsnat a time, and no more threads are woken than there are such shares. Inrefresh_frontand in the light path offlush_all.shadow::wide_each_from(n, single, chunk, work): the numbers undersinglego one at a time (the textures ofrefresh_front: the longer pieces, each may be a thread's whole share), the otherschunkat a time; with fewer than two shares the work is done where it is, without the queue. With a chunk of 1 it iswide_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:
refreshes 12.7 in 38 flushes of 9584, 8438 of them known to copy nothing, 9086 on several threads;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_eachgoes 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 upstreamca9c75cdoes not have;cargo xtask policy: 280 files ok.🤖 Generated with Claude Code
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):
7ab985d0470082ed8ed00df80ff0c355ec6f511c, single-commit parent/baseca9c75cd6d59b04a096746b313baed986608e63a.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 -Ffor the test name on the base returned no hits (test is new on this PR);git diff --check ca9c75cd HEADclean (2 files, +113/-2).CARGO_TARGET_DIR(never shared) withCARGO_BUILD_JOBS=2; local clone is shallow so the PR's single-commit parent was used as base instead of a merge-base.AI-assisted (Hy4 flash).
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.
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.