Repository navigation
Conversation
…e dwords it touches lds_meetings refused a wave64 program on a 32-lane host whenever one lane-branch region both read and wrote LDS. With the switch it refuses only where a read and a write (or atomics of different kinds) may touch the same dword; addresses that are a moved constant plus the instruction's offset are known, any other is taken to touch every dword, and order-free atomics of one kind (add, min...) need no order among themselves. 369cbe906ea72764 (RTX 4090, GTA VI prologue) builds with it: its regions read slot 0 and add to slots 16/20, or only add. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Linux check isolating #500 from the other three PRs in the RTX 4090 report: on Same native translator binary, host wave limit 32; only
That independently pins the first shader's wave-size change to this PR alone. The second is also the shader we saw explicitly refused on stock Warm-cache reproduction: the first setting wins. The table above is fresh translation. I then ran the same target through the production Tested fix: add AI disclosure: Hermes Agent ran the translator and cache comparisons, tested the one-line fix, and wrote this comment on ArturoWolff’s behalf. |
|
Checked merging
|
|
I reproduced a false disjoint-address result on When The test and small candidate change skip guarded VGPR definitions in the constant-address map. The synthetic read becomes unknown and the analysis refuses the split. A control with the same move made unconditionally still takes the disjoint-address path. The Linux shader suite passed 174 tests with two ignored. This verifies the regional analysis on synthetic programs. I did not run the reported retail shader or measure how many existing programs the conservative check would retain. AI-assisted using Codex. |
|
RTX 3050 Laptop (4 GB), Windows, Series S profile. In our baseline log, compute There is an important attribution issue for anyone testing this PR in a stack. DexNom/VIctory#40 reports creating the particle visibility pipeline on a 5060 Ti through a different fallback, while both control pipelines remained refused. Comet#68 independently tracks a per-frame refusal of the particle pipeline. For a local A/B, keep the wide fallback fixed in both runs, match cache warm-up, and compare creation and dispatch for those three hashes. A successful PSO alone cannot establish a visual or FPS gain. On Cache check on the guarded build: all four switch combinations produced distinct translation fingerprints, and repeating the first reproduced its fingerprint. The disk shader cache includes this fingerprint in its key, so the same directory can be used for the correctness comparison. Warm both variants equally if measuring timing. AI-assisted (Codex). |
Problem
On a 32-lane host (NVIDIA), a wave64 compute program with LDS and a group over 32 threads is split into two host waves.
lds_meetingsputs group barriers at the edges of lane-branch regions, and refuses the program when one region both reads and writes LDS. Every non-read counts as a write there, atomics included, and addresses are not looked at.369cbe906ea72764(GTA VI prologue, group 64, no cross-lane ops) is refused only for that reason (VICTORY_WAVE_WHY=1:[LDS in a group over 32, an LDS read and write in one lane-branch region]). It then falls back toWaveSize(64), andCreateComputePipelineStaterefuses it withE_INVALIDARGon every run. Its LDS use is a fixed set of counters:ds_addto slots at bytes 8/12/16/20;ds_addto bytes 16/20;No read in a region touches a dword a write in the same region touches, so the barriers at the region edges already keep the console's order.
Change (opt-in:
VICTORY_LDS_EXACT=1)lds_meetingsrefuses a region only where two accesses may touch the same dword and need an order:Dsaddress that is av_mov_b32/s_mov_b32of an inline constant or literal, plus the instruction's offset, is known.read2/write2scale by the element size (×64 forst64) and wide forms cover their dwords. Any other address is taken to touch every dword, so the old answer stands there.add/sub/min/max/and/or/xor, the_rtnform being the same kind.wrxchg,cmpst,inc/dec(wrapping) andsrc2forms stay writes.The default path is unchanged. Unit tests are in
lds_exact_tests.Results (RTX 4090, driver 621.40, Windows 11, diag build)
VICTORY_HOST_MAX_WAVE=32 victory translate --validate --pipelines:369cbe906ea72764emits, validates and creates a host pipeline. The other wave64 refusals of this scene (2da4beb386509b77,2cc4c197ee29e291,02384a60fda6f2d0,6b82bc7d22016cb5) still keep 64 lanes: they also read masks as data, usev_mbcnt/v_readlane, or index LDS per lane.Tested together with #461, #190 and #156, which bring
5dc3b25986622949and6f225b641c5b0708toWaveSize(32)here as well.🤖 Generated with Claude Code