Lane masks and whole-wave sections of wave64 programs on 32-lane hosts #99
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/99"
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 DexNom/VIctory. Originally posted by Castyan on 2026-11-26T20:05:07Z.
Stacked on #98 (0x218, itself on #64 and #61). The changes to review are the 8 commits after
60ff2e8.What
Wave64 programs on 32-lane hosts: lane masks and whole-wave sections that were refused, or computed wrongly.
1745c11,66347fbEXEC set to constant lanes (s_bfm_b64 exec, 32, 0, halves moved apart withs_mov_b32 exec_lo/exec_hi,s_bitreplicate_b64_b32,s_pack_*,s_movk_i32,s_brev_b32) is taken as that constant mask. An execution test runs 8 cases against the console's 64-lane result.898fc6dBug fix: a lane read inside a whole-wave section is no longer taken as each lane's own value.v_readlane_b32 s14, v1, 3withv1 = t + 1gave each threadt + 1where the console gives 4. This bug predates #64. Such a read is now refused instead of computing a wrong value.f60719aA lane of a reduction read after EXEC is restored is taken.76ad683SCC of a mask operation read as a number (src_scc,s_cselect, a carry afters_and_b64 s, vcc, exec) is "some lane of the console wave". It is exact in the paired form, or where the result is held in the lanes running there. Otherwise it stays refused.14c63a5The sections of a block are simulated in order, so a section can read a lane of the one before it (the 0x218 reductions come two by two).9e0cd49A section with no restore ends at the first EXEC write the simulation does not follow (m128 leaves its section for lane 0 alone).8b8f401VCC on entry to a compute wave is read as 0, as the SGPRs above the hardware inputs already are. In run4 m159, m160 and m162 it only reaches a mask on theexeczedge, wheres_orn2 s, vcc, execwith EXEC 0 sets every bit whatever VCC holds. Its test runs that shape for 32- and 64-lane console waves against the console's result.Results
Replay of two sets of 200 captured 0x218 descriptions on the RTX 5060 (programs reaching a hardware pipeline, dump-218 / dump-218-run4). Each change was measured on the tree it was developed on (the old #64 head), with no program lost:
898fc6dandf60719atogether +2 / +3,76ad683+17 / +9,14c63a5+3 / +3,9e0cd49+1 / +1,8b8f401+0 / +3 (m159, m160, m162).Checks (RTX 5060, at
8b8f401)cargo clippy --workspace --all-targets --locked -- -D warnings, with and without--all-features: clean.cargo test --workspace --locked: 748 passed, 0 failed, 11 ignored.🤖 Generated with Claude Code
Imported from DexNom/VIctory. Originally posted by andrewDoing on 2026-11-27T01:01:45Z.
Independent native Windows D3D12 check at
8b8f401on a physical RTX 5070 (10de:2f04): extended the eight constant EXEC-mask cases to workgroups of 64, 128, 192 and 256 threads. The oracle requires mask bits to repeat per 64-lane console wave while enabled writes retain the workgroup-local thread ID. Both the selected wave32 lowering and explicitly paired lowering matched all 20,480 output DWORDs across eight dispatches, including numeric copies of both EXEC halves. Rust 1.98.1 release test passed.This covers complete synthetic console waves, not partial waves, title captures, or gameplay. Verification was AI-assisted with GPT-6.2 Astra.
Imported from DexNom/VIctory. Originally posted by Castyan on 2026-11-27T07:40:29Z.
Merged into #64 (
83bfddc), where this work continues. Closing as superseded.Pull request closed