Repository navigation
gpu: parallelize relay card_merge_relay under VICTORY_WIDE_MERGE=1 - #665
JavierBlanco23 wants to merge 1 commit into
Conversation
|
A landing without pieces can drop notes that a later fetch still needs Found by reading 1557943, not by a run. Two independent reads agree. In
Suggested fix, on the copy-queue path only (the main-queue path keeps // On the copy queue a later fetch merges "after" its own plans' send,
// not the queue's count: notes of sends past these plans' are still needed.
if relay_copy_queue() {
if let Some(last) = plans.iter().map(|p| p.sent_as).max() {
crate::shadow::relay_fetched(last);
}
return;
}Plans land in line order, so every later "after" is at least S, and pruning up to S never removes a note a later Two things I did not verify, both with the copy queue on:
Not run in the game yet on this card. Setup: RTX 3070 8 GB (driver 621.24, 32-lane waves), Ryzen 5 3600, 32 GB, Windows 11, Series X mode, 1920x1080, relay at its default (stage 2), card buffers 1 / 1024 MB, a diagnostics build. |
xtask: count \x escapes and 0x hex arrays as encoded runs in the policy check (cherry picked from commit 644ebeb)
The 9e6137f run spent 54 ms a frame copying back on the thread that lands flights, merging the pushed runs one after another. The runs of a landing are now noted first and merged once every plan's are, before the slots are given back: with VICTORY_WIDE_MERGE=1 each copy's runs go to one thread in their order (a copy's merges take its own lock anyway), the copies spread over up to eight jobs by their bytes. Without the switch the runs merge in the same order as before. The push line now says how many copies the runs were of and how long the merges took, so a run shows whether the copy-back is spread over enough copies to gain from the threads. This takes the parallel-merge part of fxceless fxceless#665 and fxceless#688 for the push path. Their copy-queue fetch and VRAM staging do not apply with VICTORY_CARD_PUSH on, where nothing is fetched. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017V7WBB9Mgcxkr8YRW4LAzi
|
A/B on an RTX 5070 Ti (wave32, NVIDIA 616.64), Series S profile. Tree:
No device loss in either run. |
1557943 to
34499ae
Compare
|
Thanks @CuteBooty and @HLVM04 for the thorough code review and A/B benchmark — both hit the nail on the head:
I've rebased onto |
…stepped shoulders: windows clamped far ahead of the draws)
|
There’s an ordering case in the wide merge worth checking here too. Two declarations can cover different, overlapping parts of one title page, and distinct buffers can name that same page. Splitting the pieces by their position in the vector can put those writes on different workers. I ran into the same issue in #1066 and changed the partition to use the absolute title page. That also handles a buffer starting partway through a page. |
xtask: count \x escapes and 0x hex arrays as encoded runs in the policy check
Refocused after review feedback from @CuteBooty and @HLVM04:
VICTORY_CARD_FETCH_INFLIGHT=1already removes the fetch wait cleanly inside the flight).WINDOW_MOSTback to 64.card_merge_relayunderVICTORY_WIDE_MERGE=1inHost::relay_card_backand extended it per-plan (preserving plan order) toHost::relay_card_inflight.