Translator: wave64 programs no other form takes run in the paired form (from mandy) #543

Open
voiceovarian1-max wants to merge 1 commit from upstream-pr/543 into main
voiceovarian1-max commented 2026-12-03 08:54:23 +00:00 (Migrated from github.com)

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_LANES decides when the form is tried:
      • unset or 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.
    • The switch is part of 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:

  • its counted dispatches (partial_active): spilled programs are refused;
  • its lists of programs by hash, which belong in a title profile.

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

  • RTX 4070 Ti 12 GB (driver 617.14), i7-14700K, 32 GB, Windows 11 Pro 26300; stable Rust; release build.
  • cargo test --workspace --locked -- --test-threads=4: 1,374 passed, 0 failed, 50 ignored (29 binaries), no SKIPPED. victory-shader alone: 345 passed, 0 failed, 4 ignored. The 16 paired tests ran on the card.
  • cargo xtask policy: ok.
  • Retail title, Series S profile, DLSS Balanced, 60 fps limit, -NoPrepare (cache filled by victory shaders beforehand):
    • 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.
    • Frame rate: runs on one boot, alternating VICTORY_PAIRED_LANES=0 and 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.
    • Correction: an earlier version of this description said the game left a scene only with the form. Those runs had the game window in front, where keys pressed by hand also reach it. With scripted input alone, both modes stay in that scene, so the claim was wrong and is removed.

Not tested

  • AMD (64-lane waves: the form is never tried there), Intel, other NVIDIA cards.
  • The Series X profile, other scenes and long play.
  • exact and first in the game (unit tests only).
  • The 11 programs that move from the wave-wide form to this one were not checked picture by picture; the frames looked normal in the runs.

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

<!-- greyfinch-sync:readmet3xt-lab/foxhound:issue:5623175711 --> Imported from [readmet3xt-lab/foxhound](https://github.com/readmet3xt-lab/foxhound/pull/543). Originally posted by [voiceovarian1-max](https://github.com/voiceovarian1-max) on 2026-12-03T08:54:23Z. --- Ported from [ProjectLeonida/mandy](https://github.com/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_LANES` decides when the form is tried: - unset or `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. - The switch is part of `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: - its counted dispatches (`partial_active`): spilled programs are refused; - its lists of programs by hash, which belong in a title profile. 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** - RTX 4070 Ti 12 GB (driver 617.14), i7-14700K, 32 GB, Windows 11 Pro 26300; stable Rust; release build. - `cargo test --workspace --locked -- --test-threads=4`: 1,374 passed, 0 failed, 50 ignored (29 binaries), no `SKIPPED`. `victory-shader` alone: 345 passed, 0 failed, 4 ignored. The 16 paired tests ran on the card. - `cargo xtask policy`: ok. - Retail title, Series S profile, DLSS Balanced, 60 fps limit, `-NoPrepare` (cache filled by `victory shaders` beforehand): - **`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. - **Frame rate:** runs on one boot, alternating `VICTORY_PAIRED_LANES=0` and 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. - **Correction:** an earlier version of this description said the game left a scene only with the form. Those runs had the game window in front, where keys pressed by hand also reach it. With scripted input alone, both modes stay in that scene, so the claim was wrong and is removed. **Not tested** - AMD (64-lane waves: the form is never tried there), Intel, other NVIDIA cards. - The Series X profile, other scenes and long play. - `exact` and `first` in the game (unit tests only). - The 11 programs that move from the wave-wide form to this one were not checked picture by picture; the frames looked normal in the runs. **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](https://claude.com/claude-code)
voiceovarian1-max commented 2026-12-03 10:04:08 +00:00 (Migrated from github.com)

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 main 7dbcdcb (branch fox-all of voiceovarian1-max/foxhound):

  • RTX 4070 Ti 12 GB (driver 617.14), i7-14700K, 32 GB, Windows 11 Pro 26300; release.
  • cargo test --workspace --locked -- --test-threads=4: 1,415 passed, 0 failed, 50 ignored (29 binaries), no SKIPPED.
  • Retail title, Series S profile, DLSS Balanced, 60 fps limit, keys pressed by the layer only (VICTORY_KEYS, no input from the PC): window scene 38-42 fps against 34-37 for main on the same boot; no device removal, no crash; a burst of 67 pictures showed no one-picture flicker of the character's clothes.
  • Not tested: each PR alone in the game; AMD and Intel; the Series X profile; long play.

Tested by Claude Code with Claude Opus 5.5 on the hardware named.

<!-- greyfinch-sync:readmet3xt-lab/foxhound:comment:7374687120 --> Imported from [readmet3xt-lab/foxhound](https://github.com/readmet3xt-lab/foxhound/pull/543#issuecomment-7374687120). Originally posted by [voiceovarian1-max](https://github.com/voiceovarian1-max) on 2026-12-03T10:04:08Z. --- Combined test of this PR with #521, #543 and #544-#556, all merged onto `main` 7dbcdcb (branch fox-all of voiceovarian1-max/foxhound): - RTX 4070 Ti 12 GB (driver 617.14), i7-14700K, 32 GB, Windows 11 Pro 26300; release. - `cargo test --workspace --locked -- --test-threads=4`: 1,415 passed, 0 failed, 50 ignored (29 binaries), no `SKIPPED`. - Retail title, Series S profile, DLSS Balanced, 60 fps limit, keys pressed by the layer only (`VICTORY_KEYS`, no input from the PC): window scene 38-42 fps against 34-37 for `main` on the same boot; no device removal, no crash; a burst of 67 pictures showed no one-picture flicker of the character's clothes. - Not tested: each PR alone in the game; AMD and Intel; the Series X profile; long play. Tested by Claude Code with Claude Opus 5.5 on the hardware named.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/543:upstream-pr/543'
git switch 'upstream-pr/543'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/543'
git switch 'upstream-pr/543'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/543'
git switch 'upstream-pr/543'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/543'
git switch 'main'
git merge --squash 'upstream-pr/543'
git switch 'main'
git merge --ff-only 'upstream-pr/543'
git switch 'main'
git merge 'upstream-pr/543'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
readmet3xt-lab/foxhound!543
No description provided.