emit: wave64 programs with LDS in lane branches run in waves of 32 on 32-lane hosts (VICTORY_LDS_REGION_RACE) #209
No reviewers
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX!209
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-209"
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?
@YOGESH9139 on GitHub · 2026-11-26 11:44 UTC · original
YOGESH9139:pr/lds-region-race→main· +23 −0 · 1 files · 1 commits · closed without mergingSplit out of #134, as asked: only the shader part, 23 lines in
crates/victory-shader/src/emit/lower.rs.What it does. On hosts whose waves are at most 32 lanes (NVIDIA), a console wave64 compute program with LDS in a group over 32, whose LDS accesses sit in lane branches (where no barrier can stand, and
lds_meetingsfinds no meeting), kept 64-lane waves and the driver refused its pipeline ("Shader wants wave lane count of 64 but maximum wave lane count for device is 32"), so the pass was dropped. With this change such a program runs in waves of 32 anyway: barriers before each LDS access in blocks every lane runs, none inside the lane branches.The shortcut. The two host waves of one console wave may race on LDS inside those branches. Dropping the pass altogether was the larger fault. It is only asked on 32-lane hosts;
VICTORY_LDS_REGION_RACE=0turns it off, and in tests it is off unless set to1, so tests of programs that must keepWaveSize(64)still see them kept.Measured on an RTX PRO 2000 Blackwell laptop GPU (8 GB),
translate --pipelinesover the 404 compute programs the driver refused beforeVICTORY_LDS_FLAGS:(8 still don't translate in waves of 32.) On the tree before
VICTORY_LDS_FLAGS, Series S profile, world fps went from 1.9 to 2.2 and dropped draws a frame from 150-276 to about 46. Cross-tested on an RTX 4080 by Proudnoob4 in #134; their proper fixes for2da4beb386509b77and369cbe906ea72764would make this fallback unnecessary for those two.Rebased on
0dec5dc;cargo checkand the shader tests pass. After the idea in Linox-IDK's LNX-victory, written anew.🤖 Generated with Claude Code
On a host whose waves are at most 32 lanes (NVIDIA), a console wave64 compute program with LDS in a group over 32 whose LDS accesses sit in lane branches (no barrier can stand there, and lds_meetings finds no meeting) kept 64-lane waves, and the driver refused its pipeline ("Shader wants wave lane count of 64 but maximum wave lane count for device is 32"): the pass was dropped. Now such a program runs in waves of 32 anyway, with the barrier before each LDS access in blocks every lane runs and none in the lane branches. shortcut: the two host waves of a console wave may race on LDS in those branches; dropping the pass altogether was the larger fault. Only asked on 32-lane hosts; VICTORY_LDS_REGION_RACE=0 turns it off, and in tests it is off unless set to 1 (tests of programs that must keep WaveSize(64) see them kept). Measured on an RTX PRO 2000 Blackwell laptop GPU (8 GB), `translate --pipelines` over the 404 compute programs the driver refused before VICTORY_LDS_FLAGS: on this main, 373 get a pipeline and 29 are still refused; with this change 396 get a pipeline and none is refused (8 do not translate in waves of 32). On the tree before VICTORY_LDS_FLAGS, in the Series S profile, the world's frame rate went from 1.9 to 2.2 fps and dropped draws a frame from 150-276 to about 46. Cross-tested on an RTX 4080 by Proudnoob4 (avatarmanz/VIctory-7900XTX#134). After the idea of Linox-IDK's LNX-victory, written anew. Co-Authored-By: Claude Opus 5.5 <[email protected]>@YOGESH9139 on GitHub · 2026-11-26 12:51 UTC · original
Closing: I'm stopping this work for now and taking the fork down. Thanks for the reviews.
Pull request closed