Translator: wave64 programs no other form takes run in the paired form (from mandy) #543
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/543"
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 readmet3xt-lab/foxhound. Originally posted by voiceovarian1-max on 2026-12-03T08:54:23Z.
Ported from ProjectLeonida/mandy: its paired form of console wave64 compute programs, for 32-lane hosts (NVIDIA, Intel). On such a host, a wave64 program that every other form refuses ("no wave32 lowering for this wave64 program") is not translated now, and its dispatches are dropped. Issue #311 reports 17 such programs, and #258 two of them.
The paired form runs each console wave of 64 as one host wave of 32 threads, with each thread lowering two console lanes (n and n + 32) and the whole wave taking every per-lane branch. A reduction, ballot, first-lane read or wave-wide branch is then the host wave's own: no exchange between host waves through LDS and no group barrier, which the wave-wide form needs.
What is in it
emit/paired.rs,emit/lower.rs: the form (each instruction lowered for the lower lane, then the upper one; each lane's values kept apart).emit/mod.rs:VICTORY_PAIRED_LANESdecides when the form is tried:1: last of all, for a program every other form refused, and right before the wave-wide form where that form is asked for;exact: before the approximate forms;first: before every form;0: never.barriers_on_every_way: groups of several console waves that meet only at barriers each wave passes once.translation_fingerprint.shader_cache.rs: the switch is in the cache key's switches.emit/paired_tests.rs: 16 tests.Provenance: mandy 8d300d783 and 1411b6ca3 (NotRexed), e10e9d007 and 55c6dcbb2 (Zack), 0bc6e21a1 (NotRexed, after voidopcode/vilocity add4873) and 9899a9801 (NotRexed); mandy's form is itself after TaynanGT/Vice-Tay 5e588e8. All are GPL-3.0(-or-later), and the comments name each source.
Not taken from mandy:
partial_active): spilled programs are refused;It is about 2,600 lines, 1,044 of them tests. The form is one piece: the lowering needs both lanes' state, and the tests check its results.
Tested
cargo test --workspace --locked -- --test-threads=4: 1,374 passed, 0 failed, 50 ignored (29 binaries), noSKIPPED.victory-shaderalone: 345 passed, 0 failed, 4 ignored. The 16 paired tests ran on the card.cargo xtask policy: ok.-NoPrepare(cache filled byvictory shadersbeforehand):victory shaders: 17 programs refused with "no wave32 lowering" without the form, 4 with it. The form takes 24 programs: those 13, plus 11 that took the wave-wide form before.VICTORY_PAIRED_LANES=0and the default, with keys pressed by the layer alone (VICTORY_KEYS, no input from the PC). Same frame rate in the same scene: 33-37 fps without the form, 32-36 with it. The same scenes, no device removal, no crash.Not tested
exactandfirstin the game (unit tests only).AI use
Claude Code with Claude Opus 5.5 ported mandy's code onto this tree, dropped the parts above, ran the builds, tests and game runs on the hardware named, and wrote this description.
🤖 Generated with Claude Code
Imported from readmet3xt-lab/foxhound. Originally posted by voiceovarian1-max on 2026-12-03T10:04:08Z.
Combined test of this PR with #521, #543 and #544-#556, all merged onto
main7dbcdcb(branch fox-all of voiceovarian1-max/foxhound):cargo test --workspace --locked -- --test-threads=4: 1,415 passed, 0 failed, 50 ignored (29 binaries), noSKIPPED.VICTORY_KEYS, no input from the PC): window scene 38-42 fps against 34-37 formainon the same boot; no device removal, no crash; a burst of 67 pictures showed no one-picture flicker of the character's clothes.Tested by Claude Code with Claude Opus 5.5 on the hardware named.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.