Preserve guest-wave shader state and reclaim idle host memory under pressure #479
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!479
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-479"
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?
@JoeY54 on GitHub · 2026-11-27 23:14 UTC · original
JoeY54:fix/shader-memory-correctness→main· +3977 −105 · 44 files · 24 commits · openStandalone first-lane reads, inactive WRITELANE destinations and loop-carried masks can produce incorrect synthetic readbacks. After a submission spike, idle host lists and fetch buffers also retain peak capacity under memory pressure. This adds guest-wave state corrections and pressure-only reclamation with synthetic regression coverage.
Integrated upstream main
64d4931b3dd90305134512b805fc98f04119fb6e; latest tested sourceb2a3dabad7daf0e7ba3943a0ace2515e487c25dd.Existing prerequisites, original authors retained: #108; #112 including #111; #116 including #70; #71; #73; #425. Several were closed without merging; that is not represented as author approval. Most of the aggregate diff is their oracle/benchmark and prerequisite work. The report pins every head and separates our new commits. Newly landed upstream allocator/prelude and shader changes are retained; the pressure path reuses upstream's idle-age helper. No competing CI implementation is introduced.
New work preserves guest-wave first-lane reads, single-wave divergent state, inactive WRITELANE updates and mask phis through uniform loops. Under pressure it retires old GPU-complete lists while retaining recent lists and a warm reserve, and shrinks oversized fetch buffers between completed copy/merge operations after a two-second cooldown.
VICTORY_IDLE_RECLAIM=0is a diagnostic opt-out. Branch-state helpers are extracted to satisfy the existing source-size policy.Current validation: Windows 11, RTX 5090 / driver 621.24, Rust 1.98.1; original synthetic fixtures and serial/exclusive GPU tests.
Sanitized report with exact revisions, commands, controls and limitations.
Strict joins, legacy denormal expectations, unsupported instructions and broader multi-wave behavior retain the documented limitations. The newly landed optional allocator-trimming switch has not had a separate completed compatibility run. No real-game validation, new binary/table data, private management history or raw machine logs are included.
AI-assisted by OpenAI Codex; submitted by JoeY54.
s_min_{i,u}32 and s_max_{i,u}32 set SCC when S0 is chosen (S0 < S1 for min, S0 > S1 for max). The lowering returned no SCC, so the generic D != 0 was used: s_cselect or s_cbranch_scc after a min/max took the wrong side whenever the result was nonzero but S1 was chosen (or zero with S0 chosen). Marvisak/VIctory's lowering already does this. v_readlane_b32 and v_writelane_b32 take the lane from S1[4:0] (wave32) or S1[5:0] (wave64). A select past the wave read 0 or wrote no lane here; it now wraps as on the console. Lanes that are host lanes (pixel/vertex programs with a computed lane) are unchanged. Both were found by differential testing of the translator against an independent RDNA2 interpreter on the GPU. Ported from avatarmanz/VIctory-7900XTX#404. No version bump here: the shader cache is keyed by the build. Co-Authored-By: Claude Opus 5.5 <[email protected]>A console wave64 compute program that runs as two host waves of 32 ("halves") numbers its lanes through console_thread (thread_id does). console_lane and lane_bit still read the host lane index unless exchange is set. A 64-bit mask read as a number, such as a select on an SGPR pair, then gave lanes 32-63 the bits of the low dword: their host lane is 0-31, so the test `lane < 32` always picked the low dword. Use the console lane in both places when halves is set, as exchange already does.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.