Shaders: four more 64-thread LDS programs taken wave-wide on 32-lane hosts #101

Open
github-bot wants to merge 1 commit from github-bot/gh-101 into main AGit
Owner

@⁠ballsimulation on GitHub · 2026-11-27 18:06 UTC · original
ballsimulation:fix/wave32-wide-lds-shaders → main · +13 −0 · 1 files · 1 commits · open

Four compute programs of 1.0.2.1 are refused on every run on an RTX card ("no wave32 lowering for this wave64 program"), and their dispatches are dropped:

pipeline hash branches taken wave-wide
5e3dd99e0f067aee 4
ae0deeafe219c15c 5
a10179ab7eda0dc3 15
57f1b81de55c2842 15

They have the shape of the volumetric programs already in scene_kernel (emit/mod.rs): groups of 64, with an LDS read and write in one lane-branch region, so no other form translates them on 32-lane hosts. With VICTORY_WAVE_WIDE=1 all four translate. This adds them to that list by digest, so only these four change. VICTORY_WAVE_WHY now also prints a refused program's digest, which is what the list needs.

Still refused: 6b82bc7d22016cb5 (groups of 1024). Its console waves' meetings need LDS past the host's 32 KiB.

Checked on an RTX 4070 (driver 610.74, Windows 11), Series S profile at 1440p with DLSS Performance:

  • victory translate --warm with VICTORY_HOST_WAVE=32: 1 of the 5 refused programs left, down from 5 of 5.
  • About 30 minutes of play over several runs with the four made: no device loss, no new warnings.
  • cargo test -p victory-shader and cargo clippy -p victory-shader --all-targets -- -D warnings pass.

Not checked: a before/after picture. I have not found which passes these programs feed. Mind the note in scene_kernel about VICTORY_WAVE_WIDE=1 and the device losses in runs 121-124; this applies the widened form only to these four digests, not globally.

🤖 Generated with Claude Code

**@⁠ballsimulation** on GitHub · 2026-11-27 18:06 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/101) `ballsimulation:fix/wave32-wide-lds-shaders` → `main` · +13 −0 · 1 files · 1 commits · open Four compute programs of 1.0.2.1 are refused on every run on an RTX card ("no wave32 lowering for this wave64 program"), and their dispatches are dropped: | pipeline hash | branches taken wave-wide | |---|---| | `5e3dd99e0f067aee` | 4 | | `ae0deeafe219c15c` | 5 | | `a10179ab7eda0dc3` | 15 | | `57f1b81de55c2842` | 15 | They have the shape of the volumetric programs already in `scene_kernel` (`emit/mod.rs`): groups of 64, with an LDS read and write in one lane-branch region, so no other form translates them on 32-lane hosts. With `VICTORY_WAVE_WIDE=1` all four translate. This adds them to that list by digest, so only these four change. `VICTORY_WAVE_WHY` now also prints a refused program's digest, which is what the list needs. Still refused: `6b82bc7d22016cb5` (groups of 1024). Its console waves' meetings need LDS past the host's 32 KiB. **Checked** on an RTX 4070 (driver 610.74, Windows 11), Series S profile at 1440p with DLSS Performance: - `victory translate --warm` with `VICTORY_HOST_WAVE=32`: 1 of the 5 refused programs left, down from 5 of 5. - About 30 minutes of play over several runs with the four made: no device loss, no new warnings. - `cargo test -p victory-shader` and `cargo clippy -p victory-shader --all-targets -- -D warnings` pass. **Not checked:** a before/after picture. I have not found which passes these programs feed. Mind the note in `scene_kernel` about `VICTORY_WAVE_WIDE=1` and the device losses in runs 121-124; this applies the widened form only to these four digests, not globally. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Four compute programs of 1.0.2.1 were refused on every run on an RTX card
("no wave32 lowering for this wave64 program") and their dispatches dropped:
pipeline hashes 5e3dd99e0f067aee, ae0deeafe219c15c, a10179ab7eda0dc3 and
57f1b81de55c2842. They have the shape of the volumetric programs already in
`scene_kernel`: groups of 64, an LDS read and write in one lane-branch
region, so no other form translates them on 32-lane hosts. Widened, they
translate (4, 5, 15 and 15 branches taken wave-wide), and they are added to
that list by digest; nothing else changes. VICTORY_WAVE_WHY now also prints
a refused program's digest, which is what the list needs.

Still refused: 6b82bc7d22016cb5, groups of 1024, whose console waves' meetings
need LDS past the host's 32 KiB.

Checked on an RTX 4070 (driver 610.74), Series S profile at 1440p with DLSS:
`victory translate --warm` with VICTORY_HOST_WAVE=32 translates the four
(1 of 5 refused, was 5 of 5); about 30 minutes of play over several runs with
them made, no device loss; victory-shader tests pass.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 18:11:03 +00:00
Author
Owner

@⁠Aniseto on GitHub · 2026-11-27 18:31 UTC · original

Ran the full victory-shader suite on an NVIDIA Blackwell part at 2b028ea:

Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09), MSVC 19.44.35230, DXC 1.9.2609.5, debug build, VICTORY_REQUIRE_HW_GPU=1.

cargo test -p victory-shader --lib -- --test-threads=4
288 passed; 0 failed; 4 ignored      (exit 0)

This is a Blackwell wave32 host with VICTORY_REQUIRE_HW_GPU set, so hardware-backed tests ran on the real D3D12 device rather than skipping. The PR's Checked section names an RTX 4070; this adds a different adapter, driver and toolchain. No game data was used: the suite is synthetic.

Not tested: the four ignored tests (benchmark, strict-joins switch, probe tool, f16 conversion mode), AMD/Intel adapters, Wine, release profile, game data.

AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR head in a detached worktree, ran the command above and wrote this report; no game data was used.

**@⁠Aniseto** on GitHub · 2026-11-27 18:31 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/101#issuecomment-7225576859) Ran the full victory-shader suite on an NVIDIA Blackwell part at 2b028ea: Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09), MSVC 19.44.35230, DXC 1.9.2609.5, debug build, VICTORY_REQUIRE_HW_GPU=1. ``` cargo test -p victory-shader --lib -- --test-threads=4 288 passed; 0 failed; 4 ignored (exit 0) ``` This is a Blackwell wave32 host with VICTORY_REQUIRE_HW_GPU set, so hardware-backed tests ran on the real D3D12 device rather than skipping. The PR's Checked section names an RTX 4070; this adds a different adapter, driver and toolchain. No game data was used: the suite is synthetic. Not tested: the four ignored tests (benchmark, strict-joins switch, probe tool, f16 conversion mode), AMD/Intel adapters, Wine, release profile, game data. AI-assisted (OpenCode), model: **DeepSeek V4.1 Flash Free** - checked out the PR head in a detached worktree, ran the command above and wrote this report; no game data was used.
Author
Owner

@⁠The-DarkMatter on GitHub · 2026-11-28 02:03 UTC · original

I tried a more general version of this on top of 64d4931. Instead of adding digests to the scene_kernel list, emit tries widen as the very last resort for any group of 64 threads (one console wave) that no other form translates. Programs that translate today don't change: every module that translated before keeps its hash, so it only touches programs that would be dropped anyway. VICTORY_WAVE_WIDE_LAST=0 turns it off.

Full translate over 1.0.2.1 with VICTORY_HOST_MAX_WAVE=32:

  • "no wave32 lowering": 24 → 5 (it was 22 at d12eb1b)
  • compute programs translated: 2734 → 2753 of 2763

The last resort picks up your four plus 13 more: 6871d6e4b3ac9a10, 18d957e62926ed3e, 407eca669212d400, 9fe711566bec0d0a, a40ae27594631121, 2889c21328c69e58, 888af37a584acf98, ffa3a7645374474b, aeac9d880daff3ba, a4cb3ce527ad8569, 98fef92f7a6d825e, a09f0c1fae2b5ca3, f38f83439083b9ef. The other part of my change is the same fix as #560 (the loop retry that still wants 64 lanes dropping widen's blocks), which is why 926c46bab3b86bd6 and 02384a60fda6f2d0 come back here too.

All 19 newly translated programs pass the DXIL validator and create pipelines on an RTX 5080 (driver 621.1). cargo test -p victory-shader and cargo xtask policy pass, with two new synthetic tests in wave64_tests.rs.

Big caveat: I haven't play-tested the general form yet. With the device losses in runs 121-124 in mind, your named list is the safer step until someone plays with it. If the general version is wanted, I can open it as a PR on top of #560.

Still refused here: 6b82bc7d22016cb5 and 6832a9da15c2e584 (LDS is full, #348 looks at those), and 22338086ea4c5364, 1d434307d981352a, 3b02415f67c6b0d8 (groups of 128 and 512, which only go through with VICTORY_WAVE_WIDE=1).

**@⁠The-DarkMatter** on GitHub · 2026-11-28 02:03 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/101#issuecomment-7232099094) I tried a more general version of this on top of 64d4931. Instead of adding digests to the `scene_kernel` list, `emit` tries `widen` as the very last resort for any group of 64 threads (one console wave) that no other form translates. Programs that translate today don't change: every module that translated before keeps its hash, so it only touches programs that would be dropped anyway. `VICTORY_WAVE_WIDE_LAST=0` turns it off. Full `translate` over 1.0.2.1 with `VICTORY_HOST_MAX_WAVE=32`: - "no wave32 lowering": 24 → 5 (it was 22 at d12eb1b) - compute programs translated: 2734 → 2753 of 2763 The last resort picks up your four plus 13 more: `6871d6e4b3ac9a10`, `18d957e62926ed3e`, `407eca669212d400`, `9fe711566bec0d0a`, `a40ae27594631121`, `2889c21328c69e58`, `888af37a584acf98`, `ffa3a7645374474b`, `aeac9d880daff3ba`, `a4cb3ce527ad8569`, `98fef92f7a6d825e`, `a09f0c1fae2b5ca3`, `f38f83439083b9ef`. The other part of my change is the same fix as #560 (the loop retry that still wants 64 lanes dropping widen's blocks), which is why `926c46bab3b86bd6` and `02384a60fda6f2d0` come back here too. All 19 newly translated programs pass the DXIL validator and create pipelines on an RTX 5080 (driver 621.1). `cargo test -p victory-shader` and `cargo xtask policy` pass, with two new synthetic tests in `wave64_tests.rs`. Big caveat: I haven't play-tested the general form yet. With the device losses in runs 121-124 in mind, your named list is the safer step until someone plays with it. If the general version is wanted, I can open it as a PR on top of #560. Still refused here: `6b82bc7d22016cb5` and `6832a9da15c2e584` (LDS is full, #348 looks at those), and `22338086ea4c5364`, `1d434307d981352a`, `3b02415f67c6b0d8` (groups of 128 and 512, which only go through with `VICTORY_WAVE_WIDE=1`).
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/101/head:github-bot/gh-101'
git switch 'github-bot/gh-101'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-101'
git switch 'github-bot/gh-101'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-101'
git switch 'github-bot/gh-101'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-101'
git switch 'main'
git merge --squash 'github-bot/gh-101'
git switch 'main'
git merge --ff-only 'github-bot/gh-101'
git switch 'main'
git merge 'github-bot/gh-101'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.